1. Copy the Linux version of Node. js from nodejs.org/
2. After copying the link, wget downloads the compressed package
Wget HTTP: / / https://nodejs.org/dist/v14.16.1/node-v14.16.1-linux-x64.tar.xzCopy the code
3. After downloading, decompress
The tar XVF - node - v14.16.1 - Linux - x64. Tar. XzCopy the code
4. Go to the bin directory and check whether the installation is successful
./node -v
Copy the code
Display the version number and the installation is successful
v14.16.1
Copy the code
5. Configure the soft connection so that the node command can be used globally
/usr/local/software/node.js = /usr/ local/software/node.js Ln -s /usr/local/software/node /usr/bin/node - will the node node under the source file mapping to usr/bin file ln -s/usr/local/software/node/bin/NPM/usr/bin/NPMCopy the code
/usr/local/node-/ configure the node installation path.
mkdir node_global
mkdir node_cache
npm config set prefix "node_global"
npm config set cache "node_cache"
Copy the code
At this point the installation is complete.