java -version
java version '1.8.0_66'
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
JAVA_HOME
is an important environment variable, not just for Tomcat, and it’s important to get it right.vi ~/.profile
JAVA_HOME
and CATALINA_HOME
variables:export JAVA_HOME=/Library/Java/Home
/Library
, in order to facilitate the use, rename the folder to 'Tomcat'
sudo chmod 755 /Library/Tomcat/bin/*.sh
sudo sh startup.sh
http://localhost:8080/
, press Enter.http://localhost:8080
. If you wish to make stopping Tomcat 9, use this command:sudo sh /Library/Tomcat/bin/shutdown.sh