Ask Your Question

# Facing problem during setting of environment variable

I have done installation of Fedora-15 on my system. My requirement is to set apache-tomcat. For that, I am trying to set CATALINA_HOME Environment variable. I am using below command:

export CATALINA_HOME=/home/developer/Desktop/apache-tomcat....


It shows properly in the same instance of terminal(in which it was initialised) but it is not showing in a new instance of terminal.

I checked it by using the following command:-

echo $CATALINA_HOME  I am facing the same problem for all environment variable also. Can some one guide me how to fix this problem. ? edit retag close merge delete ## 2 Answers Sort by » oldest newest most voted The export command you've run in your terminal session is not supposed to be permanet but just related to the current terminal session and its eventual forks/childs. Ones the session ends the CATALINA_HOME variable and its content is lost. To make the change permanent there are several approaches. Mine would be to append the export CATALINA_HOME=/home/developer/Desktop/apache-tomcat....  line into the ~/.bash_profile ($HOME/.bash_profile) or ~/.profile or ~/.bashrc file.

Then close and re-open the terminal and check for yourself if the echo \$CATALINA_HOME works as expected this time.

Please see more detail at this link: http://www.cyberciti.biz/faq/set-environment-variable-linux/

more

Not sure if permissions are messing up with your setup. Try to change/switch to superuser, and try to do/set CATALINA_HOME again.

nobody

more

## Stats

Asked: 2013-01-30 00:13:53 -0500

Seen: 885 times

Last updated: Jan 30 '13