Results 1 to 3 of 3

Thread: Not able to set tomcat enviroment variable

  1. #1
    Junior Member
    Join Date
    Oct 2010
    Thanked 0 Times in 0 Posts
    Rep Power

    Default Not able to set tomcat enviroment variable

    I am trying to run tomcat in my CentOS linux server but not able to do it.
    I have already installed the JDK and JRE in my server sucessfully and also added the enviroment variables
    export CATALINA_HOME=/home/strag/public_html/confluence
    export JAVA_HOME=/usr/java/jdk1.6.0_21
    export JRE_HOME=/usr/java/jre1.6.0_21

    to /etc/profile and bash profile.

    Now when i run the tomcat start command it gives following message

    Using CATALINA_BASE: /home/strag/public_html/confluence
    Using CATALINA_HOME: /home/strag/public_html/confluence
    Using CATALINA_TMPDIR: /home/strag/public_html/confluence/temp
    Using JRE_HOME: /usr/local/jre
    Using CLASSPATH: /home/strag/public_html/confluence/bin/bootstrap.jar
    ./ line 297: /usr/local/jre/bin/java: No such file or directory
    ./ line 297: exec: /usr/local/jre/bin/java: cannot execute: No such file or directory

    I have already set a different path for JRE_HOME but it shows the same path.
    Anyone please help me which file i have to change to set the variable permanently.

  2. #2
    Join Date
    Jul 2010
    Thanked 5 Times in 5 Posts
    Rep Power

    Default tomcat

    Which user runs tomcat? Is it root, or is it a "tomcat" system user?
    If it is root the export JAVA_HOME etc should be added in the /root/.bashc file
    If it is a tomcat system user, you can add the env variables in the script you use to launch tomcat.
    su - tomcat -c "export JAVA_HOME=...; /.../"

    However here I think the tomcat config may be the problem...
    How did you install tomcat?

  3. #3
    Senior Member
    Join Date
    Jul 2006
    India, Delhi
    Thanked 1 Time in 1 Post
    Rep Power


    try getting logout and again login then check "env"

    if fails... just copy and paste the changed line in /etc/profile for jre home.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [Solved] Tomcat-redirection from HTTP to HTTPS
    By arvnix in forum Coding in General
    Replies: 5
    Last Post: 30th August 2010, 11:46 AM
  2. Tomcat Service in Nagios
    By shahid78 in forum CentOS / RHEL / Fedora
    Replies: 3
    Last Post: 12th August 2010, 12:09 AM
  3. Tomcat status monitoring with Nagios
    By samengr in forum Web servers
    Replies: 3
    Last Post: 23rd October 2009, 04:16 PM
  4. mrtg apache tomcat
    By blackj in forum CentOS / RHEL / Fedora
    Replies: 1
    Last Post: 8th August 2008, 12:14 AM
  5. Nagios on tomcat?
    By Vince-0 in forum Linux software
    Replies: 0
    Last Post: 22nd April 2008, 01:30 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts