Install Oracle XE 10g and Tomcat 6 on 64-bit Ubuntu Server 11.04

1. For Oracle XE 10g:

1
2
3
$sudo apt-get install libc6-i386, bc  # Install i386 compatible libraries
$wget -c http://oss.oracle.com/debian/dists/unstable/main/binary-i386/libaio_0.3.104-1_i386.deb  # Get the additional library
$sudo dpkg -i --force-architecture libaio_0.3.104-1_i386.deb  # Install this package without architecture testing

But for the oracle deb files, get from the official site, we encounter problems. The install file will check dependencies of libc and bc although our installed version is newer than it needs. To solve this problem, we referenced here and the steps we tried is listing:

1
2
$sudo dpkg -x oracle-xe-universal_10.2.0.1-1.1_i386.deb oraextract  # Extracts filesystem
$sudo dpkg -e oracle-xe-universal_10.2.0.1-1.1_i386.deb oraextract/DEBIAN  # Extracts pkg config files

Then edit the configure file oraextract/DEBIAN/control and let the dependencies like Depends: libaio (>= 0.3.96) | libaio1 (>= 0.3.96). Finally we can repack it, install it, and configure it successfully:

1
2
3
$sudo dpkg-deb --build oraextract
$sudo dpkg -i --force-architecture oraextract.deb
$sudo /etc/init.d/oracle-xe configure

For convenience usage, we set up some variables for user oracle ({ORACLE_USER_HOME}/.bashrc).

1
2
3
4
5
ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_HOME
export ORACLE_SID=XE
export PATH

2. For tomcat 6

We want to let tomcat to use port 80 as default instead of using port 8080. After we change the port settings in server.xml, we realise the default port setting in our environment is forbidden. Since Ubuntu 10.04, the default usage of port less than 1024 is locked by default where we should use authbind to solve do this.

The solution is to edit /etc/default/tomcat6 and change the last line AUTHBIND=yes. And then we restart Tomcat and it works.

Leave a Reply

Your email address will not be published. Required fields are marked *