How to install and configure Tomcat
How to install and configure Tomcat
In this article we will learn that How to install and configure Tomcat server with java repository and Oracle Java 8. Please follow below all steps to install and configure Tomcat and let us know if you face any kinds of problem. Hope you will enjoy in this article and solve your all query as well.
To create repository and install oracle java.
#add-apt-repository ppa:webupd8team/java#apt-get update
#apt-get install oracle-java8-installer
Pop up will apear on your display regarding Oracle license agreement so please accept:
Press "Yes" & "Yes"
#java -version
Setup 1: Login with Root:
# su -
password
Step 2: Update the system:
# apt-get update
Step 3: Install Tomcat and other Tomcat-ADDONS:
# apt-get install tomcat8
# apt-get install tomcat8-docs tomcat8-examples tomcat8-admin
Step 4: start the services:
#systemctl start tomcat8
#systemctl restart tomcat8
Step 5: Open web browser:
http://ipaddress:8080
Step 6: Open the file
#nano /var/lib/tomcat8/conf/tomcat-users.xml
Please paste below code befor </tomcat-users> arrording to your requirment
To set different-different password:- (According to your requirement)
<role rolename="manager-gui"/>
<user username="manager" password="manager" roles="manager-gui"/>
<role rolename="admin-gui"/>
<user username="admin" password="admin" roles="admin-gui"/>
To set same in both manager & admin:- (According to your requirement)
<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<user username="tomcat" password="tomcat" roles="manager-gui,admin-gui"/>
Save the file
Restart the Tomcat Server
#systemctl restart tomcat8
0 comments
Please leave your comments...... Thanks