官网安装说明:
链接
Enterprise Linux (RHEL and CentOS) users may use the Node.js and npm packages from the EPEL repository.
Install the appropriate epel-release RPM for your version (found on the EPEL repository homepage), then run:
sudo yum install nodejs npm --enablerepo=epel
通过epel可以快捷安装node.js:
- yum install -y epel-release
- yum install -y nodejs