Installing JDK 5.0, Tomcat 5.5, and Ant on SUSE 10.0

From LQWiki
Jump to navigation Jump to search

Installing Sun JDK 5.0, Eclipse WTP, Apache Tomcat 5.5, and Ant 1.6.x on Novell SUSE 10

Introduction

Like many of you reading this, I am a professional Java developer, skilled in using Windows, but looking to move to Linux.

Steps Involved:

  1. Install JDK
    1. Download and install JDK RPM from Sun
    2. Log in as root
    3. Execute the shell script to unpack binary RPM: ./jdk-1_5_0_06-linux-i586.rpm.bin
    4. Now you have an RPM you can install. You can either click on it in Konqueror or execute the following command. rpm -ivh jdk-1_5_0_06-linux-i586.rpm
  2. Download Other Software.
    1. Download Tomcat from the Apache website.
    2. Download the Tomcat Admin web application from the same site.
    3. Download Ant from Apache website.
    4. Download Eclipse WTP all in one bundle
  3. Unpack Software. I unpack Ant, Tomcat, and Eclipse into '/usr/java', where Sun unzips the JDK.
    chmod 777 /usr/java -R
    unzip apache-tomcat-5.5.15.zip -d /usr/java
    unzip apache-tomcat-5.5.15-admin.zip -d /usr/java
    unzip apache-ant-1.6.5-bin.zip -d /usr/java
    Eclipse - enter these commands in sequence (is there a way to do this with one command?)
    tar xfv wtp-all-in-one-sdk-1.0-linux-gtk.tar.gz
    mv eclipse /usr/java/eclipse
  4. Set Environment Variables. I like to edit /etc/bash.bashrc.local to set these.
    export JAVA_HOME=/usr/java/jdk1.5.0_06
    export JRE_HOME=$JAVA_HOME/jre
    export CATALINA_HOME=/usr/java/apache-tomcat-5.5.17
    export ANT_HOME=/usr/java/apache-ant-1.6.5
    export ECLIPSE_HOME=/usr/java/eclipse
    export PATH=$JAVA_HOME/bin:$PATH:$ANT_HOME/bin:$ECLIPSE_HOME/
  5. Test everything by typing the following commands in a new terminal:
    1. ant
    2. javac -version
    3. eclipse
  6. Setup Tomcat for WTP use:
    1. Edit tomcat-users.xml. Add a username in the manager and administrator role.
    2. Run:
      cd $CATALINA_HOME/bin/
      ./startup.sh
    3. Log into http://localhost:8080/manager/html to confirm there are no startup errors.

Addendum: MySQL

Although MySQL 4.x ships with SUSE Linux 10.0, I had an error with my installation. With that, I realized that maybe my strategy of letting the distribution handle everything is not in my best interest. I installed the RPMs for SUSE Linux Enterprise System 9 and installed them without issue. I installed them in the following order:

  1. server
  2. client
  3. headers and libraries
  4. shared libraries.