VDS Sphera Knowledge Base
| Main / Browse Categories / Unix / Linux / How can I set environmental variables when my VDS is restarted? |
How can I set environmental variables when my VDS is restarted?
|
NOTE: DO NOT follow this procedure if your account was created AFTER Dec 2006 Create a .profile file on the root(/) of your VDS. Here is some example content: export JAVA_HOME=/usr/java/j2sdk1.4.1_03
export PATH=$PATH:$JAVA_HOME/bin
alias ll='ls -la --color'
alias ls='ls --color'
alias path='echo -e ${PATH//:/\\n}'
alias postgres='/usr/local/pgsql/bin/postgres'
Next, edit the /etc/rc.d/rc file.
Change this: # Unauthorized distribution strictly prohibited. LANG="C" export LANGTo this: # Unauthorized distribution strictly prohibited. source /.profile LANG="C" export LANGLogin to your control panel and restart your VDS. Here are the directions: http://help.hardhathosting.com/question.php/86 Now, everytime you restart your VDS, all of your aliases, ENV variables, etc. are set.
User Comments
|
||||||||
Attachments
| No attachments. |
Related Articles


