Author
|
Topic: Using Applications from /usr/local/
|
|
jasont
Member
Member # 16
|
posted August 14, 2001 04:24 AM
Another option is to add the path globally by editing /usr/share/init/tcsh/login.For example. If your files and binaries for mysql are in /usr/local/mysql/bin and you want to add that to everyones paths then you would do the following A) change the path globally by editting /usr/share/init/tcsh/loginI)sudo pico /usr/share/init/tcsh/login II)at the top you will find the path setup (set path =) after the last declared path ex:
code:
set path = ( \ ~/bin \ /usr/local/bin /usr/bin /bin \ /usr/local/sbin /usr/sbin /sbin \ you want to insert the path to your mysql binaries. If you followed these instructions the line is /usr/local/mysql/bin \ add the text on a seperate line after the last entry, but before the closing ). it should then look like this: set path = ( \ ~/bin \ /usr/local/bin /usr/bin /bin \ /usr/local/sbin /usr/sbin /sbin \ /usr/local/mysql/bin \ ) III) ctrl-x IV) <return>>
[ August 14, 2001: Message edited by: jasont ]
Posts: 50 | From: Palo Alto, CA | Registered: Aug 2001
| IP: Logged
|
|
|
|
bartX
Junior Member
Member # 26
|
posted August 20, 2001 04:10 AM
As far as I know, there are two good ways to change the PATH environment variable: put one of the following lines in your .cshrc or .login file (remove the leading #)#set path = ($path /usr/local/bin) # or #setenv PATH "${PATH}:/usr/local/bin" These make sure you _append_ to your path instead of replacing it, which is generally a bad idea. If you want to use your own versions of default versions of some soft (e.g. use a colorised ls instead of the default one) without replacing the default one, put the new path _before_ the PATH variable: #set path = (/usr/local/bin $path) # or #setenv PATH "/usr/local/bin:${PATH}" If you have several directories to add, it is generally a good idea to add them in separate lines (so you can easily en/disable one). An example from my .cshrc file (which is in my home dir BTW): " setenv MANPATH "${MANPATH}:/usr/X11R6/man" setenv PATH "${PATH}:/usr/X11R6/bin" setenv MANPATH "${MANPATH}:/Software/BSD/share/man" setenv PATH "${PATH}:/Software/BSD/bin" "
Posts: 5 | Registered: Aug 2001
| IP: Logged
|
|
|