I. Modification of authorization
Go to the Tomcat Bin directory and modify the authorization
? pwd/Users/yp/Documents/workspace/apache-tomcat-7.0.68/bin? sudo755 *.sh
- sudo is the system Super Administrator privilege.
- chmod changing the access mode of one or more files
- 755 means that the user has read, write, and execute permissions on the file, and other people in the same group have permission to execute and read, no write permission, and other users have the same permissions as the same group of people.
- 777 stands for, User,group, others, both read and write and execute permissions.
Second, start
To execute a startup command sudo sh ./startup.sh
:
? Bin sudo sh./startup.shusing catalina_base:/users/yp/documents/workspace/apache-tomcat-7.0.Using Catalina_home:/users/yp/documents/workspace/apache-tomcat-7.0.Using Catalina_tmpdir:/users/yp/documents/workspace/apache-tomcat-7.0./tempusing Jre_home:/library/Java/javavirtualmachines/jdk1. 8. 0_40.jdk/contents/homeusing CLASSPATH:/users/yp/documents/workspace/apache-tomcat-7.0./bin/bootstrap.jar:/users/yp/documents/workspace/apache-tomcat-7.0./bin/tomcat-juli.jartomcat started.
Visit http://localhost:8080/
Mac command line starts Tomcat