LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 08-11-2005, 01:36 PM   #1
nasht
LQ Newbie
 
Registered: Apr 2004
Location: Los Angeles
Distribution: Fedora Core 4
Posts: 29

Rep: Reputation: 15
environment variables


Hi,

When installing Java, Tomcat and others, they asked me to created variable like

JAVA_HOME
CATALINA_HOME
...
I created those by doing export NAME="value".
It worked fine, until I had to reboot my computer.

Where do I set those variables so that they're always available to the system?

Thank You,
 
Old 08-11-2005, 02:02 PM   #2
laceupboots
Member
 
Registered: Dec 2003
Location: Houston
Distribution: Knoppix,lenova yoga 3, Samsung s6 -android
Posts: 307

Rep: Reputation: 30
Try looking for a file called /etc/profile.
 
Old 08-11-2005, 02:03 PM   #3
Vookimedlo
Member
 
Registered: Jul 2004
Location: Czech Republic - Roudnice nad Labem
Distribution: Debian
Posts: 253

Rep: Reputation: 34
Hi,
put them into /etc/profile file for system wide use.
 
Old 08-11-2005, 02:12 PM   #4
jayemef
Member
 
Registered: Aug 2005
Location: Juniata College, PA
Distribution: Ubuntu, Slackware
Posts: 67

Rep: Reputation: 15
Alternatively, you can create your own script(s) in /etc/profile.d. For example:
Code:
(/etc/profile.d/java.sh)
export JAVA_HOME="/usr/java/jdk1.5.0_02"
export JAVA_PATH="$JAVA_HOME"
export PATH="$PATH:$JAVA_HOME/bin"
export JDK_HOME="$JAVA_HOME"
 
  


Reply



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
Environment Variables - where do they go!?! iansoundz Linux - General 7 11-17-2005 02:27 AM
environment variables in c++ s3b0 Programming 6 08-27-2004 09:19 AM
when to use environment variables? mark_2811 Programming 2 02-23-2004 06:09 PM
environment variables kakridge Linux - Newbie 1 07-14-2003 06:25 PM
environment variables aethereal Linux - Newbie 7 12-19-2001 09:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:24 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration