Preparing Fedora Core 5

Installing the Fedora Core 5 Operating System

If you feel confident in installing the server installation of Fedora Core 5, you may skip this section but make sure to install the pre-requisites, as well as the initial configuration otherwise GRIA war will fail to function correctly.

N.B. There are several ways to install and configure Fedora, so you are advised to consult your system manager and setup the system according to your needs. The following notes describe a simple way to install and configure a headless Fedora system for GRIA war.

Having satisfied the above, the installation process is as follows:

Note: The following describes how to install FC5 using a network installation and booting the system with an FC5 boot.iso CD.

  1. Boot the system with the FC5 boot.iso CD and press Enter on the Welcome to Fedora Core screen.
  2. Choose language (e.g. English) on the Language Selection screen.
  3. On the Keyboard Configuration screen choose keyboard, e.g. United Kingdom.
  4. Choose the installation method, e.g. in our case select HTTP.
  5. Enter the appropriate settings for the Network Configuration screen. If you do not have a DHCP server, enter the hostname, etc manually.
  6. HTTP Setup section, you need to provide the HTTP server and the Fedora Core 5 path, e.g. www.mirrorservice.org, sites/download.fedora.redhat.com/pub/fedora/linux/core/5/i386/os. You might have to find a suitable mirror service to speed up installation.
  7. According to your needs and system settings, choose automatic or manual configuration for the Disk Partitioning Setup screen. Then follow the instructions accordingly, e.g. for the Disk Setup and Boot Loader Configuration screens.
  8. Follow the installation screens in order to complete the system installation.
  9. The machine will reboot at the end of the installation. After rebooting it will prompt to configure some of its basic services.

Initial system Configuration

When the system reboots will prompt to configure its basic services such as Firewall, SELinux, system users, to complete the installation.

Click yes on the license agreement and go into the Firewall configuration.

Firewall Configuration

In this section ensure that the Firewall setting is enabled and check the following predefined ports: WWW, and Secure WWW. Additionally you need to add the following ports 8080 and 8443.

Click on other ports (section to expand) and use the add button to add new ports, type 8080 for the port number and select the protocol type as tcp. Repeat the same steps to add port 8443.

Click next and say yes to overwrite system settings.

You can always change your Firewall settings later, using the following commnad as root:

# system-config-securitylevel

SELinux Configuration

SELinux configuration: leave the default settings to Enforcing, then from the Modify SELinux Policy expand the HTTP Service Section and click on Allow HTTPD scripts and modules to connect to the network.

Date and Time

Click next to the Date and Time section. Choose the Network Time Protocol tab and click on the Enable Network Time Protocol button.

Configure the remaining sections according to your needs.

After the installation is complete, we recommend updating the system with the latest patches. This may be done using the yum command (this may take some time):

# yum update

This completes the installation of the operating system.

Installing the Software Pre-requisites

Having installed the operating system, the following lists the pre-requisites which must be installed if GRIA war is to function correctly. It is important to install any dependencies which may also required by these software pre-requisites:

We recommend using tomcat v.5.0.28 as this version is the one that has been most comprehensively tested with GRIA. However, GRIA has also been used with v5.5.17 so it is possible to employ that version (or higher).

If you have followed the installation instructions above then your system already has Apache and Perl installed. The Fedora Core 5 distribution include RPM packages for Tomcat and for GNU Java. However, to use GRIA you must install Sun Java. Unfortunately, it is very difficult to configure the pre-packaged Tomcat to use Sun Java, so Tomcat must also be manually installed by following the instructions below.

First, download the Java binary JDK selecting the "Linux self-extracting file" (e.g. jdk-1_5_0_05-linux-i586.bin) and Tomcat packages and place them into /tmp directory on the Fedora Core 5 machine. You may find it easiest to do this by downloading the packages to your desktop machine and copying them to the server. Finally, log in to the server machine as the root user ready to install the software.

Install Java

In order to install Java the following must be done (adjusting the version number to your particular package):

  1. Move to /opt:
    # cd /opt
  2. Unpack the binary from the temporary directory:
    # sh /tmp/jdk-1_5_x_xx-linux-i586.bin
  3. Create a symbolic link within this directory:
    # ln -s /usr/java/jdk1.5.x_xx java

Install Tomcat

The following must be done in order to install Tomcat successfully (adjusting the version number to your particular package):

  1. Tomcat will be installed under the /opt directory, therefore move to this directory with:
    # cd /opt
  2. Unpack the Tomcat tarball from the temporary directory:
    # tar xvfz /tmp/jakarta-tomcat-5.0.28.tar.gz
  3. Create a symbolic link for Tomcat
    # ln -s jakarta-tomcat-5.0.28 tomcat
  4. Tomcat will be most secure if it is not run by root, therefore create a user for the tomcat server to run as e.g. "tomcat" with the user's home directory set to /opt/tomcat:
    # useradd -d /opt/tomcat tomcat
  5. Alter the ownership of the directory to the tomcat user created above:
    # chown -HR tomcat:tomcat tomcat
  6. Configure tomcat to use Sun Java by editting /opt/tomcat/bin/catalina.sh. Open the file (e.g. in vi) and add the line JAVA_HOME=/opt/java to the top of the file after the file header, e.g.:
    # system class path used to start Tomcat.
    #
    # CATALINA_PID (Optional) Path of the file which should contains the pid
    # of catalina startup java process, when start (fork) is used
    #
    # $Id: fc4-pre.htm 3715 2006-04-10 14:01:19Z ajw $
    # -----------------------------------------------------------------------------

    JAVA_HOME=/opt/java

    # OS specific support. $var _must_ be set to either true or false.
    cygwin=false

Install Sample Application

The GRIA Basic Application Services package uses demo applications which require the ImageMagick package. You may already have ImageMagick installed. To test for it, log in as root and type:

# rpm -qi ImageMagick

If you see "package ImageMagick is not installed" then the package must be installed, either from the CDs or by using yum:

# yum install ImageMagick

Setting Up Tomcat Users

In order to deploy the war file, the Tomcat Manager for application deployment will be used. The Tomcat manager functions are disabled by default.

To enable Tomcat administration and management we must add a user with appropriate roles to the tomcat-users.xml file. Do this by adding the line:

<user username="tomcat" password="TOMCAT_PASSWORD" roles="admin,manager"/>
replacing TOMCAT_PASSWORD with a suitable password.

Starting Services

As mentioned above, Tomcat should not be run as root, therefore first switch form being the root user to the tomcat user and then start tomcat:

# su tomcat
$ cd /opt/tomcat/bin
$ ./startup.sh

Next Step

Having installed and configured the pre-requisites the following step is to deploy war file in Tomcat. In order to do this make sure the Tomcat service is up and running in your system. Test it with your browser by pointing to your Tomcat server URL, i.e. http://<host IP>:8080 - you should be able to access your Tomcat server home page.

The next step is to deploy the services in Tomcat according to the installation instructions for the package you are installing: