MAC installation and configuration using Tomcat

1. Download and install Tomcat

  1. Open Tomcat official website

  2. Select the Tomcat version you need to use
    Various versions of Tomcat.png

  3. Download the specified version compressed packagetar.gz and select the file as shown below
    Download the specified version compressed package.png

  4. Unzip the Tomcat compressed package file

  5. Rename the decompressed package to Tomcat (to facilitate subsequent file operations, you can also omit this step) and copy it to the /Library(resource library) directory


2. Tomcat use

  1. TerminalOpen the directory in Tomcat through the terminal bin, and the operation command is as follows
cd ~/Library/Tomcat/bin

  1. Authorize the use binof all operations in the Tomcat directory. The operation commands are as follows
sudo chmod 755 *.sh

After pressing Enter, you need to enter the administrator password

  1. Start Tomcat, the operation command is as follows
 sudo sh ./startup.sh

You can see the terminal displayTomcat started.

  1. Open the browser and visit localhost:8080. If the page is as follows, it means that Tomcat has been started .
    Local Tomcat page.png

  2. Close Tomcat, the operation command is as follows ( first switch the directory in Tomcatbin )

cd ~/Library/Tomcat/bin
sh ./shutdown.sh


Guess you like

Origin blog.csdn.net/qq_22255311/article/details/129032163