- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Tomcat Start On Boot: Final Question
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2004 08:49 AM
03-18-2004 08:49 AM
A while back I posted a question about getting the Non-HP-Depot version of Tomcat 4.0.6, which is from Apache Software Foundation, to automatically start on reboot.
At the time, everyone noted the importance of getting the environment & path variables set properly, which is where I discovered that an old version of java (/opt/java-1.3/jre) was being called from /sbin/init.d/tomcat. The proper version is /opt/java1.4.
While trying to solve this from a purely sysadmin standpoint, it was revealed to me that if I called out my environment variables in /etc/rc.config.d/tomcat instead of /sbin/init.d/tomcat, all the better.
My question is this, can I leave the syntax as follows using "export", or should I be using "set env"?
====================
PATH=/usr/sbin:/usr/bin:/sbin:/opt/tomcat4.0.6/bin
export PATH
export JAVA_HOME=/opt/java1.4
export BASEDIR=/opt/tomcat4.0.6
export CATALINA_HOME=$BASEDIR
export JAVA_OPTS="Xms128m -Xmx256m"
export DISPLAY=node1.our.domain:0.0
Any input would be most appreciated!
-karlski
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2004 09:05 AM
03-18-2004 09:05 AM
SolutionFrom the sysadmin viewpoint, there is no need to change your export procedure.
I am anal, and break up my commands as follows:
JAVA_HOME=/opt/java1.4
export JAVA_HOME
Thats just because I'm a little mental, but once had a problem with the single line export establish statement.
/etc/rc.config.d/ is for environment variables /sbin/init.d is for scripts that use those variables
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2004 10:46 AM
03-18-2004 10:46 AM
Re: Tomcat Start On Boot: Final Question
PATH=/usr/sbin:/usr/bin:/sbin:/opt/tomcat4.0.6/bin
export PATH
export JAVA_HOME=/opt/java1.4
export $JAVA_HOME
export CATALINA_HOME=/opt/tomcat4.0.6
export $CATALINA_HOME
export JAVA_OPTS="Xms128m -Xmx256m"
export DISPLAY=node1.our.domain:0.0
1. Should I be using the dollar sign as I have above, or should I remove it?
2. I notice my PATH doesn't include JAVA_HOME like it does CATALINA_HOME, should I add it like I did Java?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2004 10:56 AM
03-18-2004 10:56 AM
Re: Tomcat Start On Boot: Final Question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2004 11:25 AM
03-18-2004 11:25 AM
Re: Tomcat Start On Boot: Final Question
Guess what, I just did a ps m-ef | grep java to check what java version to really use, and voila, it notes /opt/java1.3/jre/bin, so I added it, removed the $ signs, and now the final question.
Is it OK to just use these in /etc/rc.config.d/tomcat? Or is it essential to keep them in /sbin/init.d/tomcat, I notice Stephen responded to this, just getting my comprehension down :P
Now, we have an /etc/rc.config.d/tomcat that says:
PATH=/usr/sbin:/usr/bin:/sbin:/opt/tomcat4.0.6/bin:/opt/java1.3/jre/bin
export PATH
export JAVA_HOME=/opt/java1.3/jre/bin
export JAVA_HOME
export CATALINA_HOME=/opt/tomcat4.0.6
export CATALINA_HOME
export JAVA_OPTS="Xms128m -Xmx256m"
export DISPLAY=node1.our.domain:0.0
How's it lookin from the laureled heights?
-karlski