this is my personal project to build server by node in centos7.4 个人node项目 环境centos7.4
wget -c https://nodejs.org/dist/v6.10.0/node-v6.10.0.tar.gz
tar -xvf node-v9.8.0-linux-x64.tar.xz
mv node-v6.10.0 node
cd ~ && vim .bash_profile add this . be sure url is right /下面这些添加进入文件保存推出 # .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
# PATH=$PATH:$HOME/bin:/usr/local/src/node/bin
export PATH=/root/node/bin:$PATH
source ./bash_profile
npm install -g npm n stable (稳定版)/ n latest (最新版) {select one}