安裝 nodejs,npm,pm2

一:須要安裝組件: nodejs,npm,pm2

安裝epel 源:node

rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpmgit

rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6github

 

安裝:remi安裝源:npm

擴展知識:Remi 安裝源 | 水景一頁bash

https://cnzhx.net/blog/remi-repository/curl

 

rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpmurl

rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-remi.net

 

 

安裝node的yum源:blog

curl -sL https://rpm.nodesource.com/setup_10.x | bash -rem

參考文檔:

GitHub - nodesource/distributions: NodeSource Node.js Binary Distributions

https://github.com/nodesource/distributions

配置好了以後:

yum    -y install  nodejs

 

node –v查看nodejs版本:

npm –v 查看 npm版本:

 

 

 

而後全局安裝 pm2:

npm install -g pm2

安裝到最後有兩個警告:能夠忽略不計:

 

相關文章
相關標籤/搜索