all the other involved saga said a lot, originally very simple thing!
Suggest to read the original http://tecadmin.net/steps-to-install-tomcat-server-on-centos-rhel/directly
Step 1:check Java (i added: Install Java, as long as Yum install java-1.7.0-openjdk.x86_64 OK)
JAVA is the first requirement for Tomcat 7 installation. Make sure the JAVA SE 6 or later version installed in your system. Use the following command to the check if you have the Java installed already on your system.
# Java-versionjava Version "1.8.0" Java (tm) SE Runtime Environment (build 1.8.0-b132) Java HotSpot (tm) Client VM (build 25. 0-b70, Mixed mode)
If you don't have a Java installed, use any article install Java 7 or install Java 8 in RHEL based systems.
Step 2:download and Extract Tomcat Archive
Download Apache Tomcat archive file from Apache Tomcat official Download page. You can use the below wget command to download it.
# cd/tmp# wget http://www.us.apache.org/dist/tomcat/tomcat-7/v7.0.56/bin/apache-tomcat-7.0.56.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.56.tar.gz# mv APACHE-TOMCAT-7.0.56/USR/LOCAL/TOMCAT7
Step 3:start Tomcat
Tomcat is very easy-to-use, there was no need to compile its source. You simple extract the archive and start the Tomcat server. Tomcat By default start in port 8080, make sure no other services is running on same port using ' telnet localhost 8080′.
# cd/usr/local/tomcat7#./bin/startup.sh
[Sample Output]
Using catalina_base: /usr/local/tomcat7using catalina_home: /usr/local/tomcat7using catalina_tmpdir:/usr/ Local/tomcat7/tempusing jre_home: /opt/jdk1.8.0_05/jreusing CLASSPATH: /usr/local/tomcat7/bin/ Bootstrap.jar:/usr/local/tomcat7/bin/tomcat-juli.jartomcat started.
Step 4:access Tomcat in Browser
Tomcat server works on port 8080 default. To access Tomcat in Web browser by connecting your server on port 8080.
http://svr2.tecadmin.net:8080
Step 5:setup User Accounts
Finally we need to the 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.
<!--User Manager can access only manager section--><role rolename= "Manager-gui"/><user username= "manage R "password=" _secret_password_ "roles=" Manager-gui "/><!--user admin can access Manager and Admin section both--&G T;<role rolename= "Admin-gui"/><user username= "admin" password= "_secret_password_" roles= "Manager-gui, Admin-gui "/>
Step 6:stop Tomcat
Finally If you feel that there is no need of Tomcat in the your system, you can simply stop it using below command from TOMCA T home directory.
#./bin/shutdown.sh
I hope above steps would help you with set up Tomcat 7 on your server. Read our next article to Install Tomcat 7 on Ubuntu. Tomcat 8 Stable release is also available to download. Read our next article article to Install Tomcat 8 in Linux
Thanks
CentOS Install Tomcat