Apache Tomcat is a opensource webserver product of Apache Foundation like Apache HTTP server. It is used for deploying Java Servlet and JSP applications. To deploy any application in Tomcat, we can simply create a war file and deploy them. This article will help you to install Tomcat 7 on CentOS/RHEL servers.
Step 1: Check Java Version
JAVA is the first requirement for Tomcat 7 installation. Make sure you have JAVA SE 6 or Later version installed in your system. Use following command to check if you have java installed already on your system.
# java -version
In case java is not installed, you will need to install it before proceeding to the tomcat installation.
Step 2: Downloading Tomcat 7 Archive
Download Apache Tomcat archive file from Apache tomcat official download page. You can use below wget command to download it.
# cd /tmp
# wget http://apache.bytenet.in/tomcat/tomcat-7/v7.0.57/bin/apache-tomcat-7.0.57.tar.gz
After competed download extract archive file in /tmp directory and move to proper location as per your need. We are placing this under /usr/local directory.
# tar xzf apache-tomcat-7.0.57.tar.gz
# mv apache-tomcat-7.0.57 /usr/local/tomcat7
Step 3: Starting Tomcat
Tomcat is very easy to use. There is no need to compile its source. You simple extract the archive and start the tomcat server. Tomcat by default start on port 8080. Make sure no other services are running on same port using ‘telnet localhost 8080′.
# cd /usr/local/tomcat7
# ./bin/startup.sh
Step 4: Access Tomcat in Browser
Tomcat server works on port 8080 default. To access Tomcat applications on web browser use port 8080 in the URL.
http://host.server.tld:8080
Step 5: Setup User Accounts
Finally we need to create user accounts to secure and access admin/manager pages. Edit conf/tomcat-users.xml file in your editor and paste inside <tomcat-users> </tomcat-users> tags.
Stop Tomcat
If at anytime, you feel that there is no need of Tomcat on your system, you can simply stop it using below command from tomcat home directory.
# ./bin/shutdown.sh
- Tomcat
- 0 Users Found This Useful
Related Articles
Directory and File Structure - Linux
Directory/Folder StructureFrom amongst the several directories found within your cPanel account,...
PHP require, require_once errors
If you an error that looks like one of these... Warning:...
PHP Parse error: syntax error, unexpected $end
This error is typically caused by a missing } used in PHP to denote content belonging to a WHILE,...
How to drop tables from a database in phpMyAdmin?
This article will demonstrate how to drop (permanently delete) tables from a database in...
How to drop tables from a database in phpMyAdmin?
This article will demonstrate how to drop (permanently delete) tables from a database in...
Powered by WHMCompleteSolution