cd /usr/local wget https://registry.npmmirror.com/-/binary/node/latest-v12.x/node-v12.22.9-linux-x64.tar.gz tar -xvf node-v12.22.9-linux-x64.tar.gz cd node-v12.22.9-linux-x64/bin ./node -v ln -s /usr/local/node-v12.22.9-linux-x64/bin/node /usr/bin/node ln -s /usr/local/node-v12.22.9-linux-x64/bin/npm /usr/bin/npm
1.2.node14安装
1 2 3 4 5 6
https://registry.npmmirror.com/-/binary/node/latest-v14.x/node-v14.21.3-linux-x64.tar.gz tar -zxvf node-v14.21.3-linux-x64.tar.gz cd /usr/local/node-v14.21.3-linux-x64/bin ./node -v ln -s /usr/local/node-v14.21.3-linux-x64/bin/node /usr/bin/node ln -s /usr/local/node-v14.21.3-linux-x64/bin/npm /usr/bin/npm
1.3.node16安装
1 2 3 4 5 6
https://registry.npmmirror.com/-/binary/node/latest-v16.x/node-v16.20.0-linux-x64.tar.gz tar -zxvf node-v16.20.0-linux-x64.tar.gz cd /usr/local/node-v16.20.0-linux-x64/bin ./node -v ln -s /usr/local/node-v16.20.0-linux-x64/bin/node /usr/bin/node ln -s /usr/local/node-v16.20.0-linux-x64/bin/npm /usr/bin/npm
2.源码安装
说明:不推荐此方式,耗时、可能编译错误、依赖缺失。
1 2 3 4 5 6 7 8
yum -y install gcc gcc-c++ wget https://nodejs.org/dist/v12.13.1/node-v12.13.1.tar.gz tar -zxvf node-v12.13.1.tar.gz cd node-v12.13.1/ ./configure make make install node -v
3.使用淘宝镜像
3.1.设置镜像
1
npm config set registry https://registry.npmmirror.com
1.如果初始化数据的时候没有指定lower-case-table-names参数的值,即默认0;则不需要此配置。 2.如果初始化指定了参数,但是my.cnf中没有配置,则启动失败。查看/var/log/mysqld.log会发现此参数初始化值和配置值不同导致。 Different lower_case_table_names settings for server ('0') and data dictionary ('1').
mysql8 ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '你的密码'; flush privileges; mysql5.7 ALTER USER 'root'@'localhost' IDENTIFIED BY '你的密码'; flush privileges;
注意:mysql8新的密码策略,很多mysql客户端工具不支持,所以用原来的密码策略。切记!
添加远程登录用户(例如:develop)
1 2 3
create user 'develop'@'%' identified with mysql_native_password by '你的密码'; grant all privileges on *.* to 'develop'@'%' with grant option; flush privileges;
create database crm; #创建crm数据库 CREATE USER 'crm'@'%' IDENTIFIED WITH mysql_native_password BY 'crm2018' PASSWORD EXPIRE NEVER;#创建用户并且密码永不过期 GRANT ALL PRIVILEGES ON crm.* TO 'crm'@'%' with grant option; #授权数据库所有操作给用户 FLUSH PRIVILEGES;
Selected config: Port : 6379 Config file : /etc/redis/6379.conf Log file : /var/log/redis_6379.log Data dir : /var/lib/redis/6379 Executable : /usr/local/bin/redis-server Cli Executable : /usr/local/bin/redis-cli Is this ok? Then press ENTER to go on or Ctrl-C to abort. Copied /tmp/6379.conf => /etc/init.d/redis_6379 ```
wget https://mirrors.tuna.tsinghua.edu.cn/gnu/glibc/glibc-2.20.tar.gz tar -zxvf glibc-2.20.tar.gz mkdir glibcbuild cd glibcbuild ../glibc-2.20/configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin make make install
checking if gcc -B/usr/bin/ is sufficient to build libc... no checking for nm... nm checking for python3... no checking for python... python configure: error: *** These critical programs are missing or too old: compiler *** Check the INSTALL file for required versions.