- Get java from http://java.sun.com/javase/downloads/index.jsp, install JRE self extracting file jre-6u3-linux-i586.bin into the root of the linux system, then follow these command from the linux system
- mkdir /java
- mv /jre-6u3-linux-i586.bin /java/
- cd /java
- chmod 555 jre-6u3-linux-i586.bin
- ./jre-6u3-linux-i586.bin
- rm jre-6u3-linux-i586.bin
- Setup Java environment variables
- cd ~
- nano .bash_profile
- add lines
JAVA_HOME=/java/jre1.6.0_03
export JAVA_HOME
JAVAHOME=/java/jre1.6.0_03
export JAVAHOME - lower down, change from
PATH=$PATH:$HOME/bin
to
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin - exit nano, exit shell, and restart shell to get new environment set up
- Download tomcat 6.0.14 from http://tomcat.apache.org/download-60.cgi#6.0.14 to the root of your linux system as apache-tomcat-6.0.14.tar.gz, and follow these commands to install it
- mkdir /tomcat
- cd /tomcat
- mv /apache-tomcat-6.0.14.tar.gz .
- gunzip -c apache-tomcat-6.0.14.tar.gz | tar xopf –
- rm apache-tomcat-6.0.14.tar.gz
- Setup environment variables for tomcat
- cd ~
- nano .bash_profile
- add lines
CATALINA_HOME=/tomcat/apache-tomcat-6.0.14
export CATALINA_HOME - exit nano, exit shell, and restart shell to get new environment set up
- Test that tomcat is working.
- cd ~CATALINA_HOME/bin
- ./startup.sh
- From browser, verify that http://your-web-domain-address:8080/ returns the default tomcat page
- Change tomcat to run on port 80 instead of 8080
- cd $CATALINA_HOME
- cp conf/server.xml conf/server.xml.original
- nano conf/server.xml
- replace all 8080 with 80, then exit and save
- bin/shutdown.sh
- bin/startup.sh
- From browser, verify that http://your-web-domain-address/ returns the default tomcat page
- Setup manager for Tomcat
- nano $CATALINA_HOME/conf/tomcat-users.xml
- add this user
<tomcat-users>
<role rolename="standard"/>
<role rolename="manager"/>
<user username="managername" password="managerpwd" roles="standard,manager"/>
</tomcat-users>
replace managername and managerpwd with your real, super-duper top-secret values - restart tomcat
$CATALINA_HOME/bin/shutdown.sh
$CATALINA_HOME/bin/shutdown.sh
Tuesday, November 27, 2007
Installing Java and Tomcat (without apache) on base Linux system (Amazon EC2 Fedora Core 4 image)
For YIQYAQ we're running Tomcat as the web server, on basic Linux Fedore Core 4 images at Amazon EC2. These are the steps taken to install Java and Tomcat on those systems and get it running. I'm not much of a Linux, Java, or Tomcat expert, so I can't say these are the best steps to take, only that they're what I did and they seem to work.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment