How to install tomcat 8 on Centos/RHEL 6/7
Apache Tomcat, often referred to as Tomcat, is an open-source web server developed by the Apache Software Foundation(ASF). Tomcat implements several Java EE specifications including Java Servlet, JavaServer Pages (JSP), Java EL, and WebSocket, and provides a “pure Java” HTTP web server environment for Java code to run in.
Tomcat is developed and maintained by an open community of developers under the auspices of the Apache Software Foundation, released under the Apache License 2.0 license, and is open-source software.
Prerequisites for tomcat 8
- Update your system by using following command
yum -y update
2. Install Java
For installing tomcat we need to install jdk 7 or 8.
Download Tomcat 8
Now we download tomcat 8 from apache website use the following link download via command line:
Now extract the tomcat
tar xvf apache-tomcat-8.0.30.tar.gz
mv apache-tomcat-8.0.30 tomcat
Read Also: How to install glusterfs on centos 7
Configure web Interface
For accessing the tomcat web interface we need to set login and password. so, we will edit tomcat-users.xml for adding user and password..
Edit the tomcat-users.xml file with your favourite editor
Now add the user ‘admin’ with password ‘password’. Add the following line in <tomcat-users> </tomcat-users> tag as follows
<user username="admin" password="password" roles="manager-gui,admin-gui"/>
This will add user for manager-gut and admin-gui.
Now start services of tomcat 8
Access the Web Interface
Now we will access the web interface of our tomcat web server by the IP address of the server with port 8080. Open your web browser and go to the following link and change ipaddress with your IP.
You will get apache tomcat page.
Now you start deploying your java apps on tomcat server..
If you have any issue using this tutorial feel free to comment below..