Apache Tomcat installation configuration under Mac

Source: Internet
Author: User
Tags apache tomcat

Java web If you know a little bit, is generally not unfamiliar to Tomcat, Apache is a normal server, itself only support HTML is a normal Web page, can be supported by the plug-in PHP, and can be connected with Tomcat (one-way Apache connection Tomcat, This means that Tomcat resources can be accessed through Apache. Tomcat cannot fetch access to Appache resources). Appache only supports static web pages, but dynamics like asp,php,cgi,jsp need to be handled by Tomcat. I downloaded it yesterday. Tomcat thought it would be finished soon, but still encountered some pits, briefly introducing the installation process:

1. Download Tomcat, address http://tomcat.apache.org/download-80.cgi

Mac Download zip and tar.gz All line, I downloaded is tar.gz

2. After compression directly copied to the repository, the compressed folder name is TOMCAT8, the specific location is as follows:

3. Open terminal, enter the following command library/tomcat8/bin/startup.sh, enter the localhost:8080 in the browser, you can see the effect:

< Span id= "1_3" > If you encounter a prompt no such file or directory error prompt , you need to execute sudo chmod 755 library/tomcat/bin/*.sh, Then re-execute the startup.sh, if you want to stop tomcat, directly execute shutdown.sh. < Span class= "HL1" > when Sudo is executed, You must use a user with a password. If each write path is troublesome, the environment variable needs to be set at this time.

4. Set the environment variables for Tomcat:

① input Touch Bash_profile (Pico Bash_profile also OK)

② Open Bash_profile open-e. Bash_profile (Nano Bash_profile also)

③ input Export path= $PATH:/users/keso/library/tomcat8/bin

④ updates the configured environment variable source. bash_profile

⑤ Verify success, enter $path in terminal

Shown below-bash:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/users/keso/library/tomcat8/bin:no such file or directory

5. Enter startup.sh in terminal, startup.sh similar to "Permission denied", this time need to set permissions on the directory: input sudo chmod 755 library/tomcat8/bin /*.sh Enter, set the file read and write execution permissions;

6. After the setup is complete, startup.sh will display the boot:

7. You need to use shutdown.sh to close;

Digression: sudo is usually the system Super Admin 755 on behalf of the user to the file has read, write, execute permissions, the same group of other people have the ability 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.

Apache Tomcat installation configuration under Mac

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.