Installation and configuration of Tomcat under Mac

Source: Internet
Author: User
Tags gz file administrator password apache tomcat

Source: http://www.cnblogs.com/freeyiyi1993/p/3436368.html

1. To the official Apache homepage, download the full tar.gz file package for MAC version. Unzip the copy to the/library directory and name Tomcat, and the other directories are available.

2, modify the directory permissions to the terminal input sudo chmod 755/library/tomcat/bin/*.sh 3, start Tomcat Press ENTER after the prompt for the password, please enter the 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. Configuration TomcatStartup script:

Use the text editor to add the following code:

#!/bin/bash

Case $ in
Start
sh/library/tomcat/bin/startup.sh
;;
Stop
sh/library/tomcat/bin/shutdown.sh
;;
Restart
sh/library/tomcat/bin/shutdown.sh
sh/library/tomcat/bin/startup.sh
;;
*)
echo "Usage:start|stop|restart"
;;
Esac

Exit 0

Save the file as Tomcat, lowercase with no suffix. Give File Execution permissions:

chmod 777 Tomcat

。 Place this file in the path contained in the terminal, such as/usr/bin, and then simply enter Tomcat start and Tomcat stop in the terminal to enable Tomcat.

The shortcut commands are as follows:

1) Tomcat start

2) Tomcat stop

3) Tomcat restart

Installation and configuration of Tomcat 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.