Oracle Database 10g XE Server Installation on Linux CentOS5 Step by Step HowTo
Introduction
If you all your database work using the open source MySQL but always had a passion for the
beauty and power of Oracle but couldn’t afford the big bucks – now you can, without having to
spend a dim. Oracle has finally let loose the good old Oracle database which you can use as a
backend database which is known as Oracle Database Express Edition (Oracle Database XE) and
is available as free download and use for all your database work.
You can find the software HERE but you will need to create an Oracle account first. Be warned
that the Oracle site can be a little frustrating. You will want to download Oracle Database 10g
Express Edition (either Western European or Universal version depending on your language
requirements), which represents the Server, and Oracle Database 10g Express Client, which
allows remote access to the server from another machine.
# free –m
If the total for the Swap line is less that 1024 then you need to add a swapfile of an appropriate
size. I'll try and add a short note about that to this site when I get the chance - otherwise google
for it.
You'll need the Linux packages glibc (2.3.2 or higher) and libaio (0.3.96 or higher). You should
have glibc already there but you'll have to install libaio (as root), so make sure you do the su –
command fast, just to be on the safe side:
There are also a bunch of kernel parameters listed in the installation guide. I didn't have to mess
with these.
If you've met all the prerequisites, the rpm should install smoothly. Next let’s run the scripts as
instructed above.
1
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada
# /etc/init.d/oracle-xe configure
Specify the HTTP port that will be used for Oracle Application Express [8080]:8081
Specify a port that will be used for the database listener [1521]:
Specify a password to be used for database accounts. Note that the same
password will be used for SYS and SYSTEM. Oracle recommends the use of
different passwords for each database account. This can be done after
initial configuration:
Confirm the password:
Do you want Oracle Database 10g Express Edition to be started on boot (y/n) [y]:
Note: In simple terms, you accept the defaults for the two questions about ports, provide an
administrator password and set the database to start on boot. However, if you are like me with
many servers running on my testing lab, then you may want to change the port to different
number e.g., 8081. As can be observed, the script will then do a load of work in the background
to configure things properly for you.
This can take quite a while. Run top in another cup of coffee for company and stick around if you
want reassurance that things are happening.
Login as system and give the password that you set earlier. If you want to access this site from
other machines on your network then go Administration->Manage HTTP Access and select
Available from Local Server and Remote Clients.
As root, open /etc/bashrc in an editor and add this line at the bottom of the file:
. /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh
2
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada
When you create a shell this will set a few environment variables that are required in order to
access the database. These include LD_LIBRARY_PATH, ORACLE_HOME and ORACLE_SID.
Look for them in the output of printenv when you create a new shell.
]# echo $ORACLE_HOME
/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/
If you need to do remote database management, then you would install this on a remote
machine that you want to access the database server over the network.
Gain to be on the safe side check that the glibc and libaio packages, as above:
As root, open /etc/bashrc in an editor and add this line at the bottom of the file:
. /usr/lib/oracle/xe/app/oracle/product/10.2.0/client/bin/oracle_env.sh
If your paths are setup correctly then you can access sqlplus from a shell. Here I am accessing
the HR test database on server testbed. The correct syntax is username/password@host
# sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jan 29 10:21:21 2007
You see lots of output returned by the server, indicating that everything is set up correctly.
3
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada
That's it... you’re done – Enjoy! As you can see it is a very fairly simple and straight forward
installation and configuration. I hope you have great fun working with Oracle on Linux like me. Be
on the look out on more progress on application of Oracle on Linux.
-----------------------
Kefa Rabah is the Founder and CIO, of Serengeti Systems Group Inc. Kefa is knowledgeable in
several field of Science & Technology, IT Security Compliance and Project Management, and
Renewable Energy Systems. Rabah is also the founder of Global Open Versity, a Center of
Excellence in eLearning.
4
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada