Manually upgrade node version under CentOs

  1. Find the corresponding nodejs package, refer to https://nodejs.org/download/release/

  2. Switch to the location where node is installed here is /usr/local/lib/nodejs

Does not exist can be established

? mkdir /usr/local/lib/nodejs

  1. Download
wget node-v8.12.0-linux-x64.tar.xz
  1. Unzip
 tar -xJvf node-8.12.0-linux-x64.tar.xz -C /usr/local/lib/nodejs 
 mv /usr/local/lib/nodejs/node-8.12.0-linux /usr/local/lib/nodejs/node-8.12.0
  1. Configure environment variables

vim ~/.profile

Enter the following

export NODEJS_HOME=/usr/local/lib/nodejs/node-8.12.0/bin
 export PATH=$NODEJS_HOME:$PATH
  1. Refresh environment variables immediately

~ /.profile

  1. Check the version

? node -v

  1. Establish system link to simplify calling
 sudo ln -s /usr/local/lib/nodejs/node-8.12.0/bin/node /usr/bin/node
 sudo ln -s /usr/local/lib/nodejs/node-8.12.0/bin/npm /usr/bin/npm
 sudo ln -s /usr/local/lib/nodejs/node-8.12.0/bin/npx /usr/bin/npx

to sum up

? The above is the method to manually upgrade the node version under CentOs introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message. The editor will reply to you in time. Thank you very much for your support to website (zalou.cn)website!

Recommended Posts

Manually upgrade node version under CentOs
Manually upgrade node version under CentOs
Centos kernel version upgrade
Upgrade OpenSSL and OpenSSH under CentOS7
Centos7 upgrade git version control tool
Install mysql8.0.13 version under Linux CentOS7 system
CentOS7 upgrade python3
Centos6.5 openssh upgrade
Centos7 upgrade kernel
centos6.9 rabbitmq 3.6.8 upgrade 3.8.2
Deploy GitBook under CentOS7
CentOS7.5-1804 system kernel upgrade
Centos 6.4 python 2.6 upgrade to 2.7
CentOS 7.0.1406 official version released
Install mysql5.7 under CentOS7
Centos 6.4 python 2.6 upgrade to 2.7
Install CentOS under VMware
CentOS6.5 upgrade kernel to 3.10.28
Deploy JDK+Tomcat8 under CentOS
Centos manually install mysql8
Install mysql under Centos 7
Configure lamp under centos6.8
View CentOS version information
Install Jenkins under Centos 7
Redis3 installation under Centos7
Install MariaDB under MariaDB Centos7
Install mysql5.1 under CentOS6.5
View CentOS version information
Xen virtualization combat under CentOS 6.6
[CentOS environment deployment] Java7/Java8 deployment under CentOS
Build docker environment under Centos6.5
CentOS upgrade python2 to pyth
Build OpenV** Server under CentOS7
Redis cluster installation under CentOS
Configure static IP under CentOS 7
Centos install high version GCC
Centos6.5 desktop version network settings
3 partitioning tools under CentOS Linux
Install MySQL under Linux (CentOS 7)
Root password cracking under CentOS 7
Install Java JDK8 under CentOS6
centos6.5: gcc upgrade (5.2.0) process record
Install MongoDB database under CentOS7
CENTOS7 manually install CEPH original
CentOS 6.8 under linux install mongodb
CentOS 8.0.1905 install ZABBIX4.4 version (verified)
Set static IP under Centos
Centos7.6 install MySQL+Redis (latest version)
Install Mesos tutorial under CentOS7