码迷,mamicode.com
首页 > Web开发 > 详细

Centos用yum方式安装nodejs和npm

时间:2018-11-06 14:37:03      阅读:245      评论:0      收藏:0      [点我收藏+]

标签:rpm -ivh   方式   nod   nbsp   color   node   nload   col   div   

要通过 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

Centos用yum方式安装nodejs和npm

标签:rpm -ivh   方式   nod   nbsp   color   node   nload   col   div   

原文地址:https://www.cnblogs.com/xiewenming/p/9914884.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!