centos安装nodejs bin

1.根据系统选择下载nodejs版本

https://nodejs.org/en/download/

下载

wget https://nodejs.org/dist/v8.11.3/node-v8.11.3-linux-x86.tar.xz

解压

tar xvf node-v8.11.3-linux-x86.tar.xz

mv node-v8.11.3-linux-x86 nodejs

链接

ln -s /demo/nodejs/bin/npm  /usr/local/bin/

ln -s /demo/nodejs/bin/node  /usr/local/bin/

测试

 

 参考https://www.cnblogs.com/zhuawang/p/7617176.html

 

另安装

On RHEL, CentOS or Fedora, for Node.js v8 LTS:

curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -

Alternatively for Node.js 10:

curl --silent --location https://rpm.nodesource.com/setup_10.x | sudo bash -

Then install:

sudo yum -y install nodejs

链接 https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora

 

posted @ 2018-07-02 10:34  不经一番寒彻骨  阅读(293)  评论(0编辑  收藏  举报