[easyazon-link asin=”0471753610″ locale=”us”] Apache Tomcat [/easyazon-link] is an open source software implementation of the Java Servlet and JavaServer Pages technologies. Different versions of [easyazon-link asin=”1849516626″ locale=”us”] Apache Tomcat [/easyazon-link]are available for different versions of the Servlet and JSP specifications. Latest version is Apache Tomcat 7.x. However I will here show and focus on installation of [easyazon-link asin=”1847197280″ locale=”us”] Apache Tomcat 6 [/easyazon-link] on [easyazon-link asin=”1430219645″ locale=”us”] CentOS [/easyazon-link]Linux server. Installation is very easy, basically as long as you have installed Java on system you should be able to quickly install and configure Apache Tomcat 6 on your Linux [easyazon-link asin=”1430219300″ locale=”us”] CentOS 6.3 [/easyazon-link] server in few steps.
- switch to root
- install Java
- verify that Java is installed and present on your machine
su yum install -y java java -version
Next steps are involving to install the Apache Tomcat6:
su yum -y install tomcat6 tomcat6-webapps tomcat6-admin-webapps cd /etc/init.d ./tomcat6 start
Once you have installed and started the [easyazon-link asin=”B007NXNSE2″ locale=”us”] Apache Tomcat [/easyazon-link] server go to your browser and confirm you have running Tomcat 6 on your server by entering http://localhost:8080 – Apache Tomcat6 uses default port 8080. You can change this latter if you wish.
Here is list and path to important configuration files for Apache Tomcat
/etc/tomcat6 (main tomcat config files reside) /usr/share/doc/usr/share/tomcat6 /usr/share/tomcat6/bin/usr/share/tomcat6/conf /usr/share/tomcat6/lib /usr/share/tomcat6/logs /usr/share/tomcat6/temp /usr/share/tomcat6/webapps /usr/share/tomcat6/work /var/cache/tomcat6 /var/cache/tomcat6/temp /var/cache/tomcat6/work /var/lib/tomcat6 (where you will add and/or change most of your files) /var/lib/tomcat6/webapps /var/log/tomcat6
If you wish to change the default port 8080 to different unused port you need to change this part in server.xml
su gedit /etc/tomcat6/server.xml
scroll down and edit this part in the file:
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443"/>
Once done, save changes and restart the Apache Tomcat and you should be able now access it on new port.
How to create admin password for Apache Tomcat:
- Edit /etc/tomcat6/tomcat-users.xml
- Add the following
<!-- <role rolename="role1"/> -->
[easyazon-image align=”none” asin=”1430237236″ locale=”us” height=”160″ src=”http://ecx.images-amazon.com/images/I/510yG7IXwaL._SL160_.jpg” width=”130″]