1、添加PHP的环境变量。如图操作

  linux----------centos下添加环境变量

  其中在 /etc/profile里面编辑的内容是:只加了这一行,箭头所指的那一行。

  linux----------centos下添加环境变量

2、需要添加其他环境变量就在后面用 :追加

  PATH=$PATH:/usr/local/php/bin:/usr/local/mysql/bin

 3、source /etc/profile  环境变量生效

  

相关文章: