Home  >  Article  >  Operation and Maintenance  >  How to add php environment variables in centos system

How to add php environment variables in centos system

王林
王林Original
2020-04-25 09:39:524134browse

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

How to add php environment variables in centos system

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn