1. Download tomcat. I will download Tomcat 7.0.12,apache-atat-7.0.32.zip.
2. decompress the compressed file to the "/library" directory of the MAC system and rename the folder tomcat.
3. Modify the File Permission: sudo chmod 755/library/tomcat/bin/*. Sh
4. Run startup. Sh in/library/tomcat/bin.
5. Set the Administrator's account and password:
Edit "/library/tomcat/CONF/tomcat-users.xml" and add
<Role rolename = "manager"/>
<User Username = "Tomcat" Password = "XXXX" roles = "manager"/>
6. Open http: // localhost: 8080. If the following interface is displayed, Tomcat is successfully installed:
Note:
1. Execute the Script: startup. Sh, and an error is returned:
Neither the java_home nor the jre_home environment variable is defined
At least one of these environment variable is needed to run this program
Because the system does not install the Java environment, you only need to open the command line and enter: Java-version, the system will guide you to install the Java environment, you can directly install it.