Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Automating starting/stopping Tomcat

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Automating starting/stopping Tomcat

    Assuming you've installed the standard RPM from Apache you should find a directory /etc/tomcat4. In this directory is the configuration file tomcat4.conf -- you can specify the what you need to there. Alternately, you can create a quick script in /etc/profile.d called java.sh and specify the environmentals there like shown. Finally, use service start tomcat4 and service stop tomcat4 to start end end respectively the tomcat server.
    Code

  • #2
    Automating starting/stopping Tomcat

    Assuming you've installed the standard RPM from Apache you should find a directory /etc/tomcat4. In this directory is the configuration file tomcat4.conf -- you can specify the what you need to there. Alternately, you can create a quick script in /etc/profile.d called java.sh and specify the environmentals there like shown. Finally, use service start tomcat4 and service stop tomcat4 to start end end respectively the tomcat server.
    Code

    Comment


    • #3
      Automating starting/stopping Tomcat

      I'm confused on a couple of points. When you say "Assuming you've installed the standard RPM from Apache", are you referring the Apache web server or Tomcat? I've got Tomcat setup to run standalone so I assume this is why I don't have a /etc/tomcat4 directory and any service scripts. I added the java.sh script to profile.d and called the /opt/tomcat/bin/startup.sh from cron and got the same result. What am I missing (other than Linux admin skills)?

      Comment


      • #4
        Automating starting/stopping Tomcat

        I've got a Redhat Linux (7.3) box running Tomcat 4 standalone. I'm trying to setup some scripts to coordinate startup/shutdown with our AS/400's IPL. I setup two scripts to run as cron jobs to shutdown tomcat before the IPL and restart after, but they keep failing because they cannot find the JAVA_HOME environment variable. I setup the environment variables in the .bashrc, and in frustration I added them to /etc/profile with the same result. The scripts work fine from the command line, but I assume thery are failing because cron doesn't read .bashrc or profle. Is there any other place I set environment variable so they'll be visible system wide(without reading .bashrc or profile)? Is it possible to drop a script in the init.d directory to start the server when the machine comes up? Thanks Tony

        Comment


        • #5
          Automating starting/stopping Tomcat

          That's what I get for writing a reply while sleepy! Once I reread what I posted I could see your confusion. Rather than drag this out via this forum, how about contacting me at blkline@attglobal.net so that I can get your e-mail address. I'll shoot you back my phone number and I can talk you through this without the delays of posting.

          Comment

          Working...
          X