How to install Tomcat 8 on Ubuntu 17.04?

Tomcat 8 is the latest server from Apache and in this tutorial we will see the steps of installing it on Ubuntu 17.04

Ads


 

How to install Tomcat 8 on Ubuntu 17.04?

Tomcat 8 is the latest server from Apache and in this tutorial we will see the steps of installing it on Ubuntu 17.04

How to install Tomcat 8 on Ubuntu 17.04 with apt command?

There are various ways to install Tomcat server on the Ubuntu operating system, you can compile Tomcat and then install. You can also download the binary version and then install it on Ubuntu 17.04. But the easiest method is to use the apt-command to install the most stable version of Tomcat 8 on Ubuntu 17.04

In this tutorial I will teach you the steps of installing and using Tomcat 8 on Ubuntu 17.04.

Installing Tomcat 8 on Ubuntu 17.04

Java and JDK is the pre-requisite for installing and running Tomcat 8 on Ubuntu, so we have to install Java prior to the installation of Tomcat 8 on Ubunut.

Let's do it step-by step.

Step 1: Update your system

First of all update the latest repository information by running the following command:

sudo apt-get update

Video: How to install Tomcat 8 on Ubuntu 17.04?

Here is the video instruction of complete process:

Step 2: Install Oracle JDK 8

Now we can proceed to install Java on Ubunut 17.04. First of all run the following command to add the required repositories to the system:

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java

After this update and run installer:

sudo apt-get update
sudo apt-get install oracle-java8-installer

Here is the part of installation log:

deepak@deepak-VirtualBox:~$ sudo apt-get install oracle-java8-installer
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  gsfonts-x11 java-common oracle-java8-set-default
Suggested packages:
  binfmt-support visualvm ttf-baekmuk | ttf-unfonts | ttf-unfonts-core
  ttf-kochi-gothic | ttf-sazanami-gothic ttf-kochi-mincho
  | ttf-sazanami-mincho ttf-arphic-uming
The following NEW packages will be installed:
  gsfonts-x11 java-common oracle-java8-installer oracle-java8-set-default
0 upgraded, 4 newly installed, 0 to remove and 4 not upgraded.
Need to get 43.9 kB of archives.
After this operation, 245 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ppa.launchpad.net/webupd8team/java/ubuntu zesty/main amd64 oracle-java8-installer all 8u111+8u111arm-1~webupd8~0 [23.5 kB]
Get:2 http://in.archive.ubuntu.com/ubuntu zesty/main amd64 java-common all 0.57ubuntu1 [7,492 B]
Get:3 http://in.archive.ubuntu.com/ubuntu zesty/universe amd64 gsfonts-x11 all 0.24 [7,314 B]
Get:4 http://ppa.launchpad.net/webupd8team/java/ubuntu zesty/main amd64 oracle-java8-set-default all 8u111+8u111arm-1~webupd8~0 [5,550 B]
Fetched 43.9 kB in 3s (14.4 kB/s)                   

After completion check Java version:

java -version

You will get similar output:

deepak@deepak-VirtualBox:~$ java -version
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)

Step 3: Install Tomcat 8

Now run the following command to install Tomcat 8:

sudo apt-get install tomcat8 tomcat8-docs tomcat8-admin tomcat8-examples

Step 4: Test Tomcat

Open browser and type http://localhost:8080

Your browser should display the Tomcat 8 default home page.

Image here::::

Step 5: Restart tomcat 8

In the final step I will show you how you can start/stop/restart Tomcat 8?

To stop Tomcat 8 run following command on terminal:

service tomcat8 stop

To start the service run following command on the terminal:

service tomcat8 start

To restart the service run the following command:

service tomcat8 restart

By completing above steps you will be able to run Tomcat 8 on Ubuntu 17.04.

Check more tutorials at https://www.devmanuals.net/. We have large collection of Tutorials of Ubuntu operating system.

Ads