The knowledge points involved in this article:
- 1.Tomcat versions vary
- 2. Download the Tomcat
- 3. Tomcat installation
- 4. Start Tomcat
- 5. Stop Tomcat
1. Tomcat versions vary
For details on the differences between versions, see the official website
2. Download the Tomcat
Step: Log in to the official website -> download the corresponding version
2.1 the loginwebsite
2.2 Selecting the downloaded version (I chose Tomcat8)
Note: The second step for MAC is to download the zip package in the red box. Windows selects the corresponding zip package in the Core directory according to its system bit
2.3 Download complete!
3. Tomcat installation
Unzip the downloaded package -> place the Tomcat folder in a directory easy to find (suggest Library) -> Change the executable permissions -> Done!
3.1 Decompress the downloaded Tomcat package and store it in the Library directory
Note: If you can’t find the Library directory, type CD /Library/ && open on the command line. You can open this directory.
3.2 Modifying Executable Rights
Open the terminal and enter sudo chmod 755 Library/apache-tomcat-8.5.59/bin/*.sh
Note :(apache-tomcat-8.5.59 -> is the name of the tomcat folder after downloading, which can be modified according to the actual situation)
Note: Sudo is usually the super administrator of the system. 755 indicates that the user has the permission to read, write, and execute the file. However, other users in the same group have the permission to execute and read the file but not to write the file.
3.3 Installation Complete!
4. Start Tomcat
Terminal startup -> Test startup effect -> Startup success!
Start tomcat 4.1
Open theterminal
The inputSudo sh/Library/apache tomcat -- 8.5.59 / bin/startup. Sh
4.2 Test using a Browser
Open your browser and enter the URL: http://localhost:8080/
If you see this page, the startup is successful!
5. Stop Tomcat
Open theterminal
The inputSudo sh/Library/apache tomcat -- 8.5.59 / bin/shutdown. Sh
Shutdown successful!