After some of the toss finally installed on Linux node, recorded to avoid forgetting
1. Download node
Go to the official website to download the latest Linux version of the corresponding node.js,node-v6.10.2-linux-x64.tar.gz
2. Upload the node file to the server
I use Xshell with the xftp upload to the node directory, this is a compressed file, in the command line input TAR-XVF node-v6.10.2-linux-x64.tar.gz, small hint: file name is longer, enter the first few characters, press the TAB key to automatically fill
3. Edit the configuration file
> Vim/etc/profile
Enter the following at the end of the file
Export node_home=/node/node-v6.10.2-linux-x64
Export path= $PATH: $NODE _home/bin
Export Node_path= $NODE _home/lib/node_modules
Edit File Command:
: QW, exit does not save: Q! exit Edit Status
4. Let the configuration file take effect
Command line enter the following command
> source/etc/profile The third-step configuration file takes effect
5. Check if the installation is successful
command Line Enter the following command > node-v to view the node version, if the version number is displayed, the installation is successful
Install node under Linux