How to set a environment variable in rh?
Dear all,
i want to set some environment variable to rh. then how? Thanks in advance! Cheers, yenonn |
You want to set some environmental variables in RedHat? Are you referring to a shell environment?
|
i don't know what should it be.
in windows, i can set path, such as: set PATH=d:\java\jdk1.4.0\bin;d:\ant\bin set ANT_HOME=d:\ant set JAVA_HOME=d:\java\jdk1.4.0 but, i am totally new to rh8, if i want to do something like this. then, how can i get it right? Cheers, yenonn |
so you want to create a link right?
like file is located somewhere but you want to make it look like elsewhere did i get it right |
well, to check your path you can use:
$PATH to edit your path: export $PATH=/bin:/home/usr/bin:etc... or export $PATH=$PATH:/home/usr/bin (which adds the last entry to your original path). Now for these others, I'm not sure what you're trying to do....you see, some program has to actually *use* these environments you'd be setting. You can just about export anything, but its pointless unless you use it. So, check the scripts to determine what variables are being used and work from there. Also, if you're making your own scripts, you dont need to export variables on the command line, but instead in the script. maybe you could tell us the context that this came up under... |
ok, all i want to do is like this.
i want to setup a java environment for my linux redhat... i have downloaded and installed the java standard development kit 1.4.0.0.1 from www.java.sun.com. then, i want to set some environment variables like JAVA_HOME,... and etc. to the system. (i did that in windows 98). so, does ur solution hits my need? if so, thanks, else, what should be then? |
i think nakkaya is near to my thinking...
|
you have to create a sym link if you are using gnome and kde find the file you want to link and right click it then choose create link or some think like that i am not using both so i am not sure the name but i know there is a entry like that then drag and drop it where you want to link it
|
ok,
1. If this is a program that you're running, you can create an alias in ~/.bashrc something like: alias cool_name=/boring/long/path/to/boring/name 2. But I think what you are doing is trying to change the default paths/or variables for already made scripts. See my earlier post: these names dont do much unless you know what they are exactly (for example your JAVA_HOME). now, there are 2 ways: you can try a "export $JAVA_HOME=whatever this is supposed to be" or try locating the oiginal/universal copy: "grep JAVA_HOME /etc/" then just edit the config file grep finds. 3. If there is no config file found, maybe variables like "JAVA_HOME" (again...I dont know how hava works) is set during install. then you'll ether have to go back to 2, or even more-so you may have to install from source, editing the make file before you compile. |
looking at your previous post:
Code:
set PATH=d:\java\jdk1.4.0\bin;d:\ant\bin |
thanks cuckoopint,
thanks... you have given me a clear picture... Cheers, yenonn |
glad to help and hope it works out.
*note to self: must take on java one of these days. |
All times are GMT -5. The time now is 04:38 AM. |