1. Download:
Download the latest Tomcat binaries (note: Mac version of the. GZ package) from the Apache official website (http://tomcat.apache.org/)
2, the above binary package after decompression renamed Tomcat, and copied to the/LMHGFKK directory 3, modify the permissions mode one: Check the Tomcat folder, Command+i Open Introduction, modify file permissions. Mode two: Open terminal, input sudo chmod 755/library/tomcat 4, execute startup.sh file in/lmhgfkk/tomcat/bin directory
In the terminal input command: sudo sh startup.sh or sudo./startup.sh start command starts Tomcat
In the terminal input command: sudo sh shutdown.sh or sudo./shutdown.sh Stop command to close Tomcat
5. Verify that Tomcat is installed successfully
After you start Tomcat, open http://localhost:8080 to see if Tomcat has started. 6. Set the environment variable for tomcat: ① terminal inputVI. Bash_profile② inputExport Path=${path}:/users/lmhgfkk/tomcat/bin③ Update the configuration of the environment variable source. Bash_profile④ Validation is successful, the input $path in the terminal is displayed as follows-bash:/usr/local/bin:/usr/bin:/b In:/usr/sbin:/sbin:/users/keso/library/tomcat8/bin:no such file or Directory⑤ open the Tomcat server directly after opening the terminal input startup.sh SHUTDOWN.SH shut down the server "Supplemental---terminal input startup.sh, startup.sh after a similar" Permission denied ", this time need to set the directory permissions: input sudo chmod 755 Library /tomcat8/bin/*.sh Enter, set the read and write execution permission of the file; sudo is usually the system Super Admin 755 on behalf of the user to the file has read, write, execute permissions, the same group other people have the rights to execute and read, no write permission, the other user's permissions and the same group of people permissions. 777 stands for, User,group, others, both read and write and execute permissions. The lookup Tomcat version number
Tomcat provides a way to query its version number, and to query the version number of Tomcat, you must know the exact directory where Tomcat resides.
For example:
The full path to the Bin folder in the directory where Tomcat is used is:/lmhgfkk/tomcat/bin open terminal (Terminal), enter command: sh/lmhgfkk/tomcat/bin/catalina.sh version Because my Mac is already configured with Tomcat's environment variables, open the terminal to enter catalina.sh version directly
Mac Download installation configuration tomcat