Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Monday, May 25, 2009

IBM ships SSDs for Power Systems - Unix, Linux, and i5/os

IBM today begins selling its first solid state disks for its Power Systems boxes, the machines it uses to attack the Unix, Linux, and OS/400 installed bases.

The IBM SSD, which comes in a 2.5-inch form factor, has about 220 MB/sec of sustained throughput on reads and about 122 MB/sec of sustained throughput on writes and can perform about 28,000 I/O operations per second (IOPS) on random transactional processing. The SSD has a 3 Gb/sec SAS interface and has an average access time of from 20 to 120 microseconds, the difference depending on where data is located on the SSD. According to IBM's specs, the SSD has about 87 times the I/O operations per second of a 15K RPM SAS drive and yet consumes about one-fifth of the power


Timothy Prickett Morgan in The Register

http://www.theregister.co.uk/2009/05/22/ibm_power_ssds/

Tuesday, May 05, 2009

Accessing DB2 for i5/OS data from a Linux Partition and Optimizing Linux access to your DB2 for i5/OS database

Discusses choosing the right JDBC driver to access DB2 for i5/OS from a Linux partition and also provides tips and examples on optimizing the JDBC access to your DB2 for i5/OS database

http://www-03.ibm.com/servers/enable/site/education/abstracts/1eee_abs.html

Tuesday, January 18, 2005

Linux News: Open Source: Adidas Steps Up to Open Platform

Linux News: Open Source: Adidas Steps Up to Open Platform: "A leading sporting goods manufacturer is switching to Linux after seeing the need to consolidate platforms among its many divisions.
Until recently, the brand divisions of adidas-Salomon Canada had independent sales forces and marketing teams with their own applications, said Paul Leone, vice president of IT and logistics at adidas-Salomon Canada in Concord, Ontario, Canada.
The company had numerous supply chain tools which weren't connected. It recently decided to move its Windows-based applications from Dell (Nasdaq: DELL) servers to IBM (NYSE: IBM) iSeries servers running the open source operating system. "

Wednesday, January 12, 2005

Installing Mambo on Linux

Tuesday, January 04, 2005

Linux, security skills projected hot in 2005

IT workers looking to improve their standing in the job market should look to open source, Web services and security-related skill and certification sets, according to recent research.

Tuesday, December 28, 2004

Postfix

Chapter?10.?Postfix: "Postfix is an efficient and feature-rich mail server that was designed by Wietse Venema at the IBM T.J. Watson Research Center. It was intended to be a replacement for the popular Sendmail."

apache no longer find its ssl certificate file

on mandrake 10.0, I updated apache to the latest version (urpmi).

when I tried to restart apache I got the following error:

[root@server1 root]# service httpd start
Starting httpd2: Syntax error on line 44 of /etc/httpd/conf.d/41_mod_ssl.default-vhost.conf:
SSLCertificateFile: file '/etc/ssl/apache2/server.crt' does not exist or is empty

did an updatedb, then locate server.crt and server.crt turned up in /etc/ssl/apache/server.crt

and the same for server.key

made the relevant changes to /etc/httpd/conf.d/41_mod_ssl.default-vhost.conf,

then service httpd start, and it worked this time

Sunday, December 19, 2004

Running Tomcat as a Service on Linux

This is the script that im using to startup and shutdown tomcat automatically on Linux

1. Save tomcat start / stop script
Copy and paste the following script into your text editor:




#!/bin/bash
#
# Startup script for Tomcat
#
# chkconfig: 345 84 16
# description: Tomcat jakarta JSP server

TOMCAT_HOME=/usr/local/tomcat
startup=$TOMCAT_HOME/bin/startup.sh
shutdown=$TOMCAT_HOME/bin/shutdown.sh

#Necessary environment variables
export JAVA_HOME="/usr/local/java/java"
export CATALINA_HOME="/usr/local/tomcat"
#export LD_KERNEL_ASSUME="2.2.5"

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

#Check for tomcat script
if [ ! -f $TOMCAT_HOME/bin/catalina.sh ]
then
echo "Tomcat not available..."
exit
fi

start(){
echo -n $"Starting Tomcat service: "
#daemon -c
$startup
RETVAL=$?
echo
}

stop(){
action $"Stopping Tomcat service: "
$shutdown
RETVAL=$?
echo
}


status() {
ps ax --width=1000 grep "[o]rg.apache.catalina.startup.Bootstrap start" awk '{printf $1 " "}' wc awk '{print $2}' > /tmp/tomcat_process_count.txt
read line < /tmp/tomcat_process_count.txt if [ $line -gt 0 ]; then echo -n "tomcatd ( pid " ps ax --width=1000 grep "[o]rg.apache.catalina.startup.Bootstrap start" awk '{printf $1 " "}' echo -n ") is running..." echo else echo "Tomcat is stopped" fi } case "$1" in start) start ;; stop) stop ;; restart) stop sleep 3 start ;; status) status ;; *) echo "Usage: tomcatd {start stop restart status}" exit 1 esac exit 0 Edit the lines that start with tomcat and export to match where you installed tomcat and your jdk. 2. Save to /etc/init.d and chmod
Save the edited file above to /etc/init.d directory as "tomcatd"

Then you have to allow execute access to the script, so run:
chmod a+x tomcat

3. Add to appropriate run level directories
The easy way to do this is to just simply run:
chkconfig --add tomcat

thats it.

this will also allow you to start and stop tomcat manually

service tomcatd start
service tomcatd stop

Saturday, December 18, 2004

Installing Apache on Tomcat on Mandrake 10.0

1. Install Mandrake 10.0 from CD's

If you need help, please use the following link:

Select the following groups:


· Console Tools

· Development

· KDE Workstation (or Gnome)



Additionally you need the following packages:

· Webmin

· Apache2

· PostgreSQL

PostgreSQL server is not setup on Mandrake by default (Client is, but not server), used control centre install to dowload server and jdbc.

login as root

/etc/rc.d/init.d/postgresql restart

# su - postgres
$ createuser youruser

Shall the new user be allowed to create databases? (y/n) y
Shall the new user be allowed to create more new users? (y/n) n
CREATE USER
$ createdb youruser
CREATE DATABASE

$ exit
# exit
# su youruser
$ psql
Welcome to psql 7.3.2, the PostgreSQL interactive terminal.
youruser=> create table states (state_code varchar(2) primary key, state_name varchar(30) not null);

CREATE TABLE
youruser=> insert into states(state_code, state_name) values ('VA','Virgina');
INSERT 16981 1
youruser=> insert into states(state_code, state_name) values ('MD','Maryland');
INSERT 16982 1

youruser=> select * from states;
state_code | state_name
------------+----------
VA | Virgina
MD | Maryland

(2 rows)

youruser=> \q




Please use the Mandrake Control Center to perform an update of your software. By clicking on “Mandrake Update” the system will be connected to the nearest FTP server and will get security updates, bugfixes and normal updates.




1.1 Get Webmin running



It is time to get Webmin running. Webmin is a web-based interface for system administration for UNIX. Using any browser that supports tables and forms (and Java for the File Manager module), you can setup user accounts, Apache, DNS, MySQL, file sharing and so on. Webmin consists of a simple web server, and a number of CGI programs which directly update system files like /etc/inetd.conf and /etc/passwd. The web server and all CGI programs are written in Perl version 5, and use no non-standard Perl modules. Please get more information about Webmin here:



http://www.webmin.com/



Honestly, we really do not need Webmin to get everything running, but it is a wonderful tool for a LINUX system administrator and it will help us to configure stuff. After the installation please check if Webmin is already running:

/etc/init.d/webmin status

If not, please start it like this:

/etc/init.d/webmin start

You can now use the Webmin interface with your favorite browser via the following URLs:

https://localhost:10000 or https://IP-address:10000



1.3 Configure PostgreSQL

Please edit the following configuration file:

/var/lib/pgsql/data/postgresql.conf

and make sure that the this line is anabled:

tcpip_socket = true

In the file /var/lib/pgsql/data/pg_hba.conf we need this the following:

local all all trust
host all all 127.0.0.1 255.255.255.255 trust

Please use Webmin to open PostgreSQL Database Server by clicking on Servers - PostgreSQL Database Server. In this phase just make sure that PostgresSQL starts and stops without an error.

Note: You need the perl-DBD-Pg package installed to avoid error messages.

1.4 Configuring Apache2

To configure Apache2 use Webmin – Servers – Apache Webserver and click on Module Config.

Please change the following entries:

Path to httpd executable to: /usr/sbin/httpd2

Path to httpd.conf to: /etc/httpd/2.0/conf/httpd2.conf


Configure the necessary modules (just leave it like it is) and you will find the global configuration overview. In this phase just make sure that Apache starts and stops without an error message. We will configure it later.

2.1 Java stuff

Lets go to Sun first. Download the following files and store them in your favourite installation directory: (i.e. /installations)

http://java.sun.com/j2se/1.4.2/download.html
download j2sdk-1_4_2_05-linux-i586.bin

http://java.sun.com/products/javamail/downloads/index.html
download javamail-1_3_1-upd.zip

http://java.sun.com/products/javabeans/glasgow/jaf.html
download jaf-1_0_2-upd.zip

http://java.sun.com/products/jta/
download the class files and javadocs.

http://java.sun.com/products/servlet/archive.html
download Java Servlet Development Kit 2.0 for Solaris (jsdk20-solaris2-sparc.tar.Z).

Install j2sdk like this:

cd /installations

chmod 700 j2sdk-1_4_2_05-linux-i586.bin

./j2sdk-1_4_2_05-linux-i586.bin

(need to add create java_home and add to path

create /etc/profile.d/java.sh

JAVA_HOME=/download/j2sdk1.4.2_05
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin
export PATH

chmod 755 /etc/profile.d/java.sh
)




Install javamail like this:



cd /installations

unzip javamail-1_3_1-upd.zip

cd javamail-1.3.1/

cp mail.jar /usr/share/java





Install jaf like this:



cd /installations

unzip jaf-1_0_2-upd.zip

cd jaf-1.0.2

cp –R * /usr/share/java





Install Jta like this:



Unzip the following files and copy the content to /usr/share/java:

jta-1_0_1B-classes.zip

jta-1_0_1B-doc.zip


Install jsdk20



cd /installations

tar xzf jsdk20-solaris2-sparc.tar.Z

chown –R root:root JSDK2.0/

cp -R JSDK2.0 /usr/local/





2.2 Install additional RPM packages from Installation CD



Please use RPMDrake in Mandrake Control Center to install the following files:



jdom-1.0.0.b8.2jpp
ant-1.5.4-2jpp
postgresql-jdbc-7.3.4-2mdk
apache2-devel-2.0.47-6.6.92mdk

Note: If RPMDrake asks to install depended files, please do it.

2.4 Installing Jakarta Tomcat 5

Please download jakarta-tomcat-5.0.28.tar.gz from here and store it in you installation directory:

http://jakarta.apache.org/site/binindex.cgi

Install Tomcat like this:

cd /installation

tar xzf jakarta-tomcat-5.0.28.tar.gz

cd jakarta-tomcat-5.0.28

mkdir /usr/local/tomcat

cp –R * /usr/local/tomcat

/usr/local/tomcat/bin/startup.sh

Use your favourite browser to check if tomcat is installed properly.

http://yourserver:8080


At the end do not forget to restart Tomcat 5 like this:

/usr/local/tomcat/bin/shutdown.sh
/usr/local/tomcat/bin/startup.sh


2.6 Install Apache Module Mod_jk

I couldn’t find this Apache Module on the CDs. So I searched for files I can download out of the net. Here is my solution:

I downloaded jakarta-tomcat-connectors-jk2-2.0.4-src.zip
from here:

http://www.apache.de/dist/jakarta/tomcat-connectors/jk2/source/


To compile the source we need to do the following steps:

cd /installation
unzip jakarta-tomcat-connectors-jk2-2.0.4-src.zip

This will create a folder called jakarta-tomcat-connectors-jk2-2.0.4-src. Rename it to jakarta-tomcat-connector.

Move this folder to wherever you store source files on your system. I used /usr/src.

copy –R jakarta-tomcat-connector /usr/src

Then run the buildconf script to create the configuration file.

cd /usr/src/jakarta-tomcat-connector/jk/native2
./buildconf.sh
Run the configure script with the path to the apxs file on your system and the options below:

./configure --with-apxs2=/usr/sbin/apxs2
Note: You need to install rpm package apache2-devel-2.0.47 first!

Build mod_jk2 with the following command:

make

If all went well, the mod_jk2.so file was successfully created. Manually copy it to Apache's shared object files directory:



cp /usr/src/jakarta-tomcat-connector/jk/build/jk2/apache2/mod_jk2.so /etc/httpd/2.0/modules

cp /usr/src/jakarta-tomcat-connectors-jk2-2.0.4-src/jk/native2/server/apache2/mod_jk2.c /etc/httpd/2.0/modules

cp /usr/src/jakarta-tomcat-connector/jk/native2/server/apache2/mod_jk2.c /etc/httpd/2.0/modules

Add the following line to the file /etc/httpd/2.0/conf/httpd2.conf:

LoadModule jk2_module modules/mod_jk2.so

Copy the file workers2.properties to /etc/httpd/conf

Restart Apache like this:

service httpd restart

Tuesday, December 14, 2004

Linux Tutorial: PostgreSQL Database and Linux

Linux Tutorial: PostgreSQL Database and Linux: "YoLinux Tutorial: The PostgreSQL Database and Linux"

Linux Forum: Apache, Webmin and Mandrake - Linux Operating System Help

Linux Forum: Apache, Webmin and Mandrake - Linux Operating System Help: "To configure the Webmin module for Mandrake's (10.0) default installation of Apache2 (it was expecting Apache 1.x,) change the following:

Apache server root directory: /etc/httpd/2.0
Path to httpd executable: /usr/sbin/httpd2
Path to httpd.conf: /etc/httpd/conf/httpd2.conf" (slight change here)

Monday, December 13, 2004

Learn the basic steps necessary to download, install, and configure a basic Apache server

Dev Shed: "Learn the basic steps necessary to download, install, and configure a basic Apache server"

Sunday, December 12, 2004

How to install OPEN-XCHANGE™ with Webmin, APACHE2, OpenLDAP and PostgreSQL on Mandrake 9.2

How to install OPEN-XCHANGE™ with Webmin, APACHE2, OpenLDAP and PostgreSQL on Mandrake 9.2?





By Frank Neugebauer


http://www.linux-tip.net

linux-tip@web.de


Last Modified: 28/09/2004 8:11 PM




0. Introduction





OPEN-XCHANGE™ is a collaboration and integration server environment with a continuous right management for modules and objects.
OPEN-XCHANGE™ ("OX") is a GPL Groupware solution provided by Netline.
It's the "community" version of Novell/SUSE LINUX OPEN-XCHANGE™ Server ("SLOX").
The product is based on existing components like a web server, mail server, directory server and a database.
OPEN-XCHANGE™ is JAVA™ based with some pieces of C for security components.


OPEN-XCHANGE™ provides the following modules:

- Portal
- Calendar
- Contacts
- Addresses
- Tasks
- Projects
- Documents
- Knowledge
- Bookmarks
- Pinbord
- Forums
- Webmailer

This guide contains all the necessary information for installing and understanding the architectural layout of the implementation. It was written with the assumption that you understand how to install programs and have a basic understanding of Linux Mandrake. This includes installing Linux Mandrake and RPM packages, editing files, making directories, compiling software and understanding general UNIX commands. This guide doesn’t explain how to use or configure OPEN-XCHANGE™, Apache, Postfix, Cyrus and all the other server but information on where to obtain this information can be found in the “Additional information” section.

Please note, the way the software is installed here is good enough for testing purposes, but certainly not for a production environment. I am also not responsible of possible data losses caused by the use of this guide.

The guide is divided in three parts. In the first part we will perform a basic Mandrake 9.2 installation and the basic configuration of the needed servers. The second part continues with Java installation and compiling. This guide ends with the Post-Installation process and the basic OPEN-XCHANGE™ configuration.









1.0 Basic Mandrake 9.2 Installation


I’m using Mandrake Linux PowerPack 9.2 (9 CDs) for this installation. You can already find this distribution (DVD) in some computer magazines or please purchase the software here:

http://store.mandrakesoft.com


I don’t want to explain how to install Mandrake. It is very easy theses days. If you need help, please use the following link:




http://www.mandrakelinux.com/en/fdoc.php3

It is now time to specify which programs you wish to install on your system. There are thousands of packages available for Mandrake Linux, and to make it simpler to manage the packages have been placed into groups of similar applications. We just need a basis system. For that reason you should select the following groups:



· Console Tools

· Development

· KDE Workstation (or Gnome)



Additionally you need the following packages:



· Webmin

· Apache2

· PostgreSQL

· Open-LDAP
(urpmi openldap-servers openldap-migration)

· Postfix

· Cyrus


PostgreSQL server is not setup on Mandrake by default (Client is, but not server), used control centre install to dowload server and jdbc.

login as root

/etc/rc.d/init.d/postgresql restart

# su - postgres
$ createuser youruser

Shall the new user be allowed to create databases? (y/n) y
Shall the new user be allowed to create more new users? (y/n) n
CREATE USER
$ createdb youruser
CREATE DATABASE

$ exit
# exit
# su youruser
$ psql
Welcome to psql 7.3.2, the PostgreSQL interactive terminal.
youruser=> create table states (state_code varchar(2) primary key, state_name varchar(30) not null);

CREATE TABLE
youruser=> insert into states(state_code, state_name) values ('VA','Virgina');
INSERT 16981 1
youruser=> insert into states(state_code, state_name) values ('MD','Maryland');
INSERT 16982 1

youruser=> select * from states;
state_code | state_name
------------+----------
VA | Virgina
MD | Maryland

(2 rows)

youruser=> \q




Please use the Mandrake Control Center to perform an update of your software. By clicking on “Mandrake Update” the system will be connected to the nearest FTP server and will get security updates, bugfixes and normal updates.




1.1 Get Webmin running



It is time to get Webmin running. Webmin is a web-based interface for system administration for UNIX. Using any browser that supports tables and forms (and Java for the File Manager module), you can setup user accounts, Apache, DNS, MySQL, file sharing and so on. Webmin consists of a simple web server, and a number of CGI programs which directly update system files like /etc/inetd.conf and /etc/passwd. The web server and all CGI programs are written in Perl version 5, and use no non-standard Perl modules. Please get more information about Webmin here:



http://www.webmin.com/



Honestly, we really do not need Webmin to get everything running, but it is a wonderful tool for a LINUX system administrator and it will help us to configure Apache, PostgresSQL, Open-LDAP and all other servers. After the installation please check if Webmin is already running:



/etc/init.d/webmin status



If not, please start it like this:



/etc/init.d/webmin start



You can now use the Webmin interface with your favorite browser via the following URLs:



https://localhost:10000 or https://IP-address:10000






1.2 Create users and databases



OPEN-XCHANGE™ needs few users and groups on Mandrake and PostgresSQL to make the installation go without an error message.



useradd ox
su postgres
createuser -A -D -P openexchange
createdb openexchange exit



Note: Please remember the passwords.





1.3 Configure PostgreSQL

Please edit the following configuration file:

/var/lib/pgsql/data/postgresql.conf

and make sure that the this line is anabled:

tcpip_socket = true

In the file /var/lib/pgsql/data/pg_hba.conf we need this the following:

local all all trust
host all all 127.0.0.1 255.255.255.255 trust




Please use Webmin to open PostgreSQL Database Server by clicking on Servers - PostgreSQL Database Server. You will find the database openexchange (just empty) and the openexchange user already installed. In this phase just make sure that PostgresSQL starts and stops without an error.



Note: You need the perl-DBD-Pg package installed to avoid error messages.



1.4 Configuring Apache2



To configure Apache2 use Webmin – Servers – Apache Webserver and click on Module Config.



Please change the following entries:



Path to httpd executable to: /usr/sbin/httpd2

Path to httpd.conf to: /etc/httpd/2.0/conf/httpd2.conf


Configure the necessary modules (just leave it like it is) and you will find the global configuration overview. In this phase just make sure that Apache starts and stops without an error message. We will configure it later.




1.5 Configuring Open-LDAP



To configure Open-LDAP use Webmin – Servers – OpenLDAP Server. Leave everything like it is. Just make sure that the daemon starts and stops without error.







2.0 Installing Java and compiling OPEN-XCHANGE™



This part is not so easy like the first part. We need to download a lot more rpm packages and other files from different locations. It is not always uncomplicated to find the correct file on the 9 Mandrake 9.2 CDs. I downloaded some software from Sun as well.





2.1 Java stuff



Lets go to Sun first. Download the following files and store them in your favourite installation directory: (i.e. /installations)

http://java.sun.com/j2se/1.4.2/download.html
download j2sdk-1_4_2_05-linux-i586.bin

http://java.sun.com/products/javamail/downloads/index.html
download javamail-1_3_1-upd.zip

http://java.sun.com/products/javabeans/glasgow/jaf.html
download jaf-1_0_2-upd.zip

http://java.sun.com/products/jta/
download the class files and javadocs.

http://java.sun.com/products/servlet/archive.html
download Java Servlet Development Kit 2.0 for Solaris (jsdk20-solaris2-sparc.tar.Z).



Install j2sdk like this:



cd /installations

chmod 700 j2sdk-1_4_2_05-linux-i586.bin

./j2sdk-1_4_2_05-linux-i586.bin

(need to add create java_home and add to path

create /etc/profile.d/java.sh

JAVA_HOME=/download/j2sdk1.4.2_05
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin
export PATH
)




Install javamail like this:



cd /installations

unzip javamail-1_3_1-upd.zip

cd javamail-1.3.1/

cp mail.jar /usr/share/java





Install jaf like this:



cd /installations

unzip jaf-1_0_2-upd.zip

cd jaf-1.0.2

cp –R * /usr/share/java





Install Jta like this:



Unzip the following files and copy the content to /usr/share/java:

jta-1_0_1B-classes.zip

jta-1_0_1B-doc.zip


Install jsdk20



cd /installations

tar xzf jsdk20-solaris2-sparc.tar.Z

chown –R root:root JSDK2.0/

cp -R JSDK2.0 /usr/local/





2.2 Install additional RPM packages from Installation CD



Please use RPMDrake in Mandrake Control Center to install the following files:



jdom-1.0.0.b8.2jpp
ant-1.5.4-2jpp
postgresql-jdbc-7.3.4-2mdk
apache2-devel-2.0.47-6.6.92mdk advx-build,libgdbm2-devel


We also need some perl libraries:



perl-Concert-ASN1-0.16-4mdk
perl-ldap-0.29-1mdk
perl-IO-Socket-SSL-0.95-1mdk
perl-Authen-SASL-2.04-2mdk
perl-Net_SSLeay-1.25-1mdk


Note: If RPMDrake asks to install depended files, please do it.





2.3 Compiling OPEN-XCHANGE™ and first check



Please download the OPEN-XCHANGE™ from the following website and store it in your installation directory:



http://mirror.open-xchange.org/ox/EN/community/



cd /installations

tar xzf open-xchange-0.7.1.tar.gz

cd open-xchange.0.7.1/

./configure --prefix=/usr/local/ox --with-mailjar=/usr/share/java/mail.jar --with-activationjar=/usr/share/java/activation.jar --with-jdomjar=/usr/share/java/jdom.jar --with-xercesjar=/usr/share/java/xerces-j2.jar --with-jsdkjar=/usr/local/JSDK2.0/lib/jsdk.jar --with-jdbcjar=/usr/share/pgsql/pg73jdbc3.jar --with-runuid=ox --with-rungid=ox

make

make install
chown –R ox:ox /usr/local/ox/var


Note: To avoid the following error message, you should start PostgrSQL sever first:



configure: WARNING: it seems that the database can not be reached ... maybe the application will not work as expected



Next we need to copy the following files to Apache’s cgi-bin directory: login.pl and login.pm



cd /usr/local/ox/share/perl

cp login.* /var/www/cgi-bin



Please try to enter the login screen using your favourite browser:



http://servername/cgi-bin/login.pl or http://IPaddress/cgi-bin/login.pl





I had an Internal Server error. Checking the Apache error log file I discovered the following message:



Can't locate auto/Net/SSLeay/randomize.al in @INC (@INC contains:
/usr/lib/perl5/5.8.1/i386-linux-thread-multi /usr/lib/perl5/5.8.1


I found out that the RPM package perl-Net_SSLeay-1.25-mdk.i586.rpm doesn't have the file randomize.al.

Here is my workaround:

I regenerated the file SSLeay.pm with the following commands:

cd /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi
perl -e 'use AutoSplit; autosplit("Net/SSLeay", "auto", 0, 1, 1)'


2.4 Installing Jakarta Tomcat 5

Please download jakarta-tomcat-5.0.28.tar.gz from here and store it in you installation directory:

http://jakarta.apache.org/site/binindex.cgi


Install Tomcat like this:





cd /installation

tar xzf jakarta-tomcat-5.0.28.tar.gz

cd jakarta-tomcat-5.0.28

mkdir /usr/local/tomcat

cp –R * /usr/local/tomcat

/usr/local/tomcat/bin/startup.sh



Use your favourite browser to check if tomcat is installed properly.



http://yourserver:8080







2.5 Installling Servlets

Copy intranet.class and webmail.class in the tomcat webapps tree :

cd /usr/local/tomcat/webapps
mkdir servlet
mkdir servlet/WEB-INF
mkdir servlet/WEB-INF/classes
cd servlet/WEB-INF/classes
cp /usr/local/ox/share/servlets/*.class .



Now create the file web.xml in
/usr/local/tomcat/webapps/servlet/WEB-INF.

Use this as an example:






Servlet OpenXchange

Servlet OpenXchange 0.7.1




intranet
intranet



webmail
webmail



intranet
/intranet



webmail
/webmail








The servlets won't work until you modify the classpath. So do this:



cd /usr/local/tomcat/webapps/servlet/WEB-INF
mkdir lib
cd lib
cp /usr/local/ox/lib/*.jar .





At the end do not forget to restart Tomcat 5 like this:



/usr/local/tomcat/bin/shutdown.sh
/usr/local/tomcat/bin/startup.sh



To check if everything is working fine, open you favourite Browser and go to the following URL:



http://myhost:8080/servlet/intranet



You should see a message "No running Server found“: it means that all is OK.




2.6 Install Apache Module Mod_jk

I couldn’t find this Apache Module on the CDs. So I searched for files I can download out of the net. Here is my solution:

I downloaded jakarta-tomcat-connectors-jk2-2.0.4-src.zip
from here:

http://www.apache.de/dist/jakarta/tomcat-connectors/jk2/source/


To compile the source we need to do the following steps:

cd /installation
unzip jakarta-tomcat-connectors-jk2-2.0.4-src.zip

This will create a folder called jakarta-tomcat-connectors-jk2-2.0.4-src. Rename it to jakarta-tomcat-connector.

Move this folder to wherever you store source files on your system. I used /usr/src.

copy –R jakarta-tomcat-connector /usr/src

Then run the buildconf script to create the configuration file.

cd /usr/src/jakarta-tomcat-connector/jk/native2
./buildconf.sh
Run the configure script with the path to the apxs file on your system and the options below:

./configure --with-apxs2=/usr/sbin/apxs2
Note: You need to install rpm package apache2-devel-2.0.47 first!

Build mod_jk2 with the following command:

make

If all went well, the mod_jk2.so file was successfully created. Manually copy it to Apache's shared object files directory:



cp /usr/src/jakarta-tomcat-connector/jk/build/jk2/apache2/mod_jk2.so /etc/httpd/2.0/modules

cp /usr/src/jakarta-tomcat-connectors-jk2-2.0.4-src/jk/native2/server/apache2/mod_jk2.c /etc/httpd/2.0/modules

cp /usr/src/jakarta-tomcat-connector/jk/native2/server/apache2/mod_jk2.c /etc/httpd/2.0/modules

Add the following line to the file /etc/httpd/2.0/conf/httpd2.conf:

LoadModule jk2_module modules/mod_jk2.so

Copy the file workers2.properties to /etc/httpd/conf

Restart Apache like this:

service httpd restart




3.0 Post-Installation and first run

3.1 Postgresql database

In the last part we’ll finally configure Postgresql, LDAP and will start the necessary services.

Lets start to populate the database. Just do the following:

psql -dopenexchange -h localhost -Uopenexchange -W -f /usr/local/ox/share/init_database.sql
psql -dopenexchange -h localhost -Uopenexchange -W
INSERT INTO sys_gen_rights_template values
('now','admin','now','','default_template','y','y','y','y',
'y','y','y','y','y','y','y','y','y','y','y','y','y','y','y',
'y','y','y','y','y','y','y','y','y','y','y','y','y','y','y',
'y','y','y','y','y','y','y','y','y','y','y','y','y');
\q



3.2 Configuring LDAP
Edit your /etc/openldap/slapd.conf and add the following lines:

include /usr/local/ox/share/openxchange.schema

suffix "dc=example,dc=org"
rootdn "cn=Manager,dc=example,dc=org"
rootpw secret

index uid,mailEnabled,cn,sn,givenname,lnetMailAccess,alias,loginDestination eq,sub

Now create a password as stated in the INSTALL file:

$perl -e 'print crypt("mypassword",pack("C2",(int(rand 26)+65),(int(rand 26)+65)))."\n";'
CGPbeX4Qyrui2
$

Edit /usr/local/ox/share/init_ldap.ldif and modify the line

userPassword: {CRYPT}newmailadminpass

... to the result of the perl command. In my example it is:

userPassword: {CRYPT}CGPbeX4Qyrui2
Now insert the LDAP data :

slapadd -l /usr/local/ox/share/init_ldap.ldif
If you have an error, check your config and try again until it works ... If you need to reset the LDAP database, here's the solution:

/etc/init.d/lapd stop
rm /var/lib/ldap/*
/etc/init.d/lapd start

(you need to remove any duplicated entries from the indicated files,dont understand why these things are wrong out of the box?)

Note: Please check if all files in /var/lib/ldap are owned by ldap.

Now modify your /etc/openldap/ldap.conf like this:

BASE dc=example,dc=org
HOST localhost

Note: Do not put any space after the comma in dc=example,dc=org !!!

Create a symbolic link like this:

ln -s /etc/openldap/ldap.conf /usr/local/ox/etc/groupware/ldap.conf



3.3 Create a user

Let's try your PostgreSQL / LDAP config by adding a user:

adduser_ox --username="john" --passwd="password" --name="doe" --sname="john" --maildomain="example.org" --ox_timezone="Europe/Paris"



Check carefully the feedback of the command. Even if you have a green "OK" message, you can have an error message ... If this is the case, don't go further until it is corrected!

If we still follow the INSTALL file, we now add a openxchange group:

addgroup_ox --group=developers




3.4 Website files preparation

Copy the following files to wwwroot (Mandrake normally uses /var/www/html)

cd /var/www/html

mkdir cfintranet
mkdir cfintranet/webmail

cd /usr/local/ox/share/groupware/data
cp -R images css javascript /var/www/html/cfintranet

cd /usr/local/ox/share/webmail/data
cp -R images css javascript /var/www/html/cfintranet/webmail





3.5 Creating the filespool

The documentation says this script can "take some time". It's true! If you have a slow server, it is time for a tea or coffee.

cd /usr/local/ox/sbin

sh correctfilespool



Now, all should be OK for starting. First, start the openxchange service :

/usr/local/ox/etc/init.d/openexchange start
Then open the login page http://myhost/cgi-bin/login.pl, and login with the username and password supplied previously to the command adduser_ox :



4.0 Face Lifting

OK, what you now see is not nice. (no icons but ugly squares instead). Fortunately somebody did allady great work.

Please download the file ox_zenith_iconset-0.1.tar.gz from here:

http://ox.cutmasta.org/

Install the new icons like this:

tar xzf ox_zenith_iconset-0.1.tar.gz
cd ox_zenith_iconset/top
cp * /var/www/html/cfintranet/images/top/EN/
cp * /var/www/html/cfintranet/images/top/DE/

installing tomcat on linux - restart

I wasnt happy with the way the install of apache/tomcat/database (postgresql) had gone so far so I decided to start again.

Basically im reinstalling Mandrake 10.0 on my p200 64mb PC.

The first problem that I had previously encountered is that a vncserver is not installed as default in Mandrake. The thing that makes this confusing is that the tightvnc client is!

By googling I discovered that

urpmi tightvnc-server

would perform an install of tightvnc server, and it did, excellent.

Typed vncserver and setup my passwords, and im in business connected to my linux box in the office from the the laptop

Daemon scripts

Daemon scripts: Files in /etc/rc.d/init.d (tomcatd, postgresql, httpd)

tomcatd
#You can add this line for status in tomcatd. It outputs all tomcat processes
ps ax --width=1000 grep "[o]rg.apache.catalina.startup.Bootstrap start" awk '{printf $1 " "}'


postgresql
Here's a brief explanation of unusual features in my daemon scripts
You can make these changes in a daemon script to allow it to connect with jdbc
Edit /etc/rc.d/init.d/postgresql. JDBC needs to connect via tcp/ip, so
add "-i" next to "-p ${PGPORT}" so that the line contains this:
'-i -p ${PGPORT}'


/etc/rc.d/init.d/tomcatd

#!/bin/bash
#
# Startup script for Tomcat
#
# chkconfig: 345 84 16
# description: Tomcat jakarta JSP server
TOMCAT_HOME=/usr/local/tomcat
TOMCAT_START=$TOMCAT_HOME/bin/startup.sh
TOMCAT_STOP=$TOMCAT_HOME/bin/shutdown.sh
#Necessary environment variables
export JAVA_HOME="/usr/local/java/java"
export CATALINA_HOME="/usr/local/tomcat"
#export LD_KERNEL_ASSUME="2.2.5"
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
#Check for tomcat script
if [ ! -f $TOMCAT_HOME/bin/catalina.sh ]
then
echo "Tomcat not available..."
exit
fi
start() {
echo -n "Starting Tomcat: "
su - tomcat -c $TOMCAT_START
echo
touch /var/lock/subsys/tomcatd
# We may need to sleep here so it will be up for apache
sleep 3
#Instead should check to see if apache is up by looking for httpd.pid
}
stop() {
echo -n $"Shutting down Tomcat: "
su - tomcat -c $TOMCAT_STOP
rm -f /var/lock/subsys/tomcatd
echo
}
status() {
ps ax --width=1000 grep "[o]rg.apache.catalina.startup.Bootstrap start" awk '{printf $1 " "}' wc awk '{print $2}' > /tmp/tomcat_process_count.txt
read line < /tmp/tomcat_process_count.txt
if [ $line -gt 0 ]; then
echo -n "tomcatd ( pid "
ps ax --width=1000 grep "[o]rg.apache.catalina.startup.Bootstrap start" awk '{printf $1 " "}'
echo -n ") is running..."
echo
else
echo "Tomcat is stopped"
fi
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
sleep 3
start
;;
status)
status
;;
*)
echo "Usage: tomcatd {startstoprestartstatus}"
exit 1
esac

/etc/rc.d/init.d/postgresqld

#! /bin/sh
# postgresqld This is the init script for starting up the PostgreSQL
# server
#
# chkconfig: 345 83 17
# description: Starts and stops the PostgreSQL backend daemon that handles # all database requests.
# processname: postmaster
# pidfile: /var/run/postmaster.pid
PG_HOME="/usr/local/pgsql"
# Source function library.
INITD=/etc/rc.d/init.d
. $INITD/functions
# Get function listing for cross-distribution logic.
TYPESET=`typeset -F`
# Get config.
. /etc/sysconfig/network
# Find the name of the script
#NAME=`basename $0`
NAME="PostgreSQLd"
# Set defaults for port and database directory
PGPORT=5432
export PGDATA=/usr/local/pgsql/data
# Check that networking is up.
# Pretty much need it for postmaster.
[ "${NETWORKING}" = "no" ] && exit 0
[ -f /$PG_HOME/bin/postmaster ] exit 0
start(){
PSQL_START=$"Starting ${NAME} service: "
echo -n $"Initializing database: "
if [ ! -d $PGDATA ]
then
mkdir -p $PGDATA
chown postgres.postgres $PGDATA
chmod go-rwx $PGDATA
fi
# Make sure the locale from the initdb is preserved for later startups...
[ -f $PG_HOME/i18n ] && cp $PG_HOME/i18n $PGDATA/../initdb.i18n
# Just in case no locale was set, use en_US
[ ! -f $PG_HOME/i18n ] && echo "LANG=en_US" > $PGDATA/../initdb.i18n
# Is expanded this early to be used in the command su runs
echo "export LANG LC_ALL LC_CTYPE LC_COLLATE LC_NUMERIC LC_CTYPE LC_TIME" >> $PGDATA/../initdb.i18n
# Initialize the database
su -l postgres -s /bin/sh -c "$PG_HOME/bin/initdb --pgdata=$PGDATA > /dev/null 2>&1" < /dev/null
[ -f $PGDATA/PG_VERSION ] && echo_success
[ ! -f $PGDATA/PG_VERSION ] && echo_failure
echo
# Check for postmaster already running...
# note that pg_ctl only looks at the data structures in PGDATA
# you really do need the pidof()
pid=`pidof -s $PG_HOME/bin/postmaster`
if [ $pid ] && $PG_HOME/pg_ctl status -D $PGDATA > /dev/null 2>&1
then
echo $"Postmaster already running."
else
#all systems go -- remove any stale lock files
rm -f /tmp/.s.PGSQL.${PGPORT} > /dev/null
echo -n "$PSQL_START"
su -l postgres -s /bin/sh -c "$PG_HOME/bin/pg_ctl -D $PGDATA -p $PG_HOME/bin/postmaster -o '-i -p ${PGPORT}' start > /dev/null 2>&1" < /dev/null
sleep 1
pid=`pidof -s $PG_HOME/bin/postmaster`
if [ $pid ]
then
if echo "$TYPESET"grep "declare -f success" >/dev/null
then
success "$PSQL_START"
else
echo " [ OK ]"
fi
touch /var/lock/subsys/${NAME}
echo $pid > /var/run/postmaster.${PGPORT}.pid
echo
else
if echo "$TYPESET"grep "declare -f failure" >/dev/null
then
failure "$PSQL_START"
else
echo " [ FAILED ]"
fi
echo
fi
fi
}
stop(){
echo -n "Stopping $NAME..."
PSQL_STOP=$"Stopping ${NAME} service: "
su -l postgres -s /bin/sh -c "$PG_HOME/bin/pg_ctl stop -D $PGDATA -s -m fast" > /dev/null 2>&1
ret=$?
if [ $ret -eq 0 ]
then
if echo "$TYPESET"grep "declare -f success" >/dev/null
then
success "$PSQL_STOP"
else
echo " [ OK ]"
fi
else
if echo "$TYPESET"grep "declare -f failure" >/dev/null
then
failure "$PSQL_START"
else
echo " [ FAILED ]"
fi
fi
echo
rm -f /var/run/postmaster.${PGPORT}.pid
rm -f /var/lock/subsys/${NAME}
echo
}
restart(){
stop
start
}
condrestart(){
[ -e /var/lock/subsys/${NAME} ] && restart
}
reload(){
su -l postgres -s /bin/sh -c "$PG_HOME/bin/pg_ctl reload -D $PGDATA -s" > /dev/null 2>&1
}
# This script is slightly unusual in that the name of the daemon (postmaster)
# is not the same as the name of the subsystem (postgresql)
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status postmaster
;;
restart)
restart
;;
condrestart)
condrestart
;;
reloadforce-reload)
reload
;;
*)
echo $"Usage: $0 {startstopstatusrestartcondrestartreloadforce-reload}"
exit 1
esac
exit 0

/etc/rc.d/init.d/httpd

#!/bin/bash
#
# Startup script for the Apache Web Server
#
# chkconfig: 345 85 15
# description: Apache is a World Wide Web server. It is used to serve # HTML files and CGI.
# processname: httpd
# pidfile: /var/run/httpd.pid
# config: /usr/local/apache2/conf/access.conf
# config: /usr/local/apache2/conf/httpd.conf
# config: /usr/local/apache2/conf/srm.conf
# Source function library.
. /etc/rc.d/init.d/functions
# This will prevent initlog from swallowing up a pass-phrase prompt if
# mod_ssl needs a pass-phrase from the user.
INITLOG_ARGS=""
# Path to the apachectl script, server binary, and short-form for messages.
apachectl=/usr/local/apache2/bin/apachectl
httpd=/usr/local/apache2/bin/httpd
prog=httpd
RETVAL=0
# Find the installed modules and convert their names into arguments httpd
# can use.
moduleargs() {
moduledir=/usr/local/apache2/modules
moduleargs=`
/usr/bin/find ${moduledir} -type f -perm -0100 -name "*.so" env -i tr '[:lower:]' '[:upper:]' awk '{gsub(/.*\//,"");gsub(/^MOD_/,"");gsub(/^LIB/,"");gsub(/\.SO$/,"");print "-DHAVE_" $0}'`echo ${moduleargs}
}
# The semantics of these two functions differ from the way apachectl does
# things -- attempting to start while running is a failure, and shutdown
# when not running is also a failure. So we just do it the way init scripts
# are expected to behave here.
start() {
echo -n $"Starting $prog: with SSL"
daemon $httpd -DSSL `moduleargs` $OPTIONS
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch /var/lock/subsys/httpd
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
killproc $httpd
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/httpd /var/run/httpd.pid
}
reload() {
echo -n $"Reloading $prog: "
killproc $httpd -HUP
RETVAL=$?
echo
}
# See how we were called.
case "$1" in
start)
start
;;
startssl)
start
;;
stop)
stop
;;
status)
status $httpd
RETVAL=$?
;;
restart)
stop
start
;;
condrestart)
if [ -f /var/run/httpd.pid ] ; then
stop
start
fi
;;
reload)
reload
;;
gracefulhelpconfigtest)
$apachectl $@
RETVAL=$?
;;
*)
echo $"Usage: $prog {startstartsslstoprestartcondrestartreloadstatusfullstatusgracefulhelpconfigtest}"
exit 1
esac
exit $RETVAL

chkconfig
This installs scripts to start at startup and shutdown when system is halted
After you've copied all daemon scripts to /etc/rc.d/init.d, make sure you've changed the chkconfig line to reflect the appropriate runlevels
First make sure they are disabled, or else chkconfig sometimes gets confused
/sbin/chkconfig --del tomcatd
/sbin/chkconfig --del httpd
/sbin/chkconfig --del postgresql
Now add them
/sbin/chkconfig --add tomcatd
/sbin/chkconfig --add httpd
/sbin/chkconfig --add postgresql

Saturday, December 11, 2004

Setting up java tomcat on linux X - Install Pgaccess

Install Pgaccess

cd /usr/local/src
gunzip pgaccess-0_99_0_20040219.tgz
tar -xf pgaccess-0_99_0_20040219.tar

cp -R pgaccess-0_99_0_20040219 /usr/local/pgaccess

cd pgaccess-0_99_0_20040219

make clean
make all
cat "/usr/local/pgaccess/lib" >> /etc/ld.so.conf
ldconfig

Setting up java tomcat on linux IX - Install Postgresql


Creating the “postgres” User
Create a UNIX user account to own and manage the PostgreSQL database files. Typically, this user is named postgres, but it can be named anything that you choose.

You will need to have root privileges to create the PostgreSQL superuser. You can use the command shown to add the postgres user.

su - -c "useradd postgres"

Install Postgresql

cd /usr/local/src
tar xvfz postgresql-7.3.4.tar.gz
cd postgresql-7.3.4

then logoff and login as the postgres user (this wont work if your java and ant environment variables and path additions are not setup properly)

./configure --with-tcl --with-java

gmake
su -c "gmake install"
su -c "chown -R postgres.postgres /usr/local/pgsql"

Setting Environment Variables
The use of the PostgreSQL environment variables is not required. However, they are helpful when performing tasks within PostgreSQL, including starting and shutting down the postmaster processes.
The environment variables that should be set are for the man pages and the bin directory. You can do so by adding the following statements into the /etc/profile file.

PATH=$PATH:/usr/local/pgsql/bin
MANPATH=$MANPATH:/usr/local/pgsql/man
export PATH MANPATH

Initializing and Starting PostgreSQL
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data

Running postmaster in the background
/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l /tmp/pgsql.log start

Configuring the PostgreSQL SysV Script
The SysV script will allow the graceful control of the PostgreSQL database through the use of the SysV runlevel system. The SysV script can be used for starting, stopping, and status-checking of PostgreSQL. It is known to work with most Red Hat based versions of Linux, including Mandrake; however, it should work with other SysV systems (e.g., UnixWare, Solaris, etc.) with little modification. The script is named linux. To use it, you will first need to copy the linux script to your init.d directory. You may require root access to do this.
First, change to the directory where you unpacked the PostgreSQL source. eg /usr/local/src/postgresql-7.1.3/. Then, issue a cp command to copy the script from contrib/start-scripts into the init.d

Copying the linux script
cd /usr/local/src/postgresql-7.4.6
su -c "cp contrib/start-scripts/linux /etc/rc.d/init.d/postgresql"

Making the linux script executable
su -c "chmod a+x /etc/rc.d/init.d/postgresql"

There are no additional requirements to use the SysV script with Red Hat, if you do not intend on using it to start PostgreSQL automatically (i.e., if you wish to use the script manually). However, if you do wish for the script to startup PostgreSQL automatically when the machine boots up (or changes runlevels), you will need to have the chkconfig program installed. If chkconfig is installed, you will also need to add the following two lines, including the hash (#) symbol, at the beginning of the /etc/rc.d/init.d/postgresql file:

# chkconfig: 345 85 15
# description: PostgreSQL RDBMS

Starting PostgreSQL with the SysV script:

service postgresql start
Starting PostgreSQL: ok

service postgresql stop
Stopping PostgreSQL: ok

The next step will be to create a new database. This will be a simple test database. We do not recommend using the default template1 database for testing purposes. As you have not created any users with database-creation rights, you will want to make sure that you are logged in as the postgres user when adding a new database.

To create a new database named testdb, enter the command shown:
createdb testdb

psql testdb

You can now start entering SQL commands (e.g., such as SELECT) at the psql prompt
To verify that the database is working correctly, you can issue the command shown in which should give you a listing of the languages installed in the database

SELECT * FROM pg_language;

lanname lanispl lanpltrusted lanplcallfoid lancompiler
----------+---------+--------------+---------------+-------------
internal f f 0 n/a
C f f 0 /bin/cc
sql f f 0 postgres

Problem setting PATH on Mandrake 10

I posted these instructions earlier

Configure Environment Variables

Edit and add the lines below to '/etc/profile'

Make sure you logout and login for this to take effect.

It's really good to get this straight from the beginning.
JAVA_HOME=/usr/local/java/java
CATALINA_HOME=/usr/local/tomcat
PATH=$JAVA_HOME/bin:$PATH:$HOME/bin:/sbin:/usr/sbin
CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar:$CATALINA_HOME/common/lib/servlet.jar:/usr/local/pgsql/share/java/postgresql.jar:../lib/struts.jar:.
Now add the PATH JAVA_HOME CATALINA_HOME & CLASSPATH if any aren't in the export line
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC JAVA_HOME CATALINA_HOME CLASSPATH"

I had problems with this because when I logged off and on again, the variables had been created, but the path wasnt being changed.

Turns out this happens because I was logged on as root, so the PATH gets overridden after its set. Logging on as another user showed that the PATH does indeed get set properly. Helpdesk closed!

Thursday, December 09, 2004

Wednesday, December 08, 2004

Setting up java tomcat on linux VIII - Configure Tomcat for mod_jk Connector

Configure Tomcat for mod_jk Connector

Directly below this line in '/usr/local/tomcat/conf/server.xml'

<Server port='8005' shutdown='SHUTDOWN' debug='1'\>

Add these lines:
<Listener className='org.apache.ajp.tomcat4.config.ApacheConfig'
modJk='/usr/local/apache2/modules/mod_jk.so'
workersConfig='/usr/local/tomcat/conf/jk/workers.properties'/>

Directly below this line in '/usr/local/tomcat/conf/server.xml'

<Host name='localhost' debug='0' appBase='webapps'>

Add this line

<Listener className='org.apache.ajp.tomcat4.config.ApacheConfig'
append='true' forwardAll='false'
modJk='/usr/local/apache2/modules/mod_jk.so' />

Comment out JK2 connector, and uncomment AJP1.3 connector (jk).(Does not appear to be required for tomcat5)
Change instances of localhost to whatever your domain name is

Create file '/usr/local/tomcat/conf/jk/workers.properties' with these contents:

# Setting Tomcat & Java Home
workers.tomcat_home=/usr/local/tomcat
workers.java_home=/usr/local/java/java
ps=/
worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13