![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Linux Shell Question: how to print the shell script name ? | meili100 | UNIX for Dummies Questions & Answers | 3 | 07-01-2008 10:55 AM |
| Same ol "no acceptable cc found in $PATH" but I'm not clueless... just still a noob | SloYerRoll | UNIX for Dummies Questions & Answers | 4 | 10-22-2007 07:20 AM |
| installing unix on windows? clueless here | tnad | UNIX for Dummies Questions & Answers | 4 | 05-19-2007 01:46 PM |
| Suggestion: Alternative OS for Windows - Totally Clueless on Unix/Linux OS | genesisX | UNIX for Dummies Questions & Answers | 4 | 05-10-2007 08:35 PM |
| clueless...advice please! | andyh411 | UNIX for Dummies Questions & Answers | 1 | 01-21-2002 05:28 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
clueless - shell question
I am a Wintel Admin that was thrown to the wolves and told to admin a Sun 280R with Solaris 8 on it and I need some help.
I am running a Sun One ASP server and trying to get Java setup. I am trying to run a Sevlet program that requires the JAVA_HOME environment variable to be set. I am guessing that it should be set in a .profile file or something. The problems that I am running into are: 1. I am logging in as root and there is no .profile or similar file in the "root" directory (as root does not have a home folder) 2. I am also supposed to add the path to the path statement - I can not find that either. (boy do I feel pathetic) 3. It seems that the syntax that I have found for these strings are for C shell, Bourne or Korn shells but the default shell for root seems to be -sh. Someone please throw me a bone here. I have been searching the net all day and I am not getting anywhere. Thanks |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
You can find 'example' .profile in /etc/skel/
local.cshrc local.login local.profile Copy local.profile to .profile into / for root (or you could change root to have a home directory (/root will work - don't put it on anything but / ). Change the .profile permissions with the chmod command and ownership with chown command (see the man page for each). Read the man page on sh (search for .profile) and if needed, on man ( # man man). Adding the JAVA_HOME to the PATH can be done in the .profile PATH="/usr/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/java" (Not sure if they are looking for /usr/java or /usr/java/bin for that one - probably bin) Setting JAVA_HOME: # JAVA_HOME=/usr/java ; export JAVA_HOME or # export JAVA_HOME=/usr/java |
|
#3
|
|||
|
|||
|
Thanks,
I tried # JAVA_HOME=/usr/java ; export JAVA_HOME and it seemed to take it but it still does not seem to be defined. I am trying to install Tomcat and everytime I try to run startup.sh I get an error that the JAVA_HOME environment variable needs to be defined. Is there any way to list the current environment variables to see if it is set or not? |
|
#4
|
|||
|
|||
|
if you are setting the JAVA_HOME in a script, You need to remove the # from the beginning of the line. It's commenting out whatever follows it on that line.
to see what a specific variable is defined as: echo $VARIABLE so in your case you would do: echo $JAVA_HOME if it comes out blank, it is not defined. |
|
#5
|
||||
|
||||
|
The example given ( # export JAVA_HOME=/usr/java ) was done as root from the command line. The # is the prompt you should see after signing in as root or su -. Next time I'll try to remember to put what you need to type in bold.
|
|
#6
|
|||
|
|||
|
No, I knew that the # was a SU prompt.
It worked just like both of you "said" it would. I checked and the variable is in fact set but Tomcat keeps giving me that error. I will look into the Tomcat side of things and see what I can find out. Thanks for all your help. After this hurry-up project that I am trying to figure out, I plan to just plant myself on the usenet unix & Solaris groups until I locate a clue. Thanks again. |
|
#7
|
|||
|
|||
|
One more quick question (I hope)
I set the PATH in the .profile in / for root but after looging out and logging in again I get an error when I open up a command prompt. When I open the console it says; -sh PATH=...(the path statement that I added)... is not an identifier. I tried typing echo $path I thought maybe that would print the current path. It just came back to the prompt. Thanks |
|||
| Google The UNIX and Linux Forums |