1.linux into node.js package
① Windows up and down in a good pass in the past, you can go to the official website to download the archive node directly into them
②wget back to keep the path to the download:
wget https://npm.taobao.org/mirrors/node/v10.8.0/node-v10.8.0-linux-x64.tar.gz
tar zxvf node-v10.8.0-linux-x64.tar.gz
2. Extract the archive
3. Configure flexible connection (I have not found the right path), followed by the setting environment variables method
① configuration software connection way: the Global node can use the command
You can use the whereis command to view the file path: whereis node
ln -s /usr/local/node/bin/node /usr/bin/node --将node源文件映射到usr/bin下的node文件
ln -s /usr/local/node/bin/npm /usr/bin/npm
② set environment variables * approach
under / home etc directory to find the
editorial content after vi / etc / Profile , at the end:
export NODE_HOME=~/mysofltware/node-v9.11.0-linux-x64
//这里填写自己的路径~/mysofltware/node-v9.11.0-linux-x64
export PATH=$PATH:$NODE_HOME/bin
export NODE_PATH=$NODE_HOME/lib/node_modules
4. Last Edit: source / etc / profile settings to take effect
5. Check whether the configuration: the Node -v / npm -v
(if not configured successfully, please check the path is correct, or try other methods)