Software Required:
Jdk-8u45-macosx-x64 (Mac OS X x64). DMG
apache-tomcat-7.0.64
First, double-click the jdk-8u45-macosx-x64 (Mac OS X x64). dmg file to install it by default.
Second, download Tomcat. : http://tomcat.apache.org/download-70.cgi
Third, put the apache-tomcat-7.0.64 in any directory, the directory does not have Chinese. Path suggestions in/users/... Under
Test the JDK, enter Javac, Java, javadoc command under Terminal command, appear the help explanation text, explain the installation success
V. Configure the Tomcat environment variable (can also not be configured) slightly
Six, start TOMCAT,CD to the Tomcat installation path Bin directory, enter the startup.sh command, carriage return
Test Tomcat, enter http://localhost:8080 carriage return in the browser address bar, and see the JSP page with Tomcat, indicating that Tomcat started successfully
PS: When you start Tomcat, it is very likely that you will be prompted with the word "Permission denied", which requires us to set permissions on this directory:
Start Terminal: Enter sudo chmod 755 xxx/bin/*.sh (XXX Indicates the path of Tomcat installation)
To display the path of the folder you are browsing in the Finder bar:
Open the terminal and enter the following two commands:
Defaults Delete com.apple.finder _fxshowposixpathintitle;killall finder
To configure Tomcat:
Open terminal, enter Pico. Bash_profile return
add path= $PATH: /users/hehongbo/local/apache-tomcat-7.0.64/bin (here is the installation path for Tomcat)
After editing, control+x (save) Then: Y (Agree) enter
After the configuration is complete, you can start and close Tomcat directly in the terminal input startup.sh and shutdown.sh
Install JDK and Tomcat under Mac