Oracle in Fedora 14 x86-64

Finally after much research in the internet, I have successfully installed Oracle 11gR2 database in my Fedora 14 x86-64. As a side-note, Oracle is impossible to install in any of the debian based distros. Only the old school RPM based distros like Fedora, can be used. You might find posts where people claim to have installed it in debian based systems like Ubuntu, but it never worked for me.
 
This reason I wanted to do this is because, I got my other laptop(vaio cr14) shipped and is with me now and quite frankly, I prefer the linux environment to windows for these things. Installing oracle and weblogic in windows 7(installed for reasons I talked about earlier) brought down the performance of my hp g60 to half. In fedora, I don’t see any kind of difference in performance at all. 

oracle on linux
 

Installing in windows was very easy and it happens at a mouse click. Here on the other hand, we need much more than just a mouse click. 
I found this link to be extremely useful.
blog.fpmurphy.com/2010/12/installing-oracle-11g-release-2-on-fedora-14.html
However I did skip a lot of its steps as I found them unnecessary for my usage. So, heres how I installed it here : 

First of all decide where to put your oracle software. Well, I just chose the default so this is what it gave me :
ORACLE_BASE=/home/anoopkam/app/anoopkam/
ORACLE_HOME=/home/anoopkam/app/anoopkam/product/11.2.0/dbhome_1

This is the order of steps that I did. Somehow not doing the steps in the same order caused problems later on : 

  1. Disable SELINUX by editing /etc/selinux/config and changing the SELINUX= line to SELINUX=disabled:
  2. Reboot.
  3. Install only the oracle software using the oracle installer. DO NOT use the option to create/setup the database itself. 
  4. Install Oracle Instant Client Libraries. This can be downloaded from Oracle website.
  5. Goto $ORACLE_HOME/bin directory and run dbca to configure the database. DO NOT enable the enterprise manager at this point.
  6. Login to your database and register the service by the command : ALTER SYSTEM REGISTER;
  7. Run netca and create/configure a listener. 
  8. Run dbca again and reconfigure the database. This time, enable the Enterprse Manager. 

Details regarding individual steps:
In step 3, during the installation it will prompt you about missing libraries. Install all of them using yum : 

yum -y install binutils compat-libstdc++-33 compat-libstdc++-33.i686 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc.i686 glibc-common glibc-devel glibc-devel.i686 glibc-headers ksh libaio libaio.i686 libaio-devel libaio-devel.i686 libgcc libgcc.i686 libstdc++ libstdc++.i686 libstdc++-devel make numactl-devel sysstat unixODBC unixODBC.i686 unixODBC-devel unixODBC-devel.i686

If you use a 64bit OS like me, the installer will keep showing some of the libraries as missing. This is because the installer is expecting 32 bit versions of those libraries. If you have the 64 bit version installed, you can simply ignore them and continue. 
When you click the fix and check button it will ask you to run a script. MAKE SURE that all scripts that the installer asks you to run is run as root user. 
Now during the phase where it links libraries, you will see an error about ins_emagent.mk. This error is due to a change to GCC linker which first occurred in Fedora 13. The fix is to edit $ORACLE_HOME/sysman/lib/ins_emagent.mk, search for the line $(MK_EMAGENT_NMECTL) and replace the line with $(MK_EMAGENT_NMECTL) -lnnz11. Once this is done, click the retry button and the installation will continue.

in step 5, it is quite possible to see a problem. You will probably see this error : 

ORA-27154: post/wait create failed
ORA-27300: OS system dependent operation:semget failed with status: 28
ORA-27301: OS failure message: No space left on device
ORA-27302: failure occurred at: sskgpsemsper
This is quite misleading as it has nothing to do with space left on the device, rather its about how many semaphores is set in your kernel as the maximum limit. As per oracle’s recommendations, the solution is to add the following line in /etc/sysctl.conf

kernel.sem = 256 32768 100 228

Once this is done, run dbca again and it will finish without any more problems.

Step 6, Step 7 and Step 8 hasn’t given me any troubles yet. So, I guess that shouldn’t be of any trouble for you.

Once everything is successful you should be able to login to your database’s enterprise manager using your browser as 

https://localhost:1158/em
If this gives a 404, then something s wrong and you may want to review the steps so far, especially regarding the listener, to resolve them.

————————————————————————————————————————————————

Now in windows, once your install, it will be automatically started everytime the system boots. Unfortunately, this doesn’t happen by default in linux. To manually start the database, I did the following :

First of all open the terminal and set the environment variables as follows : 

ORACLE_BASE=/home/anoopkam/app/anoopkam
export ORACLE_BASE
ORACLE_HOME=/home/anoopkam/app/anoopkam/product/11.2.0/dbhome_1
export ORACLE_HOME
ORACLE_SID=AKDB
export ORACLE_SID

The paths and SID must match what you used while installing oracle and configuring the database. Once this is done, 
$cd $ORACLE_HOME/bin/

//start the listener
$ ./lsnrctl start LISTENER

Once this is done, login to database as SYSDBA. Make sure you have the rights, ie,, you must belong to the SYSDBA group to do this. 
$ ./sqlplus / as SYSDBA

Once you login, start the database instance by 

SQL> startup

Once the database has started, quit sqlplus and start the enterprise manager as :

$ ./emctl start dbconsole

Once this is successful, your database is up and ready for use. Now this seems a lot of work to start your database right? Well, there appears to be ways by which I can write a script and put in to be executed at startup by which the same operations can be done. Let me see what I can do here 🙂

More From Author

The closest thing to replace pen and paper for good :)

I have used two other styluses namely, the Bamboo Stylus and the Cregle iPen. By…

Apple Event October 2012

Been watching the live streaming of the Oct 23rd apple event. This is the event where…

Bootcamping Windows 8

Finally installed Windows 8 to Bootcamp(to non-mac users, this means that the windows now runs…

Leave a Reply

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