linux 配置php环境变量 vim /etc/profile //加上 export PATH=$PATH:/usr/local/php/bin 保存退出 source /etc/profile php -v 注:该配置对所有用户生效