1: First download Tomcat on official website (I chose the newest 9.0), http://tomcat.apache.org/
2: After the download is complete, unzip the package under/library/to use the shortcut key control+ space input/library
3: Open the Mac terminal program, modify the/library/tomcat user rights
Terminal operations
Input:sudo chmod 755/library/tomcat/bin/*.sh
Then you will be prompted to enter the password verification, enter the local password return
4: Find the/library/tomcat/conf/tomcat-users.xml file, open the code below to edit it inside
<role rolename= "Manager"/>
<user username= "Tomcat" password= "xxxx" roles= "manager"/>
5: Also in terminal program input: sudo sh/library/tomcat/bin/startup.sh
If the returned result is:
Using catalina_base:/library/tomcat
Using Catalina_home:/library/tomcat
Using Catalina_tmpdir:/library/tomcat/temp
Using Jre_home:/library/java/javavirtualmachines/jdk1.8.0_65.jdk/contents/home
Using CLASSPATH:/library/tomcat/bin/bootstrap.jar:/library/tomcat/bin/tomcat-juli.jar
The boot is successful, we enter it in the browser: http://localhost:8080 will pop up the following interface
MAC OX Configuration Tomcat Description