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

安装到最后有两个警告:可以忽略不计:

原文地址:https://www.cnblogs.com/zy-303/p/9255924.html

时间: 2024-08-19 14:41:55

安装 nodejs,npm,pm2的相关文章

ubuntu 下安装nodejs以及pm2

ubuntu 12.04服务器可以使用apt-get方式安装Node JS,但是,安装完后的版本为v0.6.12的版本,如果我们想要使用新一点的版本需要做如下配置: apt-get install python-software-properties apt-add-repository ppa:chris-lea/node.js apt-get update apt-get install nodejs 安装完成后可以检查一下版本,使用如下命令可以查看: [email protected]:#

Yum安装nodejs + npm之CetnOS 6.5

安装步骤 CentOS 6.5 安装epel软件仓库 wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm    wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm rpm -ivh epel-release-6-8.noarch.rpm rpm -ivh remi-release-6.rpm 完成后检查是否安装成功

ubatu 安装nodejs npm liveserver

更新ubuntu软件源 sudo apt-get update sudo apt-get install -y python-software-properties software-properties-common sudo add-apt-repository ppa:chris-lea/node.js sudo apt-get update 安装nodejs sudo apt-get install nodejs sudo apt install nodejs-legacy sudo a

CentOS 下安装 Node npm pm2

1.node安装 参考:http://blog.csdn.net/haidaochen/article/details/7257655 下载,你需要在https://nodejs.org/en/download/下载最新的Nodejs版本,一般选择编译好的二进制包 配置NODE_HOME,进入profile编辑环境变量 vim /etc/profile 设置nodejs环境变量,在 export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTR

在 Ubuntu 上安装 Nodejs npm

安装环境 Ubuntu 12.04.1 LTS Nodejs 0.10.33 安装curl: sudo apt-get install curl setup: curl -sL https://deb.nodesource.com/setup | sudo bash - install: sudo apt-get install -y nodejs 查看是否安装成功: node -v 安装npm: curl http://npmjs.org/install.sh | sudo sh 查看是否安装

CentOS7.6安装Nodejs(Npm)

官网下载地址:https://nodejs.org/en/download/ 第一步:软件下载安装 进行安装目录:cd /opt/software (如果目录不存在,请先创建目录) 下载二进制包:wget https://nodejs.org/dist/v10.15.1/node-v10.15.1-linux-x64.tar.xz (下载地址去官网查询最新的,wget命令如果不存在,请先安装wget:yum install -y wget) 解压:tar xvJf node-v10.15.1-l

阿里云centos 安装 nodejs npm express

yum check-update vi /etc/vsftpd/vsftpd.conf anonymous_enable=NO service vsftpd startuseradd -s /sbin/nologin -d /var/www/ aatii(为默认ftp路径)设置密码chown -R aatii /usr/local/lib yum install gcc gcc-c++ 编译wget http://...tar xvf node-vXXXX.tar.gzcd node-v*./c

win10子系统ubuntu下安装nodejs,并使用n管理版本

1.解决apt下载速度慢的问题 #方法:设置国内的源 https://www.cnblogs.com/ashe666/p/10036757.html 2.安装nodejs,npm,n apt-get install nodejs apt-get install npm apt-get install n 3.使用n管理node版本 #1.使用apt安装n #2.在https://npm.taobao.org/mirrors/node/下面复制你要的版本的下载地址 #因为网络问题,需要自己下载需要

linux下离线安装nodejs、npm以及npm插件库(pm2、express等)

一.nodejs安装和npm安装 在nodejs,官网下载nodejs的linux版本,直接解压即可.然后设置为全局 例如 : ln -s /root/nodejs/node-v10.16.0-linux-x64/bin/node /usr/local/bin/node ln -s /root/nodejs/node-v10.16.0-linux-x64/bin/npm /usr/local/bin/npm 然后用node -v 和npm -v测试是否安装成功 二.npm插件库(如express