Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3250A10C00 for ; Wed, 5 Feb 2014 01:09:28 +0000 (UTC) Received: (qmail 39054 invoked by uid 500); 5 Feb 2014 01:09:23 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 38950 invoked by uid 500); 5 Feb 2014 01:09:22 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 38941 invoked by uid 99); 5 Feb 2014 01:09:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Feb 2014 01:09:22 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of neven.cvetkovic@gmail.com designates 209.85.215.174 as permitted sender) Received: from [209.85.215.174] (HELO mail-ea0-f174.google.com) (209.85.215.174) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Feb 2014 01:09:17 +0000 Received: by mail-ea0-f174.google.com with SMTP id b10so4670833eae.5 for ; Tue, 04 Feb 2014 17:08:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=7zXUwCPAi3AEgNwKJvBFbtT9r83BI0GvpW089EhpGK8=; b=QlGk8Xr0AbJpe3Ic7Mkm2PBbtHK3bxAQ1MBDs7fIIRJ/K4qdexoPTsFiXbwqSIvMlh THCmK1QmKYZZ5LPIbGYqekado98n70rAhjUQWHBJx5aUt+NmkxlQcum6KM8TYy//AKBR ADAMVwMCuc3qD9MjTWM6eKt69BhEY1+NXSma7fJv2ZjbYbPoUamaHc2CQ1+Prs7IXaN5 t03ZjEq6Kgh3keZjqtjQrM5PjvJSxll2HqDNmhUh4L4CRiswTPwd8MJX8CmxK5bCPFYh wo1+8jOKqSvAWXGO9kHd5cndIhGnytLr820dnZARg3uKAlzjNRh5XQR1Q2nmWYDu4n46 FIkg== X-Received: by 10.14.88.131 with SMTP id a3mr6688004eef.64.1391562536978; Tue, 04 Feb 2014 17:08:56 -0800 (PST) MIME-Version: 1.0 Received: by 10.14.115.200 with HTTP; Tue, 4 Feb 2014 17:08:36 -0800 (PST) In-Reply-To: References: <52F148BF.9030701@apache.org> From: Neven Cvetkovic Date: Tue, 4 Feb 2014 20:08:36 -0500 Message-ID: Subject: Re: Installing tomcat 6 To: Tomcat Users List Content-Type: multipart/alternative; boundary=001a11c2a018b30d7f04f19e66f9 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c2a018b30d7f04f19e66f9 Content-Type: text/plain; charset=ISO-8859-1 On Tue, Feb 4, 2014 at 6:22 PM, Franz <169101@gmail.com> wrote: > > I assume you followed instructions for installation: > > > > > http://sourceforge.net/projects/openemm/files/OpenEMM%20documentation/Documentation%20(latest%20versions) > > > > > > > After you get it working with catalina.sh run, you probably want to do > the > > following as well: > > 1) setup JAVA_HOME somewhere in the profile scripts (e.g. create > > /etc/profile.d/java.sh file) > > > > yes, unfortunately openemm tutorial says nothing about that. Now there is > not java.sh file there. So you mean creating a java.sh file with inside > only: > > export JAVA_HOME=/opt/openemm/java > > Yes, something along those lines. Edit a new file in /etc/profile.d/java.sh, e.g. # # /etc/profile.d/java.sh # export JAVA_HOME=/opt/openemm/java export PATH=${PATH}:${JAVA_HOME}/bin - This script does two things: 1) sets $JAVA_HOME for your JDK 2) updates $PATH so your $JAVA_HOME/bin is on the PATH (i.e. Java can be invoked from any directory) > and what does it? Does it setup JAVA_HOME once and for all? > > 2) configure tomcat as a centos service (chkconfig+rc.d script), so it > > starts up automatically when you reboot your system. > > > > This seems complicated too. Does it means preparing a file tomcat.sh in > /etc/rc.d containing: > > /opt/openemm/tomcat/bin/startup.sh > > Yes, something like that ... 1. Create /etc/rc.d/init.d/tomcat.sh (I will see to find some examples), here's a minimal example: #!/bin/bash # # /etc/rc.d/init.d/tomcat.sh # # description: Tomcat Startup, Stop, Restart Script # processname: tomcat # chkconfig: 234 20 80 # Test if JAVA_HOME is already set if [ "x$JAVA_HOME" = "x" ] then export JAVA_HOME=/opt/openemm/java export PATH=$PATH:$JAVA_HOME/bin fi # Set Tomcat home directory CATALINA_HOME=/opt/openemm/tomcat case $1 in start) sh $CATALINA_HOME/bin/startup.sh ;; stop) sh $CATALINA_HOME/bin/shutdown.sh ;; restart) sh $CATALINA_HOME/bin/shutdown.sh sh $CATALINA_HOME/bin/startup.sh ;; esac exit 0 - here you would probably want to add a more sophisticated script that adds /var/run/tomcat/id PID file, kills process if it hangs, etc... - Can anyone else provide some of their example scripts? 2. Add a tomcat service, e.g. chkconfig -add tomcat chkconfig tomcat on 3. Test your service, e.g. service tomcat stop service tomcat start service tomcat restart --001a11c2a018b30d7f04f19e66f9--