[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
Categories: America, apple, chrome, google, Uncategorized


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