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 links to simplify calls
 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 for manually upgrading 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 the 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
Compile Hadoop-2.7.6 under CentOS7.4
CentOS 7.0.1406 official version released
Install mysql5.7 under CentOS7
Centos 6.4 python 2.6 upgrade to 2.7
Install ActiveMQ under Centos7
Install PostgreSQL12 under CentOS7
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
View CentOS version information
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 default python2.6 upgrade to
[CentOS environment deployment] Java7/Java8 deployment under CentOS
CentOS upgrade python2 to pyth
Build OpenV** Server under CentOS7
Build OpenLDAP server under CentOS7
Redis cluster installation under CentOS
Centos install high version GCC
Install Oracle11gR2 database under CentOS6.9
Centos6.5 desktop version network settings
3 partitioning tools under CentOS Linux
Install MySQL under Linux (CentOS 7)
Redis cluster installation under CentOS
SELinux security settings under CentOS
Install Java JDK8 under CentOS6
CentOS7.7 deploy k8s (1 master + 2 node)
centos6.5: gcc upgrade (5.2.0) process record
Centos7 install k8s cluster 1.15.0 version
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