Your SlideShare is downloading. ×
18449982 installing-configuring-oracle-database10g-xe-on-linux-cent os5-v10
18449982 installing-configuring-oracle-database10g-xe-on-linux-cent os5-v10
18449982 installing-configuring-oracle-database10g-xe-on-linux-cent os5-v10
18449982 installing-configuring-oracle-database10g-xe-on-linux-cent os5-v10
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

18449982 installing-configuring-oracle-database10g-xe-on-linux-cent os5-v10

710

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
710
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Oracle 10g XE on CentOS5 SerengetiSys Labs Configuring Oracle Database 10g XE on Linux v1.0 Oracle Database 10g XE Server Installation on Linux CentOS5 Step by Step HowToBy Kefa Rabah, krabah@globalopenversity.org April 16, 2009 SerengetiSys LabsIntroductionIf you all your database work using the open source MySQL but always had a passion for thebeauty and power of Oracle but couldn’t afford the big bucks – now you can, without having tospend a dim. Oracle has finally let loose the good old Oracle database which you can use as abackend database which is known as Oracle Database Express Edition (Oracle Database XE) andis 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 warnedthat the Oracle site can be a little frustrating. You will want to download Oracle Database 10gExpress Edition (either Western European or Universal version depending on your languagerequirements), which represents the Server, and Oracle Database 10g Express Client, whichallows remote access to the server from another machine.Oracle provides detailed documentation on these, including an Installation Guide, a GettingStarted Guide and an Online Tutorial. While these are welcome, they tend to cover more optionsthan you really need and so they can be a bit confusing. This note trims off that excess verbageand explains what I needed to do to install the database on a Linux CentOS 5 server.Part 1: Oracle 10g XE Server Installation1. Check the prerequisites in the Installation GuideFor hardware these are basically 512 MB memory, 1.5 GB disk.Youll need at least 1024 MB of swap space. Check that with:# free –mIf the total for the Swap line is less that 1024 then you need to add a swapfile of an appropriatesize. Ill try and add a short note about that to this site when I get the chance - otherwise googlefor it.Youll need the Linux packages glibc (2.3.2 or higher) and libaio (0.3.96 or higher). You shouldhave glibc already there but youll have to install libaio (as root), so make sure you do the su –command fast, just to be on the safe side:# yum install libaioThere are also a bunch of kernel parameters listed in the installation guide. I didnt have to messwith these.2. Install the Downloaded RPMChange to the directory where downloaded the package and issue the command as shown:[root@server04 software-tmp]# rpm -ivh oracle-xe-10.2.0.1-1.0.i386.rpmPreparing... ########################################### [100%] 1:oracle-xe ########################################## [100%]Executing Post-install steps...You must run /etc/init.d/oracle-xe configure as the root user toconfigure the database.If youve met all the prerequisites, the rpm should install smoothly. Next let’s run the scripts asinstructed above. 1© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canadawww.globalopenversity.org A GOV HowTo Technical Publication
  • 2. Oracle 10g XE on CentOS5 SerengetiSys Labs Configuring Oracle Database 10g XE on Linux v1.03. Run the Configuration ScriptTo run the configuration script, issue the following command:# /etc/init.d/oracle-xe configureOracle Database 10g Express Edition Configuration-------------------------------------------------This will configure on-boot properties of Oracle Database 10g ExpressEdition. The following questions will determine whether the database shouldbe starting upon system boot, the ports it will use, and the passwords thatwill be used for database accounts. Press <Enter> to accept the defaults.Ctrl-C will abort.Specify the HTTP port that will be used for Oracle Application Express [8080]:8081Specify a port that will be used for the database listener [1521]:Specify a password to be used for database accounts. Note that the samepassword will be used for SYS and SYSTEM. Oracle recommends the use ofdifferent passwords for each database account. This can be done afterinitial configuration:Confirm the password:Do you want Oracle Database 10g Express Edition to be started on boot (y/n) [y]:Starting Oracle Net Listener...DoneConfiguring Database...DoneStarting Oracle Database 10g Express Edition Instance...DoneInstallation Completed Successfully.To access the Database Home Page go to "http://127.0.0.1:8081/apex"]#Note: In simple terms, you accept the defaults for the two questions about ports, provide anadministrator password and set the database to start on boot. However, if you are like me withmany servers running on my testing lab, then you may want to change the port to differentnumber e.g., 8081. As can be observed, the script will then do a load of work in the backgroundto configure things properly for you.This can take quite a while. Run top in another cup of coffee for company and stick around if youwant reassurance that things are happening.4. Access the Database via its Web SiteOn the server with the database, open up a browser and go to http://localhost:8081/apex.Login as system and give the password that you set earlier. If you want to access this site fromother machines on your network then go Administration->Manage HTTP Access and selectAvailable from Local Server and Remote Clients.You can enable a test database by going to Administration->Database Users->ManageUsers and clicking on HR. Provide a password (such as hr) and change Account Status tounlocked and click the Alter User button. This test database is handy for testing later on.5. Set Some Environment VariablesAs 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 Canadawww.globalopenversity.org A GOV HowTo Technical Publication
  • 3. Oracle 10g XE on CentOS5 SerengetiSys Labs Configuring Oracle Database 10g XE on Linux v1.0When you create a shell this will set a few environment variables that are required in order toaccess 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.Now verify that Oracle environment is set correctly, as follows:]# echo $ORACLE_HOME/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/Thats it for installing the server... Enjoy!Part 2: Oracle XE Client InstallationIf you need to do remote database management, then you would install this on a remotemachine that you want to access the database server over the network.1. Check the prerequisitesGain to be on the safe side check that the glibc and libaio packages, as above:# yum install libaio -y2. Install the Downloaded RPMThis gave me a couple of errors but they didnt appear to be a problem...# rpm -ivh oracle-xe-client-10.2.0.1-1.0.i386.rpmPreparing... ################################## [100%]df: `/usr/lib/oracle: No such file or directoryexpr: syntax error/var/tmp/rpm-tmp.86099: line 23: [: -lt: unary operator expected1:oracle-xe-client ##################################### [100%]Executing Post-install steps...3. Setup the Environment VariablesAs 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.sh4. Access the Remote ServerIf your paths are setup correctly then you can access sqlplus from a shell. Here I am accessingthe HR test database on server testbed. The correct syntax is username/password@host# sqlplus /nologSQL*Plus: Release 10.2.0.1.0 - Production on Mon Jan 29 10:21:21 2007Copyright (c) 1982, 2005, Oracle. All rights reserved.SQL> connect system/passwordConnected.SQL> SELECT * FROM Customer;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 Canadawww.globalopenversity.org A GOV HowTo Technical Publication
  • 4. Oracle 10g XE on CentOS5 SerengetiSys Labs Configuring Oracle Database 10g XE on Linux v1.0Thats it... you’re done – Enjoy! As you can see it is a very fairly simple and straight forwardinstallation and configuration. I hope you have great fun working with Oracle on Linux like me. Beon 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 inseveral field of Science & Technology, IT Security Compliance and Project Management, andRenewable Energy Systems. Rabah is also the founder of Global Open Versity, a Center ofExcellence in eLearning. 4© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canadawww.globalopenversity.org A GOV HowTo Technical Publication

×