Senin, 07 Juli 2014

How to Install Apache Tomcat 8 Web Server in Ubuntu

If you use a java web application, then you need The Apache Tomcat to run your application. In this case, I will show you how to setup on Ubuntu with default port 8080.

(1) Before We begin, we have to make sure if java is installed or not.

$ java -version
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) Client VM (build 25.5-b02, mixed mode)



If you see The message like above you can continue. If you don't, you need to download and install from this source or you can follow my tutorial here.

(2) Download the latest Apache Tomcat from http://tomcat.apache.org/download-80.cgi.


(3) Extract using this command:

$ tar xvzf apache-tomcat-8.0.9.tar.gz


(4) Move to the share folder with this command:

$ sudo mv apache-tomcat-8.0.9/ /usr/share/tomcat8



(5) Start The Tomcat 8

$ cd /usr/share/tomcat8/bin
$ ./startup.sh

You can ascertain whether The Tomcat is active or not by visiting http://localhost:8080/ from your local computer or http://ip-address:8080/ from remote computer. And you should see the page like below



(6)  Set up users

$ sudo nano /usr/share/tomcat8/conf/tomcat-users.xml

//in your nano
<role rolename="manager-gui" />
<user username="root" password="password" roles="manager-gui"/>

And now, if you visit http://localhost:8080/manager/html you will be asked username and password. Once you logged in, you will see like below




Now you have successfully setup Tomcat 8. :)

Just note about starting-up Tomcat 8;
*) Please wait about 10 minutes because Tomcat 8 takes long time to boot. If you see blank page until you wait about 10 minutes, I am sure you have a problem and you need to start it manually or try to find out the solution.
*) If you need to boot your Tomcat faster, please read this. I haven't yet explore The link, so I can't tell you.




Tidak ada komentar:

Posting Komentar

Cara Mengetahui Besar Database PostgreSQL Tanpa Mendownloadnya

Berikut adalah langkah-langkah untuk mengetahui ukuran semua database di instance PostgreSQL yang berjalan di dalam kontainer Docker: 1. Men...