Installation and configuration of JDK and Tomcat under Mac

Source: Internet
Author: User
Tags gz file apache tomcat

I. Installation of the JDK under Mac

1. First detect if the MAC has already installed the JDK, enter Java or javac display instructions in the terminal, indicating that the JDK,JDK version of the query terminal has been installed type java-version, the terminal will return the version number of the JDK.

2. If the JDK is not installed, log in to http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html Select the appropriate version to download the JDK (MAC select Linux) installation.

Two. Installation and configuration of Tomcat under Mac

1. Download the full tar.gz file package for MAC version to the official Apache homepage. Unzip and copy the extracted files to the/library (or repository) directory and name Tomcat, and the other directories are available.

2. Modify Directory Permissions: Open the Mac terminal, type sudo chmod 755/library/tomcat/bin/*.sh in the terminal or direct CD to the bin directory type sudo chmod 755 *.sh then press ENTER, Enter the user's password (this password does not show anything when entered) enter

1?? sudo for system Super Administrator privileges

2?? chmod changing the access mode of one or more files

3?? 755 means that the user has read, write, and execute permissions on the file, and other people in the same group have permission to execute and read, no write permission, and other users have the same permissions as the same group of people.

3. Start Tomcat: Enter sudo sh startup.sh on the command line

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, enter http://localhost:8080/return, if you see Apache Tomcat, indicates that Tomcat has been successfully run

5. Enter command in terminal sudo sh/library/tomcat/bin/shutdown.sh or CD to bin directory sudo sh shutdown.sh enter to close Tomcat

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