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