Install & Configure Apache Tomcat 8.0.32 on Linux
Apache Tomcat is an open source software which was supporting java, Servlet, JSP, EL & Java WebSocket technologies. Apache Tomcat is developed by Apache Tomcat Project and maintained by Apache Software Foundation. The latest version of Apache Tomcat 8.0.32 released on February 02, 2016. Initially Apache Tomcat 8.0.1 was release on February 2nd 2014.
1) Install Java
# java -version java version "1.8.0_20" Java(TM) SE Runtime Environment (build 1.8.0_20-b26) Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)
2) Downloading Apache Tomcat Archive file
Use the below command to download the stable release of Apache Tomcat 8.0.12 Archive file.
# wget http://www.eu.apache.org/dist/tomcat/tomcat-8/v8.0.32/bin/apache-tomcat-8.0.32.tar.gz # tar -zxvf apache-tomcat-8.0.32.tar.gz # cd /opt/apache-tomcat-8.0.32/bin # ./startup.sh Using CATALINA_BASE: /opt/apache-tomcat-8.0.32 Using CATALINA_HOME: /opt/apache-tomcat-8.0.32 Using CATALINA_TMPDIR: /opt/apache-tomcat-8.0.32/temp Using JRE_HOME: / Using CLASSPATH: /opt/apache-tomcat-8.0.32/bin/bootstrap.jar:/opt/apache-tomcat-8.0.32/bin/tomcat-juli.jar Tomcat started.
3) Access Apache Tomcat
4) How to access Server Status, Manager App & Host Manager
If you want to access Server Status, Manager App & Host Manager in tomcat, you need to add manager-gui and admin-gui rols under conf/tomcat-users.xml file.
- manager-gui : Control Server Status & Manager App
- admin-gui : Control Host Manager
You can access those things by adding the UserName and password to manager-gui and admin-gui rols (Use your username & password instead of us). Stop tomcat service and add colored lines on your conf/tomcat-users.xml file under tomcat-users then save + exit and start tomcat that’s it.
# Stop tomcat # # cd /opt/apache-tomcat-8.0.32/bin # ./shutdown.sh # Add user & password to tomcat-users.xml file # # nano /opt/apache-tomcat-8.0.32/conf/tomcat-users.xml <role rolename="manager-gui"/> <user username="2g" password="2g" roles="manager-gui"/> <role rolename="admin-gui"/> <user username="2daygeek" password="2G$#123" roles="admin-gui"/> # Start tomcat # # cd /opt/apache-tomcat-8.0.32/bin # ./startup.sh
Open your web browser and navigate to http://localhost:8080 or http://your-server-ip-address:8080 or http://127.0.0.1:8080 and hit Server Status or Manager App button. It will ask you to enter username and its password.
Successfully launched the Server Status.
Open your web browser and navigate to http://localhost:8080 or http://your-server-ip-address:8080 or http://127.0.0.1:8080 and hit Host Manager button. It will ask you to enter username and its password.
Successfully launched the Host Manager.
We are preparing all articles in-depth to understand by all level/stage Linux administrators. If the article is useful for you, then please spend less than a minute to share your valuable comments in our commenting section.
Please stay tune with us…Good Luck.