计算机网络/计算机科学与应用/系统/运维/开发

PHP将编译添加环境变量(centos7环境)

在PHP make&& make install 完成之后,需要配置环境路径

vim /etc/profile

在文件末尾添加

PATH=$PATH:/usr/local/php7/bin export PATH

保存退出

执行命令立即生效

source /etc/profile

如果此命令无效 可以尝试

locate source /etc/profile  或者   usr/bin/source /etc/profile

最后输入 

php -v


php

热爱可抵岁月漫长, 温柔可挡艰难时光。

评论

^