Ask Your Question
0

Facing problem during setting of environment variable

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

Bhushan gravatar image

updated 2013-01-30 07:35:44 -0500

Jomoos gravatar image

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 flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2013-01-30 02:48:48 -0500

ztank1013 gravatar image

updated 2013-01-30 02:49:50 -0500

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/

edit flag offensive delete link more
-1

answered 2013-01-30 01:19:48 -0500

_nobody_ gravatar image

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

edit flag offensive delete link more

Question Tools

Stats

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

Seen: 885 times

Last updated: Jan 30 '13