When setting up Tomcat environment on Mac, download the Tomcat tar.gz or zip file from the official website and set various paths for java_home and catalina_home. Isn't it annoying and annoying?
I hated it once and turned to Eclipse. But if there was a problem with Eclipse, I thought it would be difficult to find the problem again.
So, I saw the simplest method of introducing Tomcat this time, so I will introduce it.
Installing Apache Tomcat on MacOS Mojave using Homebrew(2019/8/29) https://medium.com/@fahimhossain_16989/installing-apache-tomcat-on-macos-mojave-using-homebrew-28ce039b4b2e
See from the heading "Installing and Running Apache Tomcat on Mac OS using Homebrew". (I omitted the parts that say cask etc.)
Run the following command in the terminal to install Tomcat.
brew update brew install tomcat
To start (stop) automatically using Homebrew command, use the following command
brew services start tomcat brew services stop tomcat
To start (stop) Tomcat manually, use the following command
catalina run catalina stop
Now you can start Tomcat.
Last login: Thu Jul 30 22:52:31 on ttys001 AkihironoMacBook-puro% catalina run Using CATALINA_BASE: /usr/local/Cellar/tomcat/9.0.37/libexec Using CATALINA_HOME: /usr/local/Cellar/tomcat/9.0.37/libexec Using CATALINA_TMPDIR: /usr/local/Cellar/tomcat/9.0.37/libexec/temp Using JRE_HOME: /usr/local/opt/openjdk Using CLASSPATH: /usr/local/Cellar/tomcat/9.0.37/libexec/bin/bootstrap.jar:/usr/local/Cellar/tomcat/9.0.37/libexec/bin/tomcat-juli.jar NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED . . . . 31-Jul-2020 00: 08: 31.077 Info [main] org.apache.catalina.startup.HostConfig.deployDirectory Directory [/usr/local/Cellar/tomcat/9.0.37/libexec/webapps/host-manager] Web Application deployment was completed in [18] ms. 31-Jul-2020 00: 08: 31.080 Info [main] org.apache.coyote.AbstractProtocol.start Protocol handler ["http-nio-8080"] has started. 31-Jul-2020 00: 08: 31.090 Information [main] org.apache.catalina.startup.Catalina.start Server startup [829] ms
Recommended Posts