Home > America, apple, chrome, google, Uncategorized > [How to] Install Apache Tomcat on MacOsX

[How to] Install Apache Tomcat on MacOsX

There are a few steps to follow:

  • Download latest version of tomcat -> Apache Tomcat Homepage
  • Extract it and rename the folder to “Tomcat”
  • Now move it to /Library folder with this command (after “cd”ing to the folder before the unzipped one, apache version may changes)
    • mv apache-tomcat-6.0.26 /Library/Tomcat
  • Get a script to simplify tomcat starting and stopping
#!/bin/bash
case $1 in
start)
sh /Library/Tomcat/bin/startup.sh
;;
stop)
sh /Library/Tomcat/bin/shutdown.sh
;;
restart)
sh /Library/Tomcat/bin/shutdown.sh
sh /Library/Tomcat/bin/startup.sh
;;
*)
echo “Usage: start|stop|restart”
;;
esac
exit 0
  • Put it in a file named “tomcat” and move it to /usr/bin (“chmod +x tomcat” before run it)
  • Now set the system variable “JAVA_HOME” to “/Library/Java/Home” using $ENV preference panel (Simple)
  • Now use tomcat “tomcat start” and stop it with “tomcat stop”
Advertisement
  1. January 11, 2011 at 8:11 pm | #1

    ага, буду знать

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.