INSTALL AND REMOVE TOMCAT USING APT-GET IN UBUNTU

This post will serve as a guide to installing the tomcat using apt-get manager using two simple steps.

STEP 1: INSTALLING TOMCAT
STEP 2: INSTALLING DEPENDENCIES

Step 1: Install the Tomcat
Update the package list using the command.
$ sudo apt-get update
Install the tomcat using the command
$ sudo apt-get install tomcat8
Check the tomcat status
$ sudo service tomcat8 status
Go to the browser to view your tomcat
http:localhost:8080

Step 2: Installing dependencies
Install the necessary packages
$ sudo apt-get install tomcat8-docs tomcat8-admin tomcat8-examples
Restart the tomcat
$ sudo service tomcat8 restart

Step 3: Configuring the tomcat (Optional)
To configure the tomcat properties such as memory allocated for tomcat enter the details in the following file
$ sudo nano /etc/default/tomcat8
Restart to apply the changes
$ sudo service tomcat8 restart
To configure the users with password and roles use the following XML
$ sudo nano /etc/tomcat8/tomcat-users.xml
<tomcat-users>
<user username=”admin” password=”password”     roles=”manager-gui,admin-gui”/>
</tomcat-users>
Sample configuration for tomcat is as follows
Restart to apply changes

Step 0: Remove the tomcat
To remove the tomcat first stop the tomcat process
$ sudo service tomcat8 stop
To verify it’s status below command will give the status
$ sudo service tomcat8 status
The remove
$ sudo apt-get remove tomcat8
To remove configuration files
$ sudo apt-get purge tomcat8

Comments

Popular posts from this blog

How to install MRTG on UBUNTU

How to install Apache Tomcat in Ubuntu

How to send email on user login in ubuntu