After installing php and MySQL on Linux CentOS system, in order to use it easily, you need to add php and mysql commands to the system command. If you do not add to the environment variable, execute the “php -v” command to view the current When the php version information is used, it will prompt the command does not exist. Below we will introduce the method of adding php and mysql to the environment variable under linux (assuming php and mysql are installed in /usr/local/webserver/php/respectively). And /usr/local/webserver/mysql/).
Method 1: Run the command export PATH=$PATH:/usr/local/webserver/php/bin and export PATH=$PATH:/usr/local/webserver/mysql/bin
Using this method, it will only be valid for the current session, which means that the PATH setting will be invalid after each logout or logout of the system, but only temporarily.
Method 2: Execute vi ~/.bash_profile to modify the PATH line in the file, and add /usr/local/webserver/php/bin and /usr/local/webserver/mysql/bin to PATH=$PATH: $HOME/bin after a line
This method only works for the currently logged in user
Method 3: Modify the /etc/profile file to make it permanent and valid for all system users. Add the following two lines of code at the end of the file: PATH=$PATH:/usr/local/webserver/php/bin:/usr/local/webserver/mysql/bin export PATH
Finally: execute the command source /etc/The profile or the execution point command ./profile makes its modification take effect. After the execution, you can check whether the addition is successful by using the echo $PATH command.
On August 24, 2009, Apple officially launched the new generation server operating
There is an advertiser who needs to use our server, and we are not obligated to audit their code, so
IIS domain name binding: Lets take the site named test as an example to explain th
On the article about script intrusion, the Internet is already flooding. Although there are many ori
How to close the port? Make the server more secure!
Hide Nginx version number security and method
Server/WIN2000 can not start several solutions
Eight steps to troubleshoot AIX servers
For the first time with the server webmaster common mistake
Using load balancing technology to build high-load network sites
How to prevent server malware intrusion?
What is the number of IIS links
Ubuntu machine vsftp connection reported 530 link failed
How to set up background services in batches in Win8
Wubi input method three versions of the root table Daquan
Same configuration test! Win8 and Win7 boot time comparison
Enterprise deployment of Windows 8 applications
Recovery method after Windows XP user profile is lost or damaged
How can I solve the problem that Baidu network disk cannot upload files?
When will win10 be on the line When will win10 win
Win7 upgrade Win10 installation to 99% blue screen restart how to do?