-
Notifications
You must be signed in to change notification settings - Fork 10
Tomcat Server Setup
This tutorial is written specifically for OSX and Tomcat 8.0.xx but can be adapted for other versions.
- Goto http://tomcat.apache.org ⇒ Download ⇒ Tomcat 8.0 ⇒ 8.0.{xx} (where {xx} denotes the latest release) ⇒ Binary 1. 1. distribution ⇒ Core. Download the "tar.gz" package (e.g., "apache-tomcat-8.0.{xx}.tar.gz").
- Open Terminal
cd ~/Downloads
tar xvf apache-tomcat-8.0.{xx}.tar.gz
Sudo mv apache-tomcat-8.0.{xx} ~/Applications
cd ~/Applications/apache-tomcat-8.0.{xx}/bin
chmod 777 *
./catalina.sh run
The default port is 8080 http://localhost:8080/ to check to see it is up and running
Setup is now complete.
To start and stop the server from now on you'll just need to cd into the folder you placed the tomcat folder in and run these commands.
cd apache-tomcat-8.0.{xx}/bin
-
./catalina.sh run
This will start the server -
./shutdown.sh
This will shutdown the server
Now that things are up and running we can deploy a .war file. Go to https://tomcat.apache.org/tomcat-7.0-doc/appdev/sample/ and click the download link. Make sure the file extension is a .war file. All you have to do is copy this file into the webapps folder inside the apache-tomcat-8.0.{xx} folder. Check to see it worked by going to http://localhost:8080/sample/
You’ll need to do this if you need access to the Server Status, Manager App or Host Manager. Inside the apache-tomcat-8.0.{xx} navigate to the conf folder. Open tomcat-users.xml in a text editor of your choice. Add the following code inside. You may change the username and password to whatever you would like. Save the file and restart the server.
<role rolename="admin"/> <role rolename="admin-gui"/> <role rolename="manager-gui"/> <user username="admin" password="password" roles="admin,admin-gui,manager-gui"/>
To change the port number open server.xml and find where the port number equals 8080. You can choose any number between 1024 and 65535, as long as it is not used by an existing application. Save and restart the server.
https://www.ntu.edu.sg/home/ehchua/programming/howto/Tomcat_HowTo.html#configure
This tutotial was adapted from https://www.ntu.edu.sg/home/ehchua/programming/howto/MacUsers_HowTo.html
ACES Learn to Code
- Git, GitHub GH-Pages
- Ozone Platform Developer Setup
- HTML, JavaScript, CSS
- Tomcat Web Server Setup
- A Simple Node.js App
- Spark with Docker
- Best Practices for Software Development
Other Tutorials
Conferences
- 2018 - DevOps Days Baltimore
- 2018 DevOps Days Baltimore, Part 2
- DevOpsDays---Baltimore
- Cross-Domain-Technical-Forum
- 2017 Potential Conferences
- LAS December 5th 2016
- DI2E Plugfest 2016
- OSCON 2015
- RWX-2015
- SpringOne-2017
- OSCON-2018
- DinosaurJS 2018
Training
- Developing on AWS
- Agile Team Facilitation
- Amazon AWS Big Data Solutions Day
- Cloudera Developer Training for Spark and Hadoop May 2016