Installing and uninstalling nodejs in Linux

Installation:
1. Download
Uname -a to view the Linux system version, go to the NodeJS official website to download the corresponding NodeJS compressed file
 
2. Upload & amp; Unpack & amp; renamed
Yum install -y LRZSZ and install the file node-v10.16.0-linux-x64.tar.xz. If you want to install LRZSZ, do not install the file node-v10.16.0-linux-x64.tar.xz.
⑵ Unzip tar-xvf node-v10.16.0-linux-x64.tar.xz. ⑵ Unzip tar-xvf node-v10.16.0-linux-x64.tar.xz
⑶ Rename it to nodejs: mv node-v10.16.0-linux-x64 nodejs
 
3. Establish soft connection and make it global (APP is the directory where I installed NodeJS)
(1) ln -s/app/nodejs/bin/node/usr/local/bin /
2 ln -s/app/nodejs/bin/NPM/usr/local/bin /
 
4. Check global
Any position node – v view nodejs version of NPM – v view NPM version number, such as display shows successful installation
 
Uninstall:

yum remove nodejs NPM -y
yum remove nodejs NPM -y
yum remove nodejs NPM -y
 
2. Manually delete residual files
Go to /usr/local/lib and delete all nodes and node_modules
go to /usr/local/include and delete all nodes and node_modules
to /usr/local/bin and delete all nodes’ executables
 
3. If you need to install again, follow the above installation method

Read More: