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

How to add php environment variables in centos system

王林
Release: 2020-04-25 09:39:52
Original
4148 people have browsed it

How to add php environment variables in centos system

Just modify the /etc/profile file.

First run the command

vim /etc/profile
Copy after login

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
Copy after login

(Video tutorial recommendation: linux video tutorial)

Note: If you add multiple connections with colon (:), for example:

PATH=$PATH:/opt/remi/php73/root/bin
Copy after login

How to add php environment variables in centos system

Finally save the file and execute Run the command

source /etc/profile
Copy after login

or

./profile
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template