step by step apache tomcat configuration in linux

step by step apache tomcat configuration in linux

Question : how to configure Apache Tomcat server in Linux ?

Question : Step by Step Apache tomcat server configuration ?

IP  - 

Hostname - 

OS  - CentOS 6

PORT  - 8080

Tomcat Version  - 7 

Tomcat, is an open-source web server and servlet container developed by the Apache Software Foundation (ASF).It used for deploying Java Servlet and JSP applications. To deploy any application in Tomcat we can simply create a war file and deploy them
Install Java

1. Install Java in Linux 

# yum install java

Check Java Version

# java -verison

here i have java 1.8 verison

2. Download Apache Tomcat archive file from Apache tomcat official download page.

# mkdir /download
# cd /download
# wget

3. Extract Tomcat

# tar -zxvf apache-tomcat-7.0.64.tar.gz

Move in to "/usr/local/" directory

# mv apache-tomcat-7.0.64 /usr/local/tomcat7
There are no need to configure , just the start Tomcat service

tomcat run on 8080 default port

Check 8080 Port

# netstat -tulpn | grep :8080
# cd /usr/local/tomcat7/bin/

4. Setup User Account

Edit conf/tomcat-users.xml file in your editor and paste inside

<tomcat-users> </tomcat-users>

<!-- user manager can access only manager section --> 
<role rolename="manager-gui" />
<user username="manager" password="password" roles="manager-gui" />

<!-- user admin can access manager and admin section both -->
< role rolename="admin-gui" />
< user username="admin" password="password" roles="manager-gui,admin-gui" />

5. Stop Tomcat

# ./usr/local/tomcat7/bin/
6. Start Tomcat
# ./usr/local/tomcat7/bin/

7. Access Tomcat in Browser

Server Status after provide user name & password , by clicking on "server status tab"

 8Change Tomcat Default Port

open server.xml file in "conf" directory & replace 8080 to 80 ( as you wish ) in Connector port section

# vi /usr/local/tomcat7/conf/server.xml

Put your *.jsp page in webapps direcotory with Project name


webapps -> project folder -> *.jsp pages

Webapps -> Project2 folder-> *.jsp pages

Next Post »