Original address
To add the/etc/apache/bin directory to path, there are three methods:
1. #PATH = $PATH:/etc/apache/bin
Using this method, only valid for the current session, which means that the PATH setting is invalidated whenever the system is logged out or logged out
2. #vi/etc/profile
Add Path= $PATH in place:/etc/apache/bin (Note: = no spaces on either side of the equals sign) This method is best, unless you manually force the value of the PATH, otherwise it will not be changed
3. #vi ~/.bash_profile
Modify the path line and add/etc/apache/bin to this method is for the user to work
Note: To change path, you must log on again to be effective, and the following methods can simplify your work:
If/etc/profile is modified, the source profile or execution Point command is executed after the edit is finished. The value of/profile,path will take effect immediately. The principle of this method is to execute a/etc/profile shell script again, note that if the sh/etc/profile is not possible, because SH is executed in the child shell process, even if the path changes will not react to the current environment, but source is in the current Shell process, so we can see the path change.
In general, the bin directory in the user's working directory is included in the path path, so just put the user's own shell script in the user's Bin directory and do not need to modify the configuration file.