I’m following the instructions here: http://newpush.com/how-to-install-tomcat-6-on-rhel-6-or-centos-6/
First up, install yum-priorities. That allows us to prioritize some repos over others. So, for example, we can make sure the RHEL repos take priority over EPEL, I guess. He also installs two repo files (enabling those repos) and a jpackage-utils (but not the jpackage repo). Hmm.
I’ve typically gotten the effect of yum-priorities by leaving EPEL disabled, and enabling it when desired by doing:
yum –enablerepo=epel search foo
I’m going to skip that, then, and just search for the three packages he specifies:
[root@tempest ~] yum –enablerepo=epel,rpmforge search tomcat6 tomcat6-webapps tomcat6-admin-webapps
rhel-6-server-cf-tools-1-rpms | 2.8 kB 00:00
rhel-6-server-rhev-agent-rpms | 3.1 kB 00:00
rhel-6-server-rpms | 3.7 kB 00:00
rpmforge | 1.9 kB 00:00
rpmforge/primary_db | 2.7 MB 00:05
=============================================== N/S Matched: tomcat6 ===============================================
glite-security-trustmanager-tomcat6.noarch : Java trustmanager interface supporting a GSI grid name space
tomcat6.noarch : Apache Servlet/JSP Engine, RI for Servlet 2.5/JSP 2.1 API
tomcat6-el-2.1-api.noarch : Expression Language v1.0 API
tomcat6-jsp-2.1-api.noarch : Apache Tomcat JSP API implementation classes
tomcat6-lib.noarch : Libraries needed to run the Tomcat Web container
tomcat6-servlet-2.5-api.noarch : Apache Tomcat Servlet API implementation classes
Name and summary matches mostly, use “search all” for everything.
Warning: No matches found for: tomcat6-webapps
Warning: No matches found for: tomcat6-admin-webapps
[root@tempest ~]
Hmm. Now I’m puzzled. The two missing packages aren’t in EPEL or in RPMFORGE, yet those are the only repositories he enables. Very strange. Let’s take a leap and just slavishly do as he tells us:
[root@tempest ~] yum install yum-priorities
No package yum-priorities available.
Error: Nothing to do
[root@tempest ~]
I did some searching and it turns out that on CentOS 6, It bothers me that the instructions fail at the first step. On the other hand, this page: http://wiki.centos.org/PackageManagement/Yum/Priorities says that it should exist, which I find very bothersome:
[root@tempest ~] yum –enablerepo=epel search yum
Loaded plugins: downloadonly, product-id, refresh-packagekit, security, subscription-manager
This system is receiving updates from Red Hat Subscription Management.
rhel-6-server-cf-tools-1-rpms | 2.8 kB 00:00
rhel-6-server-rhev-agent-rpms | 3.1 kB 00:00
rhel-6-server-rpms | 3.7 kB 00:00
================================================= N/S Matched: yum =================================================
anaconda-yum-plugins.noarch : Installation-related yum plugins
yum-arch.noarch : Extract headers from rpm in a old yum repository
yum-metadata-parser.x86_64 : A fast metadata parser for yum
yum-presto.noarch : Presto plugin for yum
yum-rhn-plugin.noarch : RHN support for yum
yumex.noarch : Yum Extender graphical package management tool
PackageKit-yum.x86_64 : PackageKit YUM backend
PackageKit-yum-plugin.x86_64 : Tell PackageKit to check for updates when yum exits
fusioninventory-agent-yum-plugin.noarch : Ask FusionInventory agent to send an inventory when yum exits
kabi-yum-plugins.noarch : The Red Hat Enterprise Linux kernel ABI yum plugin
repoview.noarch : Creates a set of static HTML pages in a yum repository
yum-dellsysid.x86_64 : YUM plugin to retrieve the Dell System ID
yum-plugin-aliases.noarch : Yum plugin to enable aliases filters
yum-plugin-changelog.noarch : Yum plugin for viewing package changelogs before/after updating
yum-plugin-downloadonly.noarch : Yum plugin to add downloadonly command option
yum-plugin-protect-packages.noarch : Yum plugin to prevents Yum from removing itself and other protected packages
yum-plugin-security.noarch : Yum plugin to enable security filters
yum-plugin-tmprepo.noarch : Yum plugin to add temporary repositories
yum-plugin-verify.noarch : Yum plugin to add verify command, and options
yum-plugin-versionlock.noarch : Yum plugin to lock specified packages from being updated
yum-utils.noarch : Utilities based around the yum package manager
createrepo_c.x86_64 : Creates a common metadata repository
grinder.noarch : A tool for synchronizing content from yum repositories
mash.noarch : Koji buildsystem to yum repository converter
mrepo.noarch : A tool to set up a yum/apt mirror from various sources
remi-release.noarch : YUM configuration for remi repository
yum.noarch : RPM installer/updater
Name and summary matches only, use “search all” for everything
I’m going to skip yum-priorities and go on to the rest of step one:
[root@tempest ~] rpm -Uvh http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
Retrieving http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
Preparing… ########################################### [100%]
package rpmforge-release-0.5.2-2.el6.rf.x86_64 is already installed
[root@tempest ~] rpm -Uvh http://download.fedora.redhat.com/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm
Retrieving http://download.fedora.redhat.com/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm
curl: (6) Couldn’t resolve host ‘download.fedora.redhat.com’
error: skipping http://download.fedora.redhat.com/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm – transfer failed
[root@tempest ~] rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Retrieving http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Preparing… ########################################### [100%]
package epel-release-6-8.noarch is already installed
[root@tempest ~]
So, he has a package name wrong (the correction was posted as a comment to his page) and we already have both repos installed. So if installing jpackage-utils doesn’t allow us to find the tomcat6-webapps and tomcat6-manager-webapps, I’ll be very unhappy.
[root@tempest ~] rpm -Uvh http://mirrors.dotsrc.org/jpackage/6.0/generic/free/RPMS/jpackage-utils-5.0.0-7.jpp6.noarch.rpm
Retrieving http://mirrors.dotsrc.org/jpackage/6.0/generic/free/RPMS/jpackage-utils-5.0.0-7.jpp6.noarch.rpm
warning: /var/tmp/rpm-tmp.htRz2i: Header V3 DSA/SHA1 Signature, key ID c431416d: NOKEY
Preparing… ########################################### [100%]
1:jpackage-utils warning: /etc/maven/maven2-depmap.xml created as /etc/maven/maven2-depmap.xml.rpmnew
########################################### [100%]
[root@tempest ~]
Okay, at least that added something to our system. Let’s see how the search goes:
yum –enablerepo=epel,rpmforge search tomcat6 tomcat6-webapps tomcat6-admin-webapps
Loaded plugins: downloadonly, product-id, refresh-packagekit, security, subscription-manager
This system is receiving updates from Red Hat Subscription Management.
rhel-6-server-cf-tools-1-rpms | 2.8 kB 00:00
rhel-6-server-rhev-agent-rpms | 3.1 kB 00:00
rhel-6-server-rpms | 3.7 kB 00:00
=============================================== N/S Matched: tomcat6 ===============================================
glite-security-trustmanager-tomcat6.noarch : Java trustmanager interface supporting a GSI grid name space
tomcat6.noarch : Apache Servlet/JSP Engine, RI for Servlet 2.5/JSP 2.1 API
tomcat6-el-2.1-api.noarch : Expression Language v1.0 API
tomcat6-jsp-2.1-api.noarch : Apache Tomcat JSP API implementation classes
tomcat6-lib.noarch : Libraries needed to run the Tomcat Web container
tomcat6-servlet-2.5-api.noarch : Apache Tomcat Servlet API implementation classes
Name and summary matches mostly, use “search all” for everything.
Warning: No matches found for: tomcat6-webapps
Warning: No matches found for: tomcat6-admin-webapps
[root@tempest yum.repos.d]
Nope, utter failure.
Hang on, (more googling and, more importantly, logging into my old redhat account and searching the knowledge base finds this page:
https://access.redhat.com/site/solutions/56374
Which promises to exactly answer my question, but since we are now until LTS and I don’t have the password, I can’t read the answer. So, I asked Andrew Maroney to look at it for me. Turns out that the two -webapps packages are in RHEL optional, so we have to enable that repo:
[root@tempest yum.repos.d] yum-config-manager –enable rhel-6-server-optional-rpms
and now:
[root@tempest yum.repos.d] yum search tomcat6-webapps tomcat6-admin-webapps
Loaded plugins: downloadonly, product-id, refresh-packagekit, security, subscription-manager
This system is receiving updates from Red Hat Subscription Management.
rhel-6-server-cf-tools-1-rpms | 2.8 kB 00:00
rhel-6-server-optional-rpms | 3.5 kB 00:00
rhel-6-server-rhev-agent-rpms | 3.1 kB 00:00
rhel-6-server-rpms | 3.7 kB 00:00
=========================================== N/S Matched: tomcat6-webapps ===========================================
tomcat6-webapps.noarch : The ROOT and examples web applications for Apache Tomcat
======================================== N/S Matched: tomcat6-admin-webapps ========================================
tomcat6-admin-webapps.noarch : The host-manager and manager web applications for Apache Tomcat
Name and summary matches mostly, use “search all” for everything.
[root@tempest yum.repos.d]
Yay! So I don’t need EPEL or Rpmforge at all:
[root@tempest yum.repos.d] yum install tomcat6 tomcat6-webapps tomcat6-admin-webapps
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package tomcat6-admin-webapps.noarch 0:6.0.24-62.el6 will be installed
—> Package tomcat6-webapps.noarch 0:6.0.24-62.el6 will be installed
–> Processing Dependency: jakarta-taglibs-standard >= 1.1 for package: tomcat6-webapps-6.0.24-62.el6.noarch
–> Running transaction check
—> Package jakarta-taglibs-standard.noarch 0:1.1.1-11.4.el6 will be installed
—> Package tomcat6.noarch 0:6.0.24-62.el6 will be installed
10gen/filelists | 5.3 kB 00:00
rhel-6-server-cf-tools-1-rpms/filelists_db | 11 kB 00:00
rhel-6-server-optional-rpms/filelists_db | 4.5 MB 00:01
rhel-6-server-rhev-agent-rpms/filelists_db | 12 kB 00:00
rhel-6-server-rpms/filelists_db | 14 MB 00:07
–> Processing Dependency: tomcat6-lib = 6.0.24-62.el6 for package: tomcat6-6.0.24-62.el6.noarch
–> Processing Dependency: jakarta-commons-pool for package: tomcat6-6.0.24-62.el6.noarch
–> Processing Dependency: jakarta-commons-dbcp for package: tomcat6-6.0.24-62.el6.noarch
–> Processing Dependency: jakarta-commons-daemon for package: tomcat6-6.0.24-62.el6.noarch
–> Processing Dependency: jakarta-commons-collections for package: tomcat6-6.0.24-62.el6.noarch
–> Running transaction check
—> Package jakarta-commons-collections.noarch 0:3.2.1-3.4.el6 will be installed
—> Package jakarta-commons-daemon.x86_64 1:1.0.1-8.9.el6 will be installed
—> Package jakarta-commons-dbcp.noarch 0:1.2.1-13.8.el6 will be installed
—> Package jakarta-commons-pool.x86_64 0:1.3-12.7.el6 will be installed
—> Package tomcat6-lib.noarch 0:6.0.24-62.el6 will be installed
–> Processing Dependency: tomcat6-servlet-2.5-api = 6.0.24-62.el6 for package: tomcat6-lib-6.0.24-62.el6.noarch
–> Processing Dependency: tomcat6-jsp-2.1-api = 6.0.24-62.el6 for package: tomcat6-lib-6.0.24-62.el6.noarch
–> Processing Dependency: tomcat6-el-2.1-api = 6.0.24-62.el6 for package: tomcat6-lib-6.0.24-62.el6.noarch
–> Running transaction check
—> Package tomcat6-el-2.1-api.noarch 0:6.0.24-62.el6 will be installed
—> Package tomcat6-jsp-2.1-api.noarch 0:6.0.24-62.el6 will be installed
—> Package tomcat6-servlet-2.5-api.noarch 0:6.0.24-62.el6 will be installed
–> Finished Dependency Resolution
Dependencies Resolved
Installed:
tomcat6-admin-webapps.noarch 0:6.0.24-62.el6 tomcat6-webapps.noarch 0:6.0.24-62.el6
Dependency Installed:
jakarta-commons-collections.noarch 0:3.2.1-3.4.el6 jakarta-commons-daemon.x86_64 1:1.0.1-8.9.el6
jakarta-commons-dbcp.noarch 0:1.2.1-13.8.el6 jakarta-commons-pool.x86_64 0:1.3-12.7.el6
jakarta-taglibs-standard.noarch 0:1.1.1-11.4.el6 tomcat6.noarch 0:6.0.24-62.el6
tomcat6-el-2.1-api.noarch 0:6.0.24-62.el6 tomcat6-jsp-2.1-api.noarch 0:6.0.24-62.el6
tomcat6-lib.noarch 0:6.0.24-62.el6 tomcat6-servlet-2.5-api.noarch 0:6.0.24-62.el6
Complete!
[root@tempest yum.repos.d]
Whew! Okay, let’s try starting tomcat:
[root@tempest yum.repos.d] service tomcat6 start
Starting tomcat6: [ OK ]
That’s nice. If we browse to the Tomcat home page, we see the logo; yay!
Now we need to start configuring it. We should look at the kinds of things we did with Tomcat5 on Puma; hopefully the changes will be similar.
We should also look at these:
http://tomcat.apache.org/tomcat-6.0-doc/setup.html
http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html