Mac Tomcat installation and configuration

Mac Tomcat installation and configuration

1. Search engine: search (such as Bing or Baidu) in the "Tomcat", the first result is the Tomcat official address:

 
image

2. On the left select "Tomcat8" or "Tomcat9", I am here to "Tomcat8" as an example:

 
image

Download the respective package 3. Zip:

 
image

4. The new user in the current directory, a java Finder (follow-up can be installed Tomcat, Maven, MongoDB like this path), then create a new directory in the Tomcat java directory, the downloaded after extracting zip file to cut the Tomcat directory, Tomcat on the installation was successful.

 
image

5. Shell terminal with Mac command cd turn into bin directory under the Tomcat installation directory:

CD java

cd Tomcat

cd apache-tomcat-8.0.33

cd bin

Then use the "ls -la * .sh" to see the shell script in the bin directory, where "startup.sh" used to start Tomcat, "shutdown.sh" "to close the Tomcat:

 
image

6. By default, you are not authorized to perform this operation, we need authorization to return with cd .. parent directory:

 
image

7. Use "chmod -R u + x ./bin" command authorization, then go to the bin directory again to view the shell script:

 
image

8. At this point of privilege "-rwxr" representatives have execute permissions, enter "./startup.sh" start Tomcat (where "./" representative of the current directory):

 
image
  1. Access in the browser "localhost: 8080", see the Tomcat interface, then the Tomcat has started successfully:
 
image

10. If you perform in the terminal ".shutdown.sh" shut down Tomcat, then refresh your browser, you will find inaccessible. Here we use the Shell command in the terminal open, close Tomcat, as well as user authorization, more commonly Shell command, you can refer to: Common Shell command under Mac 

Guess you like

Origin www.cnblogs.com/DLuob/p/11967943.html