How to install Tomcat under the Mac OSX system

Source: Internet
Author: User
Tags administrator password tomcat server apache tomcat

1. Download tomcat (address: tomcat.apache.org), select the appropriate version (choose 6.0.35 here), click "Download", then click "tar.gz" under "core" on the new page (6.2MB)

2. Unzip the Tomcat to directory:/library, and change the folder name from "apache-tomcat-6.0.16" to "Tomcat"

3. Open "Application (Application)"--"terminal (Terminal)", enter the following two commands:
sudo chmod 755/library/tomcat/bin/*.sh
After pressing ENTER, you will be prompted for your password, please enter your administrator password. Then type and enter:
sudo sh startup.sh
The following prompt indicates that the installation and operation succeeded:
Using catalina_base:/library/tomcat
Using Catalina_home:/library/tomcat
Using Catalina_tmpdir:/library/tomcat/temp
Using Jre_home:/system/library/frameworks/javavm.framework/versions/currentjdk/home

4. Open the browser and enter http://localhost:8080/
If you see Apache Tomcat after the carriage return, it means that Tomcat has been successfully run

5. Enter the command in the terminal sudo sh/library/tomcat/bin/shutdown.sh enter to turn off Tomcat.

6.IP Address filtering
Tomcat uses a mechanism called valves (valve) to filter IP addresses. Common valves (valves) are removteaddrvalve and can be filtered by IP address. Valves can be applied at 3 levels: Engin,host,context.
If you only allow native addresses (localhost) to access the Tomcat server, you can use the following statements in Server.xml:
<engine name= "Catalina" defaulthost= "localhost" debug= "0" >
<valve classname= "Org.apache.catalina.valves.RemoteAddrValve"
allow= "127.0.0.1,0:0:0:0:0:0:0:1%0,::1"/>
Tomcat uses Java.util.regex to match the IP address.


Go from Network

How to install Tomcat under the Mac OSX system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.