Tomcat Configuration
1. Download the Tomcat configuration package on the website: http://tomcat.apache.org/download-70.cgi
2. After the download, the extracted entire folder renamed: Apachetomcat (this name casually), and then placed in a file directory, I put it in:/users/computer user name/library;
3. Open the terminal into the Bin folder directory in the Apachetomcat file;
4. Then start Tomcat, terminal input:./startup.sh, if prompted:-bash:./startup.sh:permission denied, the startup fails, requires terminal input: chmod u+x *.sh authorization;
5. After authorization again terminal input:./startup.sh, if shown, the start is successful;
6. Check whether the boot is successful, open in the browser: http://localhost:8080 "localhost can be replaced with your IP address", if the page is displayed, it has been started normally;
7. Close Tomcat, or in the Bin folder directory, terminal input:./shutdown.sh
folder Directory
1) Bin: Store Tomcat command
2) Conf: Storing Tomcat configuration information, the Server.xml file inside is the core configuration file
3) Lib: Jar packages and technical support packages (such as Servlets and JSPs) that support the operation of the Tomcat software
4) Logs: Log information at runtime
5) Temp: Temp directory
6) WebApps: Shared resource file and Web App directory
7) Work:tomcat running directory. The temporary files generated by the JSP runtime are stored here.
Modify Port number
The default port of the server is 8080, or it can be changed to a custom port, to avoid conflicts with the system port, must be set to more than 1024, for example, set to 8888
Open the Server.xml file under Apachetomcat's conf directory with Notepad, and change the port value 8080 of the following statement to a custom port number: (for example, 8020)
<connector port= "8020" protocol= "http/1.1"
connectiontimeout= "20000"
redirectport= "8443"/>
After restarting the server, input localhost:8080 is not valid, you need to enter localhost:8020 to open the server interface.
Password Settings
In the Tomcat-users.xml file of the Conf directory </tomcat-users> add the following code:
<role rolename= "Manager-gui"/>
<user username= "Tomcat" password= "Tomcat" roles= "Manager-gui"/>
Because the XML tags are closed, and you want to restart Tomcat. Re-open http://localhost:8080 to the Tomcat master interface, click on the Manager app button account and password enter Tomcat to login
Related reference: http://blog.csdn.net/feng2qing/article/details/60968548
Ios-mac configuring Tomcat "Mac Environment configuration Tomcat"