Installing Tomcat on CentOS
Continuing in setting up my CentOS server, the next thing I need is to get Hudson setup. Before I can get Hudson up and running I’ll need to get Tomcat installed. I could of course use Winstone which will get me up and running, but I know I will need Tomcat soon for some other things as well so might as well get it setup now.
The Setup
Install some base packages
# yum install rpm-build gcc-javaAdd jpackage repository to your yum repos
# cd /etc/yum.repos.d/ # wget https://jpackage.org/jpackage.repo # vi /etc/yum.repos.d/jpackage.repo
set enabled = 1 on all repo files and save the .repo file. Next update yum.
# yum updateDownload and install some SRPMs.
# cd /usr/local/src # wget ftp://jpackage.hmdc.harvard.edu/mirrors/JPackage/1.7/generic/non-free/SRPMS/java-1.5.0-sun-1.5.0.11-1jpp.nosrc.rpm # wget ftp://jpackage.hmdc.harvard.edu/mirrors/JPackage/1.6/generic/non-free/SRPMS/jta-1.0.1-0.b.4jpp.nosrc.rpm
Download some required files to /usr/src/redhat/SOURCES:
# cd /usr/src/redhat/SOURCESDownload jta-1_0_1B-classes.zip here after agreeing to the license.
Download jdk-1_5_0_11-linux-i586.bin, again after agreeing to a license.
Build and install the rpms.
# rpmbuild --rebuild /usr/local/src/java-1.5.0-sun-1.5.0.11-1jpp.nosrc.rpm # rpm -ivh /usr/src/redhat/RPMS/i586/java-1.5.0-sun-1.5.0-11-1jpp.i586.rpm # rpm -ivh /usr/src/redhat/RPMS/i586/java-1.5.0-sun-devel-1.5.0.11-1jpp.i586.rpm # rpmbuild --rebuild --without javadoc /usr/local/src/jta-1.0.1-0.b.4jpp.nosrc.rpm # rpm -ivh /usr/src/redhat/RPMS/noarch/jta-1.0.1-0.b.4jpp.noarch.rpm
Now install tomcat
# yum install tomcat5 tomcat5-webapps tomcat5-admin-webappsnote: if you get a dependency error at this point, like I did at first, try this solution for updating your jpackage-utils http://blog.sixsigns.com/2008/07/11/java-142-gcj-compati386-update-problem-on-centos/ which basically is to install the http://dev.centos.org/centos/5/testing/i386/RPMS/jpackage-utils-1.7.5-1jpp.1.el5.centos.noarch.rpm package and update yum
At this point you should be able to navigate to your ip on port 8080 and see the default tomcat page
There's 4 Comments So Far
May 6th, 2009 at 1:27 am
Great Contribution.
August 25th, 2009 at 1:07 pm
I have a “herd” of tomcats with Apache in front running on CentOS5 if anyone is interested. See my blog for details.
August 25th, 2009 at 1:08 pm
dang.. forgot link.. sorry…
http://lesszoa.blogspot.com/search/label/tomcat
October 9th, 2009 at 10:22 am
These links don’t work:
Download jta-1_0_1B-classes.zip here after agreeing to the license.
Download jdk-1_5_0_11-linux-i586.bin, again after agreeing to a license.
Searched on those files and found links here
http://www.tummy.com/Community/Articles/tomcat-centos/tomcat5.html
Thanks,
RicH
Share your thoughts, leave a comment!