安装 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

安装到最后有两个警告:能够忽略不计:

 

相关文章
相关标签/搜索