Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to install Tomcat7 on an Amazon EC2 instance, but it doesn't work. Below is the console output:

[ec2-user@ip-XXX ~]$ sudo yum install tomcat7
Loaded plugins: amazon-id, rhui-lb, security
Setting up Install Process
No package tomcat7 available.
Error: Nothing to do

Additionally I would also like to install the Tomcat connector native libraries.

[ec2-user@ip-XXX ~]$ sudo yum repolist
Loaded plugins: amazon-id, rhui-lb, security
rhui-REGION-client-config-server-6  | 2.6 kB   00:00
rhui-REGION-rhel-server-releases    | 3.7 kB   00:00
rhui-REGION-rhel-server-releases-optional | 3.5 kB     00:00
repo id                                     repo name                          status
rhui-REGION-client-config-server-6          Red Hat Update Infrastructure 2.0 Client Configuration Server 6  5
rhui-REGION-rhel-server-releases            Red Hat Enterprise Linux Server 6 (RPMs)                  11,976
rhui-REGION-rhel-server-releases-optional   Red Hat Enterprise Linux Server 6 Optional (RPMs)   6,833
repolist: 18,814

[ec2-user@ip-XXX ~]$ sudo yum list tomcat7*
Loaded plugins: amazon-id, rhui-lb, security
Error: No matching Packages to list
share|improve this question
Can you post the output of "sudo yum repolist" and "sudo yum list tomcat7*"? – kernelpanic Nov 22 '13 at 16:52
I added the output to the question – Adrian Ber Nov 22 '13 at 18:30

Tomcat7 is not available in the yum Repo on EC2. So this is how installed tomcat 7 on my RHEL 6.4 EC2 instance:

First, I wanted oracle jdk.

Oracle JDK installation:

Remove any existing JDKs

# rpm -qa | grep jdk
# rpm -e java-1.6.0-openjdk- java-1.7.0-openjdk-

Download and Install Oracle JDK

# wget --no-cookies --no-check-certificate --header "Cookie:" ""
# mv jdk-7u45-linux-x64.rpm\?AuthParam\=1385533795_9ebb9bbbd4d15a8ca5d17a0dab41fedc jdk-7u45-linux-x64.rpm
# rpm -ivh jdk-7u45-linux-x64.rpm


# java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
# javac -version
javac 1.7.0_45


# echo "export JAVA_HOME=/usr/java/default" >> /etc/profile
# source /etc/profile

Tomcat 7 Installation:

Download Tomcat

# wget
# tar -xvzf apache-tomcat-7.0.47.tar.gz
# mv apache-tomcat-7.0.47 /usr/share/

Make tomcat run as a script.

# cat > /etc/init.d/tomcat < EOF
# description: Tomcat Start Stop Restart
# processname: tomcat
# chkconfig: 234 20 80
export JAVA_HOME
export PATH

case $1 in
exit 0

Tomcat service commands:

# chmod 755 /etc/init.d/tomcat
# chkconfig  --add tomcat
# chkconfig  tomcat on
# chkconfig  --list tomcat
# service tomcat start
Using CATALINA_BASE:   /usr/share/apache-tomcat-7.0.47
Using CATALINA_HOME:   /usr/share/apache-tomcat-7.0.47
Using CATALINA_TMPDIR: /usr/share/apache-tomcat-7.0.47/temp
Using JRE_HOME:        /usr/java/default
Using CLASSPATH:       /usr/share/apache-tomcat-7.0.47/bin/bootstrap.jar:/usr/share/apache-tomcat-7.0.47/bin/tomcat-juli.jar

Add JAVA_OPTS as below on 2nd line on /usr/share/apache-tomcat-7.0.47/bin/ so that it looks like:

JAVA_OPTS="-Xms1024m -Xmx2048m"

Restart Tomcat

# service tomcat restart


# netstat  -anp | grep 8080
tcp        0      0 :::8080                     :::*                        LISTEN      1792/java

You can configure tomcat to be run a normal user as well. It wasn't needed in my case and hence I did not do it. Hope this helps.

share|improve this answer

just search for tomcat instead of tomcat7*

#yum search tomcat
apache-tomcat-apis.noarch : Tomcat Servlet and JSP APIs
jakarta-commons-dbcp-tomcat5.noarch : DBCP dependency for Tomcat5
jakarta-commons-pool-tomcat5.x86_64 : Pool dependency for Tomcat5
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
tomcatjss.noarch : JSSE implementation using JSS for Tomcat
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
share|improve this answer
I'm afraid this doesn't help the OP, tomcat7 does not appear in the output of the search command above. Consider adding information that would benefit the OP to solve the posted problem. – KM. Apr 15 '15 at 20:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.