LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 10-29-2003, 10:15 PM   #1
chii-chan
Member
 
Registered: Sep 2003
Location: chikyuu (E103N6)
Distribution: Redhat 8.0 (2.4.25-custom), Fedora Core 1 (2.4.30-custom)
Posts: 357

Rep: Reputation: 30
Question environment variable setting


How do I set environment variable permanently? I mean to change it in config file. What file do I have to edit to set environment variable? The other way other than "export VARIABLE=value" thing. I'm using Redhat 8.0.
 
Old 10-29-2003, 10:27 PM   #2
moeminhtun
Member
 
Registered: Dec 2002
Location: Singapore
Distribution: Fedora Core 6
Posts: 647

Rep: Reputation: 30
set it in the /etc/profile
 
Old 10-29-2003, 11:02 PM   #3
chii-chan
Member
 
Registered: Sep 2003
Location: chikyuu (E103N6)
Distribution: Redhat 8.0 (2.4.25-custom), Fedora Core 1 (2.4.30-custom)
Posts: 357

Original Poster
Rep: Reputation: 30
Do you mean that I just put the "export VARIABLE=values" in the file?
 
Old 10-29-2003, 11:04 PM   #4
moeminhtun
Member
 
Registered: Dec 2002
Location: Singapore
Distribution: Fedora Core 6
Posts: 647

Rep: Reputation: 30
right.
 
Old 01-23-2009, 12:57 PM   #5
cse_200509
LQ Newbie
 
Registered: Oct 2007
Posts: 6

Rep: Reputation: 0
Quote:
Originally Posted by moeminhtun View Post
set it in the /etc/profile
please tell how to set multiple values for a varible?
e.g.
i want to set
CLASS_PATH to
/opt/apache-tomcat-6.0.18/lib/mysql-connector-java-5.1.7-bin.jar
and to
/opt/apache-tomcat-6.0.18/lib/servlet-api.jar
how to do this?
please help!
 
Old 01-23-2009, 07:29 PM   #6
CaptainInsane
Member
 
Registered: Nov 2003
Location: Peoria
Distribution: Fedora 8
Posts: 92

Rep: Reputation: 15
For Redhat or Fedora running Tomcat, I would set the environment
variables in your users .bash_profile file.

This is one way you could do it:

Code:
CATALINA_HOME=/opt/apache-tomcat-6.0.18

CLASSPATH=$CATALINA_HOME/lib/mysql-connector-java-5.1.7-bin.jar:$CATALINA_HOME/lib/servlet-api.jar

export CLASSPATH


or this, if you don't want to have to keep adding lines to the above:

Code:
CATALINA_HOME=/opt/apache-tomcat-6.0.18

CLASSPATH=$CATALINA_HOME/lib/*.jar

export CLASSPATH
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
setting environment variable kb_ganesh Ubuntu 3 09-10-2005 01:58 PM
Setting up a environment variable Hiper1 Linux - Newbie 3 03-08-2005 08:43 AM
setting environment variable DISPLAY jpan Debian 4 10-15-2004 06:09 PM
Trouble setting environment variable exitsfunnel Linux - Software 4 10-06-2004 06:49 AM
Setting an environment variable kharris Linux - General 3 10-02-2003 04:38 PM


All times are GMT -5. The time now is 09:51 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration