1. Download Tomcat
http://tomcat.apache.org/download-80.cgi
Download the zip package, unzip it and put it to any address, in this case the /users/guqiang/tomcat/apache-tomcat-8.5.8/
2. Configure Tomcat
Using the terminal
Enter Pico. Bash_profile carriage return;
Enter export path= $PATH:/user/guqiang/tomcat/apache-tomcat-8.5.8/bin
After the input is complete, click: control+x;
Click y to save;
Click Enter to exit the edit;
3. Start Tomcat
Startup.sh in the bin directory where Tomcat is running
/users/xxx/tomcat/apache-tomcat-8.5.8/bin/startup.sh
See Tomcat started. It means that Tomcat started successfully.
If the word "Permission denied" appears after startup.sh, you will need to set permissions on this directory:
Start Terminal: Enter sudo chmod 755 xxx/bin/*.sh (XXX Indicates the path you tomcat put to) enter;
4. Verify that Tomcat is started
Open your Safari, then enter the URL http://localhost:8080/
If you can open the Tomcat home page correctly, the Tomcat configuration starts successfully:
Installing and configuring Apache Tomcat in Mac Systems