要通過 yum 來安裝 nodejs 和 npm 需要先給 yum 添加 epel 源
##添加 epel 源
rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
導入 key:
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
##添加 remi 源
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-remi
安裝完成后,執行
curl --silent --location https://rpm.nodesource.com/setup_5.x | bash -
yum -y install nodejs
原文:http://blog.csdn.net/xiao_jun_0820/article/details/50838185
yum和源碼安裝
https://blog.csdn.net/abcdefg2343/article/details/81355002