Installation and configuration of TOMCAT APACHE in RHEL
TOMCAT APACHE :
Apache Tomcat is a web server for Java server-side applications. It is a Servlet/JSP container and implements several Java EE specifications.
Steps to follow for the installation and configuration of TOMCAT APACHE in RHEL/CentOS:
1. Login as root in server and configure yum local repo if not already configured. (watch below video for yum local repo configuration):
2. Install tomcat package from repository by yum command.
# yum install tomcat
3. Edit tomcat.conf file and append below line there by using vi editor.
# vim /usr/share/tomcat/conf/tomcat.conf
JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom -Djava.awt.headless=true -Xmx1026m -XX:MaxPermSize=256m -XX:+UseConcMarkSweepGC"
4. Install all other tomcat packages like tomcat webapps, tomcat docs etc.
# yum install tomcat*
5. Edit tomcat-user.xml file and write below (use less than symbol before starting this line and greater than symbol after) line there in tomcat-users section by vi editor, save it.
# vim /usr/share/tomcat/conf/tomcat-users.xml
user username="admin" password="password" roles="manager-gui,admin-gui"/
6. Start tomcat service now.
# systemctl start tomcat
7. Set tomcat service to start automatically after reboot.
# systemctl enable tomcat
8. Add port 8080 (to be used by tomcat) in firewall.
# firewall-cmd --permanent --zone=public --add-port=8080/tcp
9. Reload the firewall.
# firewall-cmd --reload
Now Test your configuration:
Open Firefox and write below line in address bar.
localhost:8080
or
Open any browser and write below line in address bar.
ip-address:8080
(where ip-address is the IP address of your tomcat server)
You should see a webpage showing successful configuration of Tomcat Apache.
You have successfully installed and configured Tomcat Apache in Linux.
=====================================================
Apache Tomcat is a popular open-source Java-based web server and servlet container. Some common uses of Apache Tomcat include:
Deploying and serving Java-based web applications: Apache Tomcat can be used to deploy and serve Java-based web applications built using technologies such as JSP and Servlets.
Hosting dynamic websites: Tomcat can host dynamic websites built using server-side scripting languages such as PHP, Ruby, and Python.
Developing and testing web applications: Apache Tomcat is often used by developers for testing and debugging web applications during the development process.
Running Java-based web services: Tomcat can be used to run Java-based web services such as RESTful APIs.
Running enterprise applications: Apache Tomcat can also be used to run enterprise applications built using Java technologies such as JavaEE.
No comments:
Post a Comment