|
|
- Info
Preparing the Operating System
Note: Return to reference manual view.
This guide contains the core installation instructions that are common to all GRIA services. Topics covered include installing Java and Tomcat, war file deployment and firewall configuration.
1.
Windows
Preparing Windows XP and Windows 2003 Server
Installing
Windows
Before installing the GRIA package on a Windows system, you
will
require the following:
- The Windows
installation CD, Service Packs, etc.
- User with
administrator privileges to install GRIA.
N.B. There are several ways to install and
configure Windows, so you are advised to consult your system manager
and set-up the system according to your needs.
This page explains how to install and configure all Windows
prerequisites and how to configure the firewall.
Software
Pre-requisites
The Windows distribution CD does not include several of the
necessary packages. These are Java 1.5.x (5.0) and
Tomcat
5.5.x which must be installed separately. In addition if you are
installing the GRIA Basic Application Services then Perl is a
pre-requisite and, optionally, if you wish to use the demo
applications, ImageMagick e.g. version later than 6.0.x. The
following sections describe how to install and configure these packages
for Windows
Java Installation
Download the JDK 5.0
Update for the Windows platform from Sun (the file will have
the form jdk-1_5_x__xx-i586-p.exe).
Double-click on the downloaded binary to run the installer, and during
installation use the default values.
Tomcat
installation
Download version 5.5.20 or higher of the Windows Service Installer Package.
Install Tomcat by double-clicking on the downloaded package
e.g. apache-tomcat-5.5.20.exe.
During installation use the default values, ensuring that:
- the path for JVM points to the SDK directory and NOT
the JRE, e.g. C:\Program
Files\Java\j2sdk1.5.0_05
- a password
for the Tomcat admin account is provided.
Configuring
the Firewall
The deployed GRIA war (or webapp) should be hosted behind a
firewall to ensure that your
server can only be accessed on certain ports. You should consult with
your systems administrator to determine if you need to run a firewall
on the GRIA server machine.
Windows XP by default runs a firewall which blocks ports 8080,
and 8443. However, Windows 2003 Server by default does not run a firewall. If you decide to run a firewall on the machine hosting the
GRIA services,
you will need to open port 8080 and 8443 during installation. The firewall can be configured by:
choosing the Windows
Firewall from the Control Panel, then click on Exceptions -> Add
Port and enter name and number:
- Tomcat, 8080 and leave transport
protocol as TCP
- Tomcat (secure), 8443 and leave transport
protocol as TCP
When you've finished setting up GRIA you can block port 8080 again.
Configuring NTP
In order to provide some synchronisation between the
clocks on
machines that the various GRIA packages are installed on, it is
recommended to run an NTP client service
that will synchronise your system with an
Internet time server.
There are several NTP client implementations available, e.g. Meinberg's
NTP client. If you decide to use this one, then during
installation select the default options except for the "Configuration
File Settings" dialogue. Here you should select an NTP server from the
"Want to use predefined public NTP servers" drop-down list that is
geographically located closest to you.
Starting Tomcat
The easiest way to control Tomcat on Windows is to use the
Tomcat Monitor tool. This is available by selecting Start -> All
Programs-> Apache Tomcat 5.5 -> Monitor Tomcat. Once it
is started you will notice a new icon on your taskbar. Right-click on
the icon to start and stop the tomcat service. If you want the tomcat
service to automatically start on boot-up right-click on the icon and
select "Configure". Then change startup type to "Automatic".
2.
Fedora
Preparing Fedora
2.1.
Fedora Core 3
Fedora Core 3
Installing
the Fedora Core 3 Operating System
If you feel confident in installing the server installation of
Fedora
Core 3, you may skip this section but make sure to install the
pre-requisites 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 set up the system according
to your
needs. The following notes describe a simple way to install and
configure a
headless Fedora system for deployment of a GRIA war.
Having satisfied the above, the installation process is as
follows:
- Place the Fedora Core 3 CD1 into the CD-ROM drive
and boot the system from the CD, pressing enter at the boot prompt
(install in graphical mode).
- Test the CD media
(optional).
- Click Next on the Welcome
to Fedora Core screen.
- Choose language
(e.g. English) on the Language Selection screen.
- On the Keyboard Configuration screen
choose keyboard, e.g. United Kingdom.
- On Upgrade/Install
Examine screen choose Install Fedora Core.
- On the Installation Type screen choose Server.
- 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.
- Enter the appropriate settings for the Network
Configuration screen. If you do not have a DHCP server, enter
the hostname, etc manually.
- On the Firewall
Configuration screen, select Enable firewall
and choose SSH and Web Server
services. You may want to disable SELinux by
selecting this option in the drop down menu.
- In
the Additional Language Support screen, add any
additional language support you require e.g. "English (Great Britain)"
and set your preferred default language.
- Set the
correct time zone in the Time Zone Selection screen.
- Set the root password in Set Root Password
screen.
- The machine will reboot at the end of the
installation.
After the installation from CD is complete, we
recommend updating the system
with the latest patches. This may be done using the yum command:
- First (as root) import the
Fedora public key (for checking package integrity):
# rpm --import /usr/share/rhn/RPM-GPG-KEY-fedora
- Update your system (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 the GRIA war is to function
correctly. It is important to install any dependencies which may also
required by these software pre-requisites:
- Sun
Java JDK v1.5.0 or
higher
- Jakarta Tomcat v5.5.x
- Apache
HTTP server
v2.0 (an optional package to provide secure access)
- Perl
v5.6 or higher (only required for the GRIA Basic Application Services
package)
- A sample, test application: ImageMagick(only
required for the GRIA Basic Application Services package)
- An Internet browser, e.g. Mozilla Firefox
(which may be installed on a different machine)
- Optional
utility packages:
If you have followed the installation instructions
above then your system
already has Apache and Perl installed. You must now
download and install the Sun Java JDK and Tomcat.
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 3 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 in the /opt
directory 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.20.tar.gz
- Create a symbolic link for Tomcat
# ln -s apache-tomcat-5.5.20 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:
# useradd -d /opt/tomcat tomcat
- Alter the ownership of the directory to the
tomcat user created above:
# chown -R 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: fc3-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:
- First import the Fedora public key (for checking
package integrity) if you have not already done so:
# rpm --import /usr/share/rhn/RPM-GPG-KEY-fedora
- Install ImageMagick (and any dependencies):
# yum install ImageMagick
Setting the System Clock
In order to provide some synchronisation between the clocks on
machines that the various GRIA packages are installed on, it is recommended to run an NTP client service
that will synchronise your system with an
Internet time server.
Fedora comes with an NTP package which is installed by default in the
server
installation. To see if NTP is installed, log in as root
and type:
# rpm -qi ntp
If you see "package ntp is
not installed" then install NTP either
from the CDs or by using yum:
# yum install ntp
The NTP daemon must be
configured using the file /etc/ntp.conf.
If you are using DHCP then your DHCP
server may automatically configure this file. Further instructions
regarding
NTP are beyond the scope of this manual.
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.
o enable Tomcat administration and management we must add a role and a tomcat user to the tomcat-users.xml
file.
- Open the $CATALINA_HOME/conf/tomcat-users.xml
file with a suitable editor and add this element after the last
'role' element:
<role rolename="manager"/> <role rolename="admin"/>
- Add this line after the last 'user' element,
replacing TOMCAT_PASSWORD with an appropriate password:
<user username="tomcat" password="TOMCAT_PASSWORD" roles="admin,manager"/>
- Save the file
Configuring
the Firewall
The deployed GRIA war (or webapp) should be hosted behind a firewall to ensure that your
server can only be accessed on certain ports. You should consult with your systems
administrator
to determine if you need to run a firewall.
If so,
configure the firewall as follows:
- As root, run:
# system-config-securitylevel
- Enable firewall and continue with Customize (use the TAB
key
to move fields and the SPACEBAR key to select)
- Do not select any "Trusted Devices", e.g. eth0
- Allow incoming connections for "SSH" and "WWW (HTTP)"
- In the "Other ports" box type: "https:tcp 8080:tcp" to
permit secure access to Apache and temporarily
enable insecure access to Tomcat
- Finish firewall configuration by selecting "OK"
Configuring SELinux
SELinux
is an option during the
installation process. It provides better security than standard linux
installations. If you are not sure whether SELinux is installed, then
type (as
root):
# setsebool
If you get "Command not
found" then SELinux is not installed and no
configuration is necessary. Otherwise, if you chose to install SELinux
then it
must be configured to let the Apache web server communicate with the
Tomcat web
server. To do this, enter the following command as root:
# setsebool -P httpd_can_network_connect=1
Starting
Services
There are two services that need to be started: Tomcat and
NTP. NTP is easily managed by the system and may be started
with this command:
# service ntpd start
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
It
is useful to have the NTP daemon start automatically when
the server is rebooted. This can be done by typing the following as the
root
user:
# chkconfig ntpd on
2.2.
Fedora Core 4
Preparing Fedora Core 4
Preparing Fedora Core 4
Installing
the Fedora Core 4 Operating System
If you feel confident in installing the server installation of
Fedora
Core 4, you may skip this section but make sure to install the
pre-requisites
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 set up 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:
- Place the Fedora Core 4 CD1 into the CD-ROM drive
and boot the system from the CD, pressing enter at the boot prompt
(install in graphical mode).
- Test the CD media
(optional).
- Click Next on the Welcome
to Fedora Core screen.
- Choose language
(e.g. English) on the Language Selection screen.
- On the Keyboard Configuration screen
choose keyboard, e.g. United Kingdom.
- On Upgrade/Install
Examine screen choose Install Fedora Core.
- On the Installation Type screen choose Server.
- 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.
- Enter the appropriate settings for the Network
Configuration screen. If you do not have a DHCP server, enter
the hostname, etc manually.
- On the Firewall
Configuration screen, select Enable firewall
and choose SSH and Web Server
services. You may want to disable SELinux by
selecting this option in the drop down menu.
- Set
the correct time zone in the Time Zone Selection
screen.
- Set the root password in Set
Root Password screen.
- The machine will
reboot at the end of the installation.
After the installation from CD 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:
- Sun
Java JDK v1.5.0 or
higher
- Jakarta Tomcat v5.5.x
- Apache
HTTP server
v2.0 (an optional package to provide secure access)
- Perl
v5.6 or higher (only required for the GRIA Basic Application
Services
package)
- A sample, test application: ImageMagick(only
required for the GRIA Basic Application Services
package)
- An Internet browser, e.g. Mozilla Firefox
(which may be installed on a different machine)
- Optional
utility packages:
If you have followed the installation instructions
above then your system
already has Apache and Perl installed. The Fedora Core
4 distribution CDs 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 4 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 in the /opt
directory 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.20.tar.gz
- Create a symbolic link for Tomcat
# ln -s apache-tomcat-5.5.20 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:
# useradd -d /opt/tomcat tomcat
- Alter the ownership of the directory to the
tomcat user created above:
# chown -R 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
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 the
System Clock
In order to provide some synchronisation between the clocks on
machines that the various GRIA packages are installed on, it is recommended to run an NTP client service
that will synchronise your system with an
Internet time server.. Fedora comes with an NTP package which is installed by default in the
server
installation. To see if NTP is installed, log in as root
and type:
# rpm -qi ntp
If you see "package ntp is
not installed" then install NTP either
from the CDs or by using yum:
# yum install ntp
The NTP daemon must be
configured using the file /etc/ntp.conf.
If you are using DHCP then your DHCP
server may automatically configure this file. Further instructions
regarding
NTP are beyond the scope of this manual.
Configuring
the Firewall
The deployed GRIA war (or webapp) should be hosted behind a firewall to ensure that your
server can only be accessed on certain ports. You should consult with your systems
administrator
to determine if you need to run a firewall on the GRIA server machine.
If so,
configure the firewall as follows:
- As root, run:
# system-config-securitylevel
- Enable firewall and continue with Customize (use the TAB
key
to move fields and the SPACEBAR key to select)
- Do not select any "Trusted Devices", e.g. eth0
- Allow incoming connections for "SSH", "WWW (HTTP)" and
"Secure WWW (HTTPS)"
- In the "Other ports" box type: "8080:tcp" to temporarily
enable insecure access to Tomcat
- Finish firewall configuration by selecting "OK"
Configuring SELinux
SELinux
is an option during the
installation process. It provides better security than standard linux
installations. If you are not sure whether SELinux is installed, then
type (as
root):
# setsebool
If you get "Command not
found" then SELinux is not installed and no
configuration is necessary. Otherwise, if you chose to install SELinux
then it
must be configured to let the Apache web server communicate with the
Tomcat web
server. To do this, enter the following command as root:
# setsebool -P httpd_can_network_connect=1
May
need to set another bool to enable httpd to communicate with the
terminal
(needed for cert handling)
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.
o enable Tomcat administration and management we must add a role and a tomcat user to the tomcat-users.xml
file.
- Open the $CATALINA_HOME/conf/tomcat-users.xml
file with a suitable editor and add this element after the last
'role' element:
<role rolename="manager"/> <role rolename="admin"/>
- Add this line after the last 'user' element,
replacing ADMIN_PASSWORD and GRIA_PASSWORD with appropriate passwords:
<user username="tomcat" password="TOMCAT_PASSWORD" roles="admin,manager"/>
- Save the file
Starting Services
There are two services that need to be started: Tomcat and
NTP. NTP is easily managed by the system and may be started
with this command:
# service ntpd start
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
It
is useful to have the NTP daemon start automatically when
the server is rebooted. This can be done by typing the following as the
root
user:
# chkconfig ntpd on
2.3.
Fedora Core 5
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.
- Boot the system with the FC5 boot.iso CD and press Enter on the Welcome
to Fedora Core screen.
- Choose language
(e.g. English) on the Language Selection screen.
- On the Keyboard Configuration screen
choose keyboard, e.g. United Kingdom.
- Choose the installation method, e.g. in our case select HTTP.
- Enter the appropriate settings for the Network
Configuration screen. If you do not have a DHCP server, enter
the hostname, etc manually.
- 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.
- 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.
- Follow the installation screens in order to complete the system installation.
- 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:
- Sun
Java JDK v1.5.0 or
higher
- Jakarta Tomcat v5.5.x
- Apache
HTTP server
v2.0 (an optional package to provide secure access)
- Perl
v5.6 or higher (only required for the GRIA Basic Application
Services
package)
- A sample, test application: ImageMagick(only
required for the GRIA Basic Application Services
package)
- An Internet browser, e.g. Mozilla Firefox
(which may be installed on a different machine)
- Optional
utility packages:
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):
- 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 /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):
- 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.20.tar.gz
- Create a symbolic link for Tomcat
# ln -s apache-tomcat-5.5.20 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:
# useradd -d /opt/tomcat 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
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
3.
SuSE
Preparing SuSE
3.1.
SuSE 9.2
Preparing SuSE 9.2
Introduction
This page explains
how to install and configure all SuSE 9.2 pre-requisites, configure a
firewall and set-up Tomcat for deployment of a GRIA war.
Software Pre-requisites
This page describes the pre-requisites for the SuSE 9.2 Professional operating
system, all of which can be installed using the YaST2 systems configuration
tool. They are as follows:
- The Java SDK v1.5.0 (5.0) or higher
- java-1_5_0-sun
- java-1_5_0-sun-devel
- Jakarta
Tomcat 5
- tomcat5
- tomcat5-admin-webapps
- tomcat5-webapps
- Apache
Server v2.0 (an optional package to provide secure access)
- apache2
- apache2-prefork
- mod_jk-ap20
- A web browser, such as Firefox (can be installed
on a different machine)
- A sample application (only required for the GRIA Basic Application Services package)
In order to provide some synchronisation between the clocks on
machines that the various GRIA packages are installed on, it is recommended to run an NTP client service
that will synchronise your system with an
Internet time server.
Having installed the Linux base platform, configure the Network
Services to use an NTP server. For SuSe 9.2 this is done as follows:
- Run
YaST2 and select 'Network Services'
- From
here, choose 'NTP Client' and select an NTP server, setting it to start
on boot up. If you don't have an NTP server available on your local
network then select a public one e.g. a.ntp.alphazed.net in Great
Britain.
Having configured the machine to use NTP, the
system should then be restarted to ensure the changes made during the
installation of the above pre-requisites are applied.
This completes the installation of the
pre-requisites under SuSE 9.2 Professional.
Configuring the
Firewall
The deployed GRIA war (or webapp) should be hosted behind a firewall to ensure that your
server can only be accessed on certain ports. You should consult with
your systems administrator to determine if you need to run a firewall
on the machine hosting the GRIA webapp. If so, configure the firewall as follows:
- Run
YaST2 (as root).
- Click on Security and Users.
- Click on Firewall.
- Select
interface settings appropriate for your network. In most cases, you can
set the External Interface to any. The Internal
Interface can be left as (none).
- On
the next page, ensure that only HTTP with SSL (https)
is selected. If you require SSH access to the machine then select Secure
Shell (ssh).
- On the next page, you can
leave the default settings for the Firewall Features.
- Click
on Finish to put the settings into effect.
Set-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 role and a tomcat user to the tomcat-users.xml
file.
- Open the $CATALINA_HOME/conf/tomcat-users.xml
file with a suitable editor and add this element after the last
'role' element:
<role rolename="manager"/> <role rolename="admin"/>
- Add this line after the last 'user' element,
replacing ADMIN_PASSWORD and GRIA_PASSWORD with appropriate passwords:
<user username="tomcat" password="TOMCAT_PASSWORD" roles="admin,manager"/>
- Save the file
Start Tomcat
Having installed and
configured the pre-requisites, the
next step it to start Tomcat. The following commands assume that the pre-packaged
version of Tomcat has been installed with SuSE.
To start Tomcat:
$ su # rctomcat5 start
To
stop Tomcat:
$ su # rctomcat5 stop
To
restart Tomcat:
$ su # rctomcat5 start
To
get the status of Tomcat:
$ su # rctomcat5 status
Test
it with your browser by pointing to your machine URL, i.e. http://<host IP>:8080, you should be
able to access your Tomcat server home page.
3.2.
SuSE 9.3 - 10.2
Preparing SuSE 9.3 - 10.2
Introduction
This page explains how to
install and configure
all pre-requisites for SuSE 9.3 - 10.1, configure a firewall on
the GRIA server machine and set-up Tomcat for or deployment of a GRIA war.
Software Prerequisites
This page describes how the prerequisites for SuSE can be installed using the YaST2
systems configuration tool. They are as follows:
- The Java SDK v1.5.0 (5.0) or higher
- java-1_5_0-sun
- java-1_5_0-sun-devel
- Jakarta
Tomcat 5
- Apache
Server v2.0 (an optional package to provide secure access)
- apache2
- apache2-prefork
- mod_jk-ap20
- A web browser, such as Firefox (can be installed
on a different machine)
- A sample application (only required for the GRIA Basic Application Services package)
You can use either Tomcat or Apache to provide secure access. If you
are unsure then choose Tomcat as it is easier to set up.
In order to provide some synchronisation between the clocks on
machines that the various GRIA packages are installed on, it is recommended that you run an NTP client
that will synchronise your system with an
Internet time server.
Having installed the Linux base platform, configure the Network
Services to use an NTP server. This is done as follows:
- Run
YaST2 and select 'Network
Services'
- From here, choose 'NTP Client' (or 'NTP Configuration') and
select an NTP server, setting it to start on boot up. If you don't have
an NTP server available on your local network then select a public one
e.g. a.ntp.alphazed.net in Great Britain.
Having configured the machine to use NTP, the
system should then be restarted to ensure the changes made during the
installation of the above pre-requisites are applied.
This completes the installation of the GRIA software
prerequisites.
Configuring the
Firewall
The deployed GRIA war (or webapp) should be hosted behind a firewall to ensure that your
server can only be accessed on certain ports. You should consult with
your systems administrator to determine if you need to run a firewall
on the machine hosting the GRIA webapp. If so, configure the firewall as follows:
- Run
YaST2 (as root).
- Click on Security
and Users.
- Click on Firewall.
- Select Interfaces from the menu and set
interfaces appropriate to you network. You may need to discuss this
with your systems administrator.
- Select Allowed
Services from the menu, then:
- add a HTTPS
server.
- add a HTTP
server.
- Use the Advanced button to add TCP port 8080. If you intend to use Tomcat for secure access then also add port the 8443.
- if you require Secure Shell access then also add SSH.
- Click on Next and
then Accept to finalise the settings.
- Start the firewall.
Set-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 role and a tomcat user to the tomcat-users.xml
file.
- Open the $CATALINA_HOME/conf/tomcat-users.xml
file with a suitable editor and add this element after the last
'role' element:
<role rolename="manager"/> <role rolename="admin"/>
- Add this line after the last 'user' element,
replacing ADMIN_PASSWORD with an appropriate password:
<user username="admin" password="ADMIN_PASSWORD" roles="admin,manager"/>
- Save the file
Start Tomcat
Having installed and
configured the pre-requisites, the
next step it to start Tomcat. The following commands assume that the pre-packaged
version of Tomcat has been installed with SuSE.
To start Tomcat:
$ su # rctomcat5 start
To
stop Tomcat:
$ su # rctomcat5 stop
To
restart Tomcat:
$ su # rctomcat5 start
To
get the status of Tomcat:
$ su # rctomcat5 status
Test
it with your browser by pointing to your machine URL ( http://<host IP>:8080). You should be
able to access your Tomcat server home page.
3.3.
Running YaST2
Using the YaST 2 configuration tool
The main systems configuration tool for SuSE is called YaST.
This may be launched in the following ways:
Using graphical display (KDE)
Simply click the SuSE icon at the bottom left of your graphical
display, to bring up the System menu, then select the YaST icon.
Command line (with graphical display)
Log onto your machine as root, open a window then type the
following command:
# yast2 Command line (non-graphical
display)
Log onto your machine as root, open a window then type the
following command:
# yast
4.
Installing GRIA on Ubuntu/Debian
This document describes how to install GRIA on Ubuntu 6.06.1 (dapper) server. The installation procedure should very similar for Ubuntu desktop and Debian systems too.
In order to install Java and Tomcat in your system you need to configure your source.list to include universe and multiverse repositories.
As root edit /etc/apt/sources.list to include universe and multiverse repositories, e.g. sudo vi /etc/apt/sources.list
Then make sure your sources.list includes a line similar to the following:
deb http://[xx].archive.ubuntu.com/ubuntu dapper main restricted universe multiverse
where xx is a country code, e.g. gb, us, de, etc. For Debian systems add non-free at the end of your current entry, e.g.
deb http://ftp.uk.debian.org/debian/ etch main non-free
Then update the system repository e.g. sudo apt-get update
Installing Java
Run the following command to install sun-java5-jdk packages: sudo apt-get install sun-java5-jdk
The system will prompt you to accept the DJK license, reply yes. You can test the installed java version in your system executing the following command:
$ java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
Installing tomcat5
Run the following command to install tomcat5.5 packages:
$ sudo apt-get install tomcat5.5 tomcat5.5-admin tomcat5.5-webapps
Edit /etc/default/tomcat5 to:
Edit /var/lib/tomcat5/conf/tomcat-users.xml file to add a manager role, e.g.
<?xml version='1.0' encoding='utf-8'?> <tomcat-users> ... <role rolename="manager"/> <role username="manager" password="xxxxxx" roles="manager"/> ... </tomcat-users>
At this point refer to the GRIA documentation e.g. GRIA user guide, Deploying the Services to Tomcat.
NOTE: the default port of the tomcat server page is on 8180 NOT 8080, e.g. http://<servername>:8180
Setting the system clock
In order to provide some synchronisation between the clocks on
machines that the various GRIA packages are installed on, it is recommended that you run an NTP client service
that will synchronise your system with an
Internet time server. On Debian and Ubuntu systems, this can be done using the ntpdate or ntp packages.
If the time difference between the client and server clocks is greater than a few minutes, messages may be rejected.
|