Centos7 configure nodejs environment

I remember that I have a displayed linux server, here is the centos7 release configuration nodejs environment for bloggers (here, the latest version of v8.11 is taken as an example)

  1. Get the latest installation package of nodejs

wget https://npm.taobao.org/mirrors/node/v8.11.1/node-v8.11.1-linux-x64.tar.xz

  1. Because of the downloaded .xz file, you need to generate .tar and unzip it

For the specific method of generating .tar decompression, please see the previous article Centos decompress nodejs compressed package

Modify the folder name after decompression (enter the installation directory and execute the first command)

 mv node-v8.11.1-linux-x64 node

After executing the command, the folder name is successfully changed to node, which is the installation directory

  1. The test is successful (my node installation path here is node under the root directory)
  cd /node/bin&&ls

At this time, I see that npm and node perform version name testing

. /node -v

See the return version number v.8.11.1, the installation is successful

  1. Next, configure environment variables, which can be used globally

Enter the file of the profile under home

 vim ~/.bash_profile

Find PATH=$PATH:$HOME/bin and add the path as:

  PATH=$PATH:$HOME/bin:/node/bin

Then test node -v in any directory to successfully return the version number environment variable configuration is completed.

Recommended Posts

Centos7 configure nodejs environment
Configure CentOS7 GPU environment
CentOS 7 configure Java language development environment
CentOS 7 configure Ruby language development environment
CentOS 7 configure php language development environment
Configure python3 environment on centos7 and
CentOS 7 configure Python language development environment
Centos7 configure JDK
CentOS install nodejs 8
CentOS6.7 build LNMP environment
Configure Ocserv on CentOS 6
Nodejs install on centos7
Centos7.6 build LNMP environment
lamp (centos7) installation lamp environment
CentOS6.8 install node.js npm
Install Node.js on Centos
Configure lamp under centos6.8
Centos7 configure IP address
Ubuntu18.10 configure Java environment
CentOS 7 build LNMP environment
[CentOS environment deployment] Java7/Java8 deployment under CentOS
Build docker environment under Centos6.5
CentOS 7 install JAVA environment (JDK 1.8)
SkyWalking study notes (CentOS environment)
Centos7 set up GitBook environment
CentOS install nginx+tomcat+java+mysql operating environment
Configure static IP under CentOS 7
Centos6.5 install and configure mongodb
Centos7 decompress nodejs compressed package
Centos configure multiple virtual IP
Configure swap space on CentOS7
Centos6 set up GitBook environment
CentOS environment installation of Docker
Centos7 deploys python3 virtual environment
Centos7.4 environment installation lamp-php7.0 tutorial
Centos configure multiple virtual IP
Install and configure keepalived under CentOS 5.9
Configure rsyslog log client on CentOS
CentOS 8 (2)
CentOS 6/7 configure sendEmail to send mail
CentOS 8 - install and configure NFS service
CentOS 8 (1)
Build Nginx environment on Linux (CentOS)
CentOS Minimal install and configure TIPS
Install and configure FreeIPA in Centos7
FFmpeg environment deployment record under centos7
CentOS6.8 Chinese/English environment switching tutorial illustration
PPTP environment deployment record under Centos
Tomcat configuration JMX in centos 6.5 environment
Configure Nginx reverse proxy based on CentOS 7
Configure Nginx load balancing based on CentOS 7
The software environment required for Centos7 installation
Configure Nginx forward proxy based on CentOS 7
Configure iSCSI network storage under CentOS 7.x
Centos7.5 configuration java environment installation tomcat explanation
Centos-6.5 installation and deployment of LNMP environment
Configure Java development environment in Ubuntu20.04 LTS
Linux environment construction: CentOs + Apache + MySQL + PHP
CentOS7 configure static address, turn off firewall
(1) Centos7 installation to build a cluster environment
Deploy Docker and configure Nginx in CentOS