Thursday, July 5, 2018

Install Tomcat 8 on Ubuntu 16.0.4 - How to install and configure Tomcat 8 on Ubuntu 16.0.4

Tomcat 8 Installation

sudo apt-get update
sudo apt-get install tomcat8
sudo apt-get install tomcat8-docs tomcat8-examples tomcat8-admin
sudo cp -r /usr/share/tomcat8-admin/* /var/lib/tomcat8/webapps/

sudo vi /var/lib/tomcat8/conf/tomcat-users.xml
Go to the end of the file,
Add the below lines in second last line above (above </tomcat-users>)
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
 
<user username="tomcat" password="password" roles="manager-gui,manager-script"/>

sudo vi /etc/default/tomcat8
Look for the line starting JAVA_OPTS and comment that line by adding # and copy the below line:
JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom -Djava.awt.headless=true -Xmx512m -XX:MaxPermSize=512m -XX:+UseConcMarkSweepGC"

sudo systemctl restart tomcat8

sudo systemctl status tomcat8

Now go to browser, enter ip address or DNS name of server with port no 8080

You will see a page that says It Works!

That's is Tomcat is successfully installed on Ubuntu

No comments:

Post a Comment

DevOps Coaching Program Model Information | AWS Cloud Azure Cloud DevOps Coaching Program Model Information

Thanks for showing interest in learning DevOps. Believe it or not, anyone can become a successful DevOps engineer after finishing the excit...