需要root用户下执行以下代码 打开环境配置文件
gedit /etc/profil
在文本最下边添加需要配置的环境
export DEMO_HOME=/文件夹路径/ export PATH=$PATH:$NODE_HOME/bin
使配置文件生效
source /etc/profile