1 通过包管理器安装
a 添加包源
最新发行版 yum install -y gcc-c++ make curl -sL https://rpm.nodesource.com/setup_13.x | sudo -E bash - 稳定版 yum install -y gcc-c++ make curl -sL https://rpm.nodesource.com/setup_12.x | sudo -E bash -
b 安装
sudo yum install nodejs
安装redis
sudo yum install epel-release sudo yum update
sudo yum -y install redis sudo systemctl start redis
参考:
https://tecadmin.net/install-latest-nodejs-and-npm-on-centos/