美文网首页
centeros安装npm

centeros安装npm

作者: 哥本哈登_sketch | 来源:发表于2018-01-10 13:24 被阅读0次

要通过 yum 来安装 nodejs 和 npm 需要先给 yum 添加 epel 源,
添加方法在 centos 添加epel和remi源

添加 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

安装完成后,执行

curl --silent --location https://rpm.nodesource.com/setup_5.x | bash -
yum -y install nodejs

相关文章

网友评论

      本文标题:centeros安装npm

      本文链接:https://www.haomeiwen.com/subject/fwkonxtx.html