Breaking

How to install apache tomcat on Linux



Apache Tomcat is an opensource web server that is developed by Apache software foundation.
It is bascically used for deploying java web application. It is run on port 8080



1. Download jdk-version.tar.gz from


                 http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html


2. Extract the downloaded jdk


                   # tar -xzf jdk-version.tar.gz


3. Set environmental variable.


                    Edit vim .bash_profile  --->  export PATH=(path of jdk bin):$PATH  (in centos,redhat....) 
           Edit vim .profile           --->  export PATH=(path of jdk bin):$PATH  (in ubuntu,mint....)


4. Download and Extract Tomcat Archive  http://tomcat.apache.org/


                     # tar -xzf apache-tomcat-(version).tar.gz



Tar is a linux command used to create or extract .tar.gz file formats. Tar stands for tape archive. It is an archiving file format.

Tar synopsis


                       tar <operation> [options]

Operations:


[-]A --catenate --concatenate
[-]c --create
[-]d --diff --compare
[-]r --append
[-]t --list
[-]u --update
[-]x --extract --get
--delete

Common Options:


-C, --directory DIR
-f, --file F
-j, --bzip2
-p, --preserve-permissions
-v, --verbose

-z, --gzip




5. Start Tomcat


            # cd /apache-tomcat-(version)/bin/
            # ./startup.sh


6. Access Tomcat in Browser


             http://localhost:8080/


7. Stop Tomcat


            # cd /apache-tomcat-(version)/bin/
            # ./shutdown.sh


8. Setup User Accounts


             Edit "conf/tomcat-users.xml" file and paste inside <tomcat-users> </tomcat-users> tags.


<role rolename="manager-gui" />
<user username="manager" password="YOUR_PASSWORD_" roles="manager-gui" />



11. Restart the tomcat server




Next: 

How to Start apache tomcat server on startup in Centos,Redhat

How to Start apache tomcat server on startup in Ubuntu,LinuxMint




1 comment:

  1. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.
    I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging.
    If anyone wants to become a Java developer learn from Java EE Online Training from India.
    or learn thru Java EE Online Training from India .
    Nowadays Java has tons of job opportunities on various vertical industry.

    ReplyDelete

Powered by Blogger.