一、安装
1.图形界面的话直接官网下载安装包
2.命令行的话
添加epel源
64位:
rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
32位:
rpm -ivh http://download.fedoraproject.org/pub/epel/6/i386/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
centos6:
yum -y install nodejs npm —enablerepo=epel
解决国内npm不下来包:更改源
npm config set registry http://registry.cnpmjs.org
express
npm install —save express
socket.io
npm install —save socket.io