Install Tomcat on Fedora or CentOS
To install tomcat5 (or tomcat 6) on Fedora 14 or CentOS,
- Run yum install tomcat5 tomcat5-webapps tomcat5-admin-webapps (or to install tomcat6 run yum install tomcat6 tomcat6-webapps tomcat6-admin-webapps )
- Your configuration files are in /etc/tomcat5. (or /etc/tomcat6)
- ed to edit server-minimal.xml to set the port that Tomcat listens on. You will need to edit the file tomcat-users.xml and add a user with the role 'manager' if you want to be able to use the Tomcat Manager application (see #6 below).
- You can start and stop Tomcat by running # /etc/init.d/tomcat5 start (or stop,restart, etc).
- Note on Fedora 14 and later you should use the service command as in: # service tomcat6 restart
- Any Tomcat web application that you want to serve should be dropped into /var/lib/tomcat5/webapps/
- Note that on Fedora 14 the directory is /usr/share/tomcat6/webapps/
- You can view your Tomcat website via http://localhost:8080/.
- In order to run the manager commands you need to: # vi /etc/tomcat5/tomcat-users.xml
- Add <role rolename="manager"/> as a new line and edit <user username="tomcat" password="tomcat" roles="tomcat,manager"/> to include manager. Make sure these lines are not inside the comments <!-- ... -->
- Restart tomcat so changes take affect: # servcie tomcat6 restart
- Test a manager command: # http://localhost:8080/manager/list
- Try to reload the example appication: http://localhost:8080/manager/reload?path=/examples
- Show the server info: http://localhost:8080/manager/serverinfo
- Show the session info:http://localhost:8080/manager/sessions?path=/examples
- Start an application: http://localhost:8080/manager/start?path=/examples
- Stop an application: http://localhost:8080/manager/stop?path=/examples
See Also:
Howto: Install Apache Solr 1.4.1 on CentOS / Drupal 6
Why not tomcat6?
On this tutorial as well (Solr+1.4+on+Ubuntu+9.10+and+CentOS+5) it's telling me to install tomcat5 on CentOS. Why not 6?
Either tomcat5 or tomcat6 should work
In reply to Why not tomcat6? by Anonymous (not verified)
I tried to mention that in the heading this should work with either version. You just need to replace the 5 with a 6 in the tomcat commands.