安裝 nodejs,npm,pm2


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

安裝epel 源:

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

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

 

安裝:remi安裝源:

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

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

 

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

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

 

 

安裝node的yum源:

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

參考文檔:

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

安裝到最后有兩個警告:可以忽略不計:

 

 

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM