If you meet an error message like the below, that means your HomeBrew has a shallow clone, and the new HomeBrew version needs to remove the shallow clone before use the brew command.
#APACHE TOMCAT 8 DOWNLOAD AND INSTALL INSTALL#
Open a terminal and run the command brew install tomcat, then it will start to install tomcat.If you do not has JDK installed, you can run the command brew install java to install it first.OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.212-b03, mixed mode) OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_212-b03) Before installing the Tomcat with HomeBrew you should make sure the JDK has been installed on your macOS with the java -version commands.If you find the above method is complicated, you can use HomeBrew to install tomcat directly.To stop tomcat, you can run the command.Click Enter key then you can see the apache tomcat home page. Now open a web browser, input in the URL address input box.Using CLASSPATH: /Users/zhaosong/Documents/WorkSpace/tool/apache-tomcat-9.0.8/bin/bootstrap.jar:/Users/zhaosong/Documents/WorkSpace/tool/apache-tomcat-9.0.8/bin/tomcat-juli.jar Using JRE_HOME: /Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home Using CATALINA_TMPDIR: /Users/zhaosong/Documents/WorkSpace/tool/apache-tomcat-9.0.8/temp Using CATALINA_HOME: /Users/zhaosong/Documents/WorkSpace/tool/apache-tomcat-9.0.8 Using CATALINA_BASE: /Users/zhaosong/Documents/WorkSpace/tool/apache-tomcat-9.0.8 When you see the below message, it means tomcat has been started successfully. sh file in tomcat bin directory is executable, you can run the command ls -al to see that. sh-3.2# cd /Users/zhaosong/Documents/WorkSpace/tool/apache-tomcat-9.0.8 Then run the below command to make the.After download, unzip the compressed file to a local directory.You can select a zip file or tar.gz file. Download the tomcat install package from page.Java HotSpot(TM) 64-Bit Server VM (build 25.172-b11, mixed mode) Java(TM) SE Runtime Environment (build 1.8.0_172-b11) If you do not have installed JDK, you need to download and install one. First make sure you have installed JDK on macOS, run java -version in terminal to get the installed version.