This is a summary of the steps I followed in order to be able to install Oracle XE 10g on my Centos Virtual Private Server (VPS) hosted by eapps.com.
Update: A more recent post is available concerning the installation of Oracle XE 11g in a similar environment.
The basic idea is based on the steps described in this blog entry.
The main problems that had to be addressed were the following:
- Lack of swap space
- Setting apex to be serviced on a port other than 8080.
- Download the rpm from here. I have used the Universal version (oracle-xe-univ-10.2.0.1-1.0.i386.rpm).
- Install yum (using Add Application from the Control Panel).
- Install packages for cpio and libaio with these commands:
- yum install libaio
- yum install cpio
- Extract the contents of the rpm into a temporary folder:
- rpm2cpio oracle-xe-univ-10.2.0.1-1.0.i386.rpm > oracle-xe-univ-10.2.0.1-1.0.i386.cpio
- cpio -idv < oracle-xe-univ-10.2.0.1-1.0.i386.cpio
- At this point the rpm contents have been extracted and we are ready to copy them to the appropriate locations:
- # cp -R ./usr /
- # cp -R ./etc /
- Make the following additions/changes to users/groups using the Control Panel:
- Create a group and name it dba.
- Create a new user (oracle) with dba as its primary group:
- Add root to the dba group.
- Give the ownership of the /user/lib/oracle to this user :chown -R oracle:dba /usr/lib/oracle
- Edit the nls_lang.sh script and replace #!/bin/sh by #!/bin/bash
- Run the oracle_env.sh to simplify the process:. /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh
- Change the user rights on the oracle binary :
- # chmod u+s $ORACLE_HOME/bin/oracle
- # chmod g+s $ORACLE_HOME/bin/oracle
- Set the desired size of SGA and PGA (in the scripts they appear as substitution variables %sga_target% and %pga_aggregate_target%):
- # cd /usr/lib/oracle
- Find two (2) files using substitution variables using this: # find . -exec grep "%sga_" '{}' \; -print
- Replace the variables in these files with their desired values. I have used the following values:
- sga_target=246579200 (= 200 MB)
- pga_aggregate_target=67108864 (=64 MB)
- At this point oracle software is in the correct location and we are ready to run database creation and configuration scripts. Start by executing:# /etc/init.d/oracle-xe configure
- I have used the default port (1521) for the listener. However we need to use a port other than 8080 for apex since port 8080 is already used by Tomcat. The port of choice was 8084.
- Connect internally to oracle using sqlplus to change the XDB HTTP port and register the instance with the listener (this may not be necessary but just in case):
- sqlplus / as sysdba
- SQL> EXEC DBMS_XDB.SETHTTPPORT(8084);
- SQL> alter system register;
- That's all. You may want to restart oracle. Use the following to stop/start it:
- /etc/init.d/oracle-xe stop
- /etc/init.d/oracle-xe start
- At this point if you check your listener it should look like this:# lsnrctl status
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 22-DEC-2008 08:19:09
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 22-DEC-2008 08:18:30
Uptime 0 days 0 hr. 0 min. 39 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/listener.ora
Listener Log File /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<your hostname>)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=8084))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "XE" has 1 instance(s).
Instance "XE", status READY, has 1 handler(s) for this service...
Service "XEXDB" has 1 instance(s).
Instance "XE", status READY, has 1 handler(s) for this service...
Service "XE_XPT" has 1 instance(s).
Instance "XE", status READY, has 1 handler(s) for this service...
The command completed successfully
Finally, these are the contents of the listener.ora and tnsnames.ora files I am using:
These are the contents of the listener.ora file:
# listener.ora Network Configuration File:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /usr/lib/oracle/xe/app/oracle/product/10.2.0/server)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(ADDRESS = (PROTOCOL = TCP)(HOST = <your hostname>)(PORT = 1521))
)
)
DEFAULT_SERVICE_LISTENER = (XE)
These are the contents of the tnsnames.ora file:
# tnsnames.ora Network Configuration File:
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = <your IP>)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
I hope that the above will help other people trying to install Oracle XE on a similar environment.
Kostas