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? bin sudo chmod 755 *.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.
- Chmod-r 777 Folername, get folder 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.68using catalina_home: /Users/ Yp/documents/workspace/apache-tomcat-7.0.68Using CATALINA_ TMPDIR: /users/yp/documents/workspace/apache-tomcat-7.0< Span class= "Hljs-number" >.68/tempusing jre_home: /library/java/javavirtualmachines/jdk1 .8.0_40.jdk/contents/homeusing CLASSPATH: /users/yp/documents/workspace/apache-tomcat-7.0.68/bin/bootstrap.jar:/users/yp/documents/workspace/apache-tomcat-< Span class= "Hljs-number" >7.0.68/bin/tomcat-juli.jartomcat started.
/span>
Visit http://localhost:8080/
Third, close
./shutdown. Sh
Mac command line starts Tomcat