linux下设置phantomjs环境变量

1)vim /etc/profile
2)在文件的最后一行,添加安装路径path语句:(注意路径是phantomjs的安装路径)
export PATH=${PATH}:/usr/local/src/phantomjs/bin/
3)保存修改后的文件
:wq
4)使用命令使环境变量生效
source /etc/profile

普通用户:

vim /etc/profile

添加export PATH=${PATH}:/usr/local/src/phantomjs/bin/

source /etc/profile

超级用户:

export PATH=$PATH:/root/phantomjs/bin

猜你喜欢

转载自blog.csdn.net/xc_zhou/article/details/80700640