A. Download tomcat
First to the Tomcat official website to download the installation package, the official website download address is as follows: http://tomcat.apache.org/download-70.cgi, please download the fly Windows version. Unlike the Windows operating system, there is no annoying registry.
Unzip the compressed package to any directory, and I'll store it under the/programfile/tomcat directory.
Two. Modify the authorization
Several running service programs in Tomcat end with *.sh and require authorization before running. Open the terminal and enter the following command:
Enter the following command:
sudo chmod 755/programfile/tomcat/bin/*.sh
Enter the password: Enter the password for the local account
Three. Start Tomcat service
First use the CD command to enter Tomcat's Bin directory, which commands the following:
cd/programfile/tomcat/bin/
To start the service command:
Start successfully, the following results appear:
Using catalina_base: /programfile/tomcat
using catalina_home: /programfile/tomcat
using Catalina_ Tmpdir:/programfile/tomcat/temp
Using jre_home: /system/library/java/javavirtualmachines/1.6.0.jdk/ Contents/home
Using CLASSPATH: /programfile/tomcat/bin/bootstrap.jar:/programfile/tomcat/bin/ Tomcat-juli.jar
Tomcat started.
If the result appears as above, it indicates that Tomcat started successfully
Four. Modification of Tomcat-related configuration
Open the/tomcat/conf/tomcat-users.xml file in Tomcat.
<tomcat-users>
<!--
note:by default, no user is included in the ' Manager-gui ' role required to
Opera Te the "/manager/html" Web application. If you are wish to use this app, you
must define such a user-the username and password are.
-->
<!--
note:the sample user and role entries below are wrapped in a comment and
thus are when Reading this file. Don't forget to remove
<!.. .. > that surrounds them.
-->
<!--
<role rolename= "Tomcat"/>
<role rolename= "Role1"/>
Username= "Tomcat" password= "Tomcat" roles= "Tomcat"/>
<user username= "Both" password= "Tomcat" roles= " Tomcat,role1 "/> <user username= role1" password= "Tomcat" roles= "
role1"/>-->
Rolename= "Manager"/>
<user username= "Tomcat" password= "root" roles= "manager"/>
</ Tomcat-users>
The default <role> are annotated, and this is added as follows:
<role rolename= "manager"/>
<user username= "Tomcat" password= "root" roles= "manager"/>
More configuration changes to see Tomcat related information
This time input http://localhost:8080/should be able to access, do Java Web development should be very familiar with, no longer discussed here