This article is based on the instructions in http://wolfpaulus.com/journal/mac/atat7.
How to configure Tomcat 7 in Lion
1. Install JDK
Mac OS X from Lion no longer pre-install JDK, You need to download the installation (http://support.apple.com/kb/DL1421) after installation, in Applications> Utilities> Java Preference should be able to see 32/64 two versions of JDK, start Terminal and use java-version to view the relevant version information.
2. Download Tomcat
Download the related compressed package from the Tomcat project homepage, decompress the package, and go ~ /Under Downloads, find the corresponding decompressed file apache-tomcat-7.0.20
3. Tomcat configuration
Move Tomcat to the usr/local folder
Sudo mkdir/usr/local # create usr/local folder
Sudo mv ~ /Downloads/apache-tomcat-7.0.20/usr/local # Move and decompress the folder to usr/local
Create a Symbolic Link for Tomcat to (/Library/Tomcat)
Sudo ln-s/usr/local/apache-tomcat-7.0.20/Libray/Tomcat
Set ownership for Symbolic Link
Sudo chown-R <Mac user name>/Library/Tomcat
Open shell access permissions under Tomcat
Sudo chmod + x/Library/Tomcat/bin/*. sh
Then you can start the Tomcat service through Library/Tomcat/bin/startup. sh.
We recommend that you download Tomcat Controller to control Tomcat startup and shutdown through a simple UI tool.
In the Home Directory of Tomcat Controller, enter
/Library/Tomcat