Install Tomcat 10 on MacOS (Monterey)
Make sure you already install java on your machine.
I'm using jenv to manage my java version.
Installing Tomcat
Here are the easy to follow steps to get it up and running on your Mac
- Download a binary distribution of the core module: apache-tomcat-10.0.21 from here. I picked the tar.gz in Binary Distributions Core section.
- Opening/unarchiving the archive will create a new folder structure in your Downloads folder: (btw, this free Unarchiver app is perfect for all kinds of compressed files and superior to the built-in Archive Utility.app)
~/Downloads/apache-tomcat-10.0.21 - Open the Terminal app to move the unarchived distribution to /usr/local like so:
sudo mkdir -p /usr/local
sudo mv ~/Downloads/apache-tomcat-10.0.21 /usr/local
- To make it easy to replace this release with future releases, we are going to create a symbolic link that we are going to use when referring to Tomcat (after removing the old link, you might have from installing a previous version):
sudo rm -f /Library/Tomcat
sudo ln -s /usr/local/apache-tomcat-10.0.21 /Library/Tomcat
- Change ownership of the /Library/Tomcat folder hierarchy:
sudo chown -R <your_username> /Library/Tomcat
- Make all scripts in Tomcat’s ./bin folder executable:
sudo chmod +x /Library/Tomcat/bin/*.sh
Starting Tomcat by executing the provided scripts, like so:
/Library/Tomcat/bin/startup.sh
Stopping Tomcat by executing the provided scripts, like so:
/Library/Tomcat/bin/shutdown.sh
留言
張貼留言