Monday, September 2

Install Apache tomcat 8.0.X on RHEL/CentOS 6


 This Document covers Installing and basic configuration of Apache Tomcat 8.0.X Version  on RHEL/CentOS 5&6

                                Step 1: Check JAVA is installed or not
    JAVA is the first requirement of Apache Tomcat installation. Use following command to check if you have java installed or not.

   
                    [root@localhost ~]# java -version


   If you do not have Java installed on ur server, Click this Link to install Java(Java installation Guide)



                          Step 2: Download & Extract Apache Tomcat

 You can download the latest Version of Apache tomcat from this Link   http://tomcat.apache.org/download-80.cgi#8.0.0-RC1

 
   In Command Prompt use these commands , Download & Install Apache tomcat.

    [root@localhost ~]#cd /opt/     

    [root@localhost opt]#wget http://www.dsgnwrld.com/am/tomcat/tomcat-8/v8.0.0-RC1/bin/apache-tomcat-8.0.0-RC1.tar.gz

   
   After competed download, extract the archive file in /opt directory. You may change this location as per your setup.


        [root@localhost opt]# tar -xvzf apache-tomcat-8.0.0-RC1.tar.gz
  

   

                                          Step 3: Start Tomcat Server.



   [root@localhost opt]# cd apache-tomcat-8.0.0-RC1


   [root@localhost apache-tomcat-8.0.0-RC1]# ls
  
    bin  conf  lib  LICENSE  logs  NOTICE  RELEASE-NOTES  RUNNING.txt  temp  webapps  work
   

   [root@localhost apache-tomcat-8.0.0-RC1]# ./bin/startup.sh



     Output:-



    Using CATALINA_BASE:   /opt/apache-tomcat-8.0.0-RC1
    Using CATALINA_HOME:   /opt/apache-tomcat-8.0.0-RC1
    Using CATALINA_TMPDIR: /opt/apache-tomcat-8.0.0-RC1/temp
    Using JRE_HOME:        /usr
    Using CLASSPATH:       /opt/apache-tomcat-8.0.0-RC1/bin/bootstrap.jar:/opt/apache-tomcat-8.0.0-RC1/bin/tomcat-juli.jar




                                       Step 4: Access Tomcat on Browser

   Tomcat server works on port 8080 by default. Access tomcat on web browser by connecting your server on port 8080.

      http://linuxmaterials.com:8080

                           



             

                              Step 5: Setup User&Admin Accounts


 For security reasons, no users or passwords are created for the Tomcat manager roles by default. In a production deployment,
  it is always best to remove the Manager application.

To set roles, user name(s) and password(s), we need to configure the tomcat-users.xml file located at $CATALINA_HOME/conf/tomcat-users.xml.

In the case of our installation, $CATALINA_HOME is located at /opt/apache-tomcat-8.0.0-RC1

Edit /opt/apache-tomcat-8.0.0-RC1/conf/tomcat-users.xml file in your editor and modify inside <tomcat-users> </tomcat-users> tags.



<tomcat-users>

  <role rolename="tomcat"/>
  <role rolename="role1"/>
  <user username="tomcat" password="tomcat" roles="tomcat"/>
  <user username="both" password="tomcat" roles="tomcat,role1"/>
  <user username="role1" password="tomcat" roles="role1"/>

</tomcat-users>




             ######################   END   ##########################

1 comment:

  1. hello sir,
    whenever i change server.xml file ......and i stop and start catalina.sh but its does not respond on the url....
    and how to automate the service on centos

    please help me

    ReplyDelete

:: Linux - Legends ::