Procedure
Download tomcat. My tomcat is 7.0.12.
Decompress the folder and rename it Tomcat
Move this folder to your favorite directory, such as/Library
Run startup. Sh in/library/tomcat/bin.
Open http: // localhost: 8080 to check whether tomcat has been started.
Solve the File Permission problem: sudo chmod 755/library/tomcat/bin/*. Sh
Define java_home and add: Export java_home =/library/Java/home in/etc/profile.
Configuration
Add the appropriate location in the/library/tomcat/CONF/tomcat-users.xml File
Role rolename = "Tomcat"/>
< Role Rolename = "Role1" />
< Role Rolename = "Manager" />
< Role Rolename = "Admin" />
< Role Rolename = "Admin-Gui" />
< Role Rolename = "Admin-script" />
< Role Rolename = "Manager-Gui" />
< Role Rolename = "Manager-script" />
< Role Rolename = "Manager-JMX" />
< Role Rolename = "Manager-status" />
< User Username = "Admin" Password = "Admin"
Roles = "Admin, Manager, role1, tomcat, admin-Gui, admin-
Script, Manager-Gui, Manager-script, Manager-JMX, Manager-status" />
Now, you can use the admin username and password to perform Web management.