Home > Article > Operation and Maintenance > How to add php environment variables in centos system
Just modify the /etc/profile file.
First run the command
vim /etc/profile
to open the /etc/profile file, and then add the following two lines of code at the end of the file
PATH=$PATH:/usr/local/php56/bin export PATH
(Video tutorial recommendation: linux video tutorial)
Note: If you add multiple connections with colon (:), for example:
PATH=$PATH:/opt/remi/php73/root/bin
Finally save the file and execute Run the command
source /etc/profile
or
./profile
to make the modification effective. After execution, you can use the echo $PATH command to check whether the addition was successful.
Recommended tutorial: centos tutorial
The above is the detailed content of How to add php environment variables in centos system. For more information, please follow other related articles on the PHP Chinese website!