Home > php教程 > PHP开发 > Three ways to permanently add environment variables in Linux

Three ways to permanently add environment variables in Linux

高洛峰
Release: 2016-12-15 17:04:49
Original
2168 people have browsed it

How to add /usr/local/mysql/bin as a system variable
Method 1:
vim /etc/profile Add at the end
PATH=/usr/local/mysql/bin:$PATH
export PATH

If it’s the one just now The modification will take effect immediately. You need to execute the following code

[root@CentOS ~]# source /etc/profile

Method 2:
cd /etc/profile.d
vim mysql.sh
PATH=/usr/local/mysql/ bin:$PATH
export PATH

If the modification just now takes effect immediately, you need to execute the following code

[root@CentOS ~]#source /etc/profile.d/mysql.sh



More For related articles on three methods of permanently adding environment variables in Linux, please pay attention to 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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template