node path 通路径系列 - 南摩阿彌陀佛 - Powered by Discuz!

gedit ~/.bash_profile

在里边添加

NODE_HOME=$NODE_HOME:/mnt1t/NODEJS_HOME/node-v8.0.0-linux-x64/bin

export NODE_HOME
source ~/.bash_profile

当安装了新东西的时候,是不会再运行这个的,,所以再要source一下..

这个也不好

更新为下边这个

gedit /etc/profile
NODE_HOME=$NODE_HOME:/home/install/node-v10.14.0-linux-x64/lib/node_modules:/home/install/node-v10.14.0-linux-x64/bin
export NODE_HOME
PATH=$PATH:$HOME/.local/bin:$HOME/bin:$NODE_HOME
export PATH
export JAVA_HOME=/usr/java/jdk-11.0.1
export CLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib
export PATH=$JAVA_HOME/bin:/usr/local/php/bin:/usr/local/nginx/sbin:/usr/local/mysql/bin:$PATH

NODE_HOME=$NODE_HOME:/home/install/node-v10.14.0-linux-x64/lib/node_modules:/home/install/node-v10.14.0-linux-x64/bin
export NODE_HOME
PATH=$PATH:$HOME/.local/bin:$HOME/bin:$NODE_HOME
export PATH
export PATH=/usr/local/php/bin:/usr/local/mongodb/bin:/usr/local/nginx/sbin:/usr/local/mysql/bin:/usr/local/cuda/bin:$PATH

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64

NODE_HOME=$NODE_HOME:/mnt1t/NODEJS_HOME/node-v10.14.0-linux-x64/lib/node_modules:/mnt1t/NODEJS_HOME/node-v10.14.0-linux-x64/bin

export NODE_HOME


PATH=$PATH:$HOME/.local/bin:$HOME/bin:$NODE_HOME

export PATH

Original url: Access
Created at: 2018-11-28 18:45:32
Category: default
Tags: none

请先后发表评论
  • 最新评论
  • 总共0条评论