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