You are here: TWiki > Guides Web > SoftwareInstallations > InstallTomcat r4 - 29 Mar 2006 - 22:40 - JesseSuen


Start of topic | Skip to actions

Installing Tomcat on Solaris 10

  1. Download current version of Tomcat:
http://tomcat.apache.org/download-55.cgi apache-tomcat-5.5.15.zip

  • Unzip to desired directory. A good place to install it is in the /opt/ directory.
# cd /opt/
# unzip apache-tomcat-5.5.15.zip

  • Make a symbolic link in the /opt/ to this directory to allow for easy upgrades.
# ln -s /opt/apache-tomcat-5.5.15/ tomcat

  • Set executable permissions on scripts
# cd /opt/tomcat/bin
# chmod +x *.sh

  • In order to allow people to view your pages without the :8080 port, edit the /opt/tomcat/conf/server.xml file and change the connector port from 8080 to HTTP Server port 80. The line should look like this:
<Connector port="8080" maxHttpHeaderSize="8192"
  • WARNING: Since you are using a port below 1024, the server must always be started as root or someone with root privileges. This is potentially insecure. If you would like to run it as a tomcat user, follow these instructions:
  • Create a tomcat user:
# groupadd tomcat
# useradd -g tomcat -d /opt/tomcat tomcat
# passwd tomcat
# chown -R tomcat:tomcat /opt/tomcat
# chown -R tomcat:tomcat /opt/apache-tomcat-5.5.15

  • To start tomcat everytime your machine boots up, create a daemon script: /etc/rc3.d/S99tomcat.
#!/sbin/sh

JAVA_HOME=/usr/java
CATALINA_HOME=/opt/tomcat

export JAVA_HOME CATALINA_HOME

case "$1" in

start)
   $CATALINA_HOME/bin/startup.sh
   ;;

stop)
   $CATALINA_HOME/bin/shutdown.sh
   ;;

restart)
   $CATALINA_HOME/bin/shutdown.sh
   $CATALINA_HOME/bin/startup.sh
   ;;

*)
   echo "Usage: $0 {start|stop|restart}"
   exit 1
   ;;

esac

References

-- JesseSuen - 03 Mar 2006

Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r4 < r3 < r2 < r1 | More topic actions
Guides.InstallTomcat moved from Guides.TomcatInstallation on 04 Mar 2006 - 05:00 by JesseSuen - put it back
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback