Initial system Configuration
There are several ways to install and configure Fedora, we advise consulting
your system manager and setup the system according to your needs. In the following
sections we describe a simple way to install all the necessary prerequisites for GRIA
services on a Fedora system.
Firewall Configuration
For security reasons you should run a firewall. Check your firewall settings
using the following command as root:
# system-config-firewall
Ensure in your firewall configuration that the
following predefined ports: WWW, and Secure WWW are enabled. 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.
SELinux Configuration
To start the configuration tool:
# system-config-selinux
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
In order to provide some synchronisation between the clocks on machines that the various GRIA packages are installed on, we recommend running an NTP client service that will synchronise your system with an Internet time server. From the system settings choose Date and Time section choose the Network Time Protocol tab
and click on the Enable Network Time Protocol button.
Installing
the Software Pre-requisites
Having installed the operating system, the following lists the
pre-requisites which must be installed if a GRIA service is to function
correctly. It is important to install any dependencies which may also
required by these software pre-requisites:
The Fedora 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):
- Move to /opt:
# cd /opt
- Unpack the
binary from the temporary directory:
# sh /tmp/jdk-1_5_x_xx-linux-i586.bin
- Create a symbolic link within this directory:
# ln -s 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):
- Tomcat will be installed under the /opt
directory, therefore move to this directory with:
# cd /opt
- Unpack the Tomcat tarball from the temporary
directory:
# tar xvfz /tmp/apache-tomcat-5.5.xx.tar.gz
- Create a symbolic link for Tomcat
# ln -s apache-tomcat-5.5.xx tomcat
- 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:
# system-config-users
Create a new user called "tomcat" with a home directory of "/opt/tomcat".
- Alter the ownership of the directory to the
tomcat user created above:
# chown -HR tomcat:tomcat tomcat
- 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
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 /opt/tomcat/conf/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
Verify the installation by visiting http://localhost:8080 in your browser.