To install Tomcat, first we need to install a JDK. Steps to install JDK.
- Login to AWS EC2 instance with putty.
- sudo su
- Create a directory for Java installation. cd /usr/share, mkdir java, cd java.
- Download a JDK from Oracle. wget http://download.oracle.com/otn-pub/java/jdk/7u2-b13/jdk-7u2-linux-i586.tar.gz
- Install it. tar -xzf jdk-7u2-linux-i586.tar.gz
- Test it. /usr/share/java/ jdk1.7.0_02/bin/java -version.
Install Tomcat.
- Download Tomcat to /usr/share directory. wget http://www.trieuvan.com/apache/tomcat/tomcat-7/v7.0.23/bin/apache-tomcat-7.0.23.tar.gz
- Install Tomcat. tar -xzf apache-tomcat-7.0.23.tar.gz
- set JAVA_HOME $env in catalina.sh. cd /usr/share/apache-tomcat-7.0.23/bin,
vi catalina.sh and add following line after the first line. JAVA_HOME=/usr/share/java-1.7.0/jdk1.7.0_02
- Start it. ./start.sh. Check log and fix errors if any.
Next I will talk about
creating a startup/shutdown script.
No comments:
Post a Comment