Installing Oracle 11g (R2) on Gentoo

Installing Oracle 11g (R2) on an unsupported distribution (currently there are three supported ones - Oracle Enterprise Linux, Red Hat and SuSe) may be a bit of a problem - especially if the distribution is "progressive" i.e. contains fresh versions of different tools (compiler, libraries) and is not based on RPM packages. And both of these are true for Gentoo, so lets see what problems may occur during the installation (and how to solve them).

The following set of screenshots records one of the possible installation paths on a current Gentoo, and in case of potentially problematic steps there is a short description how to solve them. Lets check several things you should do before starting the installation.

A traditional preinstallation and installation steps (configuring kernel parameters, creation user group and user accounts, etc.) in general are not the topic of this article - their short description may be found here and a more detailed here. Lets check the steps specific for installation on Gentoo:

  1. libaio - It's necessary to install this library for asynchronous I/O (i.e. "emerge libaio").
  2. nptl (USE flag) - Oracle uses NPTL library (New Posix Thread Library) so check you have the "nptl" USE flag listed in your make.conf (and then run "emerge --newuse").
  3. pdksh - Oracle does not use a standard bash, but relies on a Korn Shell, so  install "public domain korn shell" (i.e. "emerge pdksh").
  4. libstdc++.so.6 - When linking and building binaries, Oracle references "libstdc++.so.6" but expects it to be placed in "/usr/lib" but the file is placed in a different directory so the linking fails. So you have to create a symlink to the correct location (e.g. "ln -s `gcc-config -L`/libstdc++.so.6 /usr/lib/libstdc++.so.6") and remove it after the installation.
  5. rt - When linking the binaries, Oracle does not append "-lrt" to the "ldd" command, and due to this the linking fails. The "ldd" parameters are read from a file that is created during installation, so it's possible to fix this at the time of failure only (see this).
  6. ORACLE_* - be careful if you have some ORACLE_* environment variables already set, as it may influence the installation process (the following installation assumes there are no such variables set).

That's all I had to do for a successfull installation - and now the installation step by step ...

Installation step by step ...

1. Configuring security updates

The first screen allows you to enable e-mail notifications of security updates - I've done this installation on my development machine, so I don't want to receive those e-mails.

2. Installation options

Choose if you want to create and configure a database, install database software only or upgrade an existing database (I'm using the first option on development workstations).

3. System class

I do install on a workstation (i.e. a desktop), but I do like full control over the installation so I've chosen "server class."

4. Node selection

Choose if you want to install a traditional single instance database (as I do), or Real Application Clusters with multiple instances.

5. Installation type

Choose "advanced install" so that you can set all the possible installation options (that are set automatically during the typical installation).

6. Languages

Choose the languages that should be supported by this installation.

7. Database edition

Choose which of the database editions should be installed - I've chosen maximal (enterprise) edition. If needed, you may click on "Select options" and choose individual features of the edition.

8. Installation location

Choose the directories where the database should be installed - usual location is in /opt/oracle.

9. Inventory of installed products

The directory containing inventory of installed products - this directory should be placed outside of "oracle base" (see the previous step).

10. Database identifiers

Choose a global database identifier and a traditional SID.

11. Configuration options - memory, character sets, security and sample schemas

Extended options - memory (SGA/PGA size), character sets, security and sample schemas. The following screenshots illustrate my choices - automatic memory management, UTF-8 character set (AL32UTF8), application of new security settings and creation of sample schemas.

12. Management options

If interested, you may enable various e-mail notifications.

13. Database storage options

Choose where all the database data files should be located.

14. Recovery options

As I perform this installation on my development workstation, I don't care about recovery, so I've disabled the automated backups.

15. Schema passwords

Choose the schema passwords as you wish - I've chosen the same password for all four schemas.

16. Privileged operating system groups (OSDBA, OSOPER)

Mapping of operating system user groups to privileged database user groups.

17. Prerequisite checks

In this step several prerequisite checks of various requirements (kernel parameters, installed libraries etc., apod.) - as Gentoo is not a supported system and does not use RPM packages, most of the check (incorrectly) fails. Just check "Ignore all" and lets continue ;-)

18. Summary

Review all installation choices - my recommendation is to save this (click on "Save Response File"), as you will forget details of the installation soon.

19. Installation progress

During the installation you may observe progress the whole process - when linking binaries ("Linking binaries") there will be an error as Oracle does not append "rt" library to the "ldd" call, and reports the following error message (see below).

Fixing this is quite simple - open the file "/opt/oracle/product/11.2.0/lib/sysliblist" (you will have to modify this path to reflect the paths you've chosen), and add "-lrt" to the end of the line, so that he file looks like this:

-ldl -lm -lpthread -lnsl -lirc -lipgo -lrt

And then click "Retry" at the error dialog.

20. Completing the installation

After fixing the "sysliblist" file the rest of the installation will complete fine (or should complete).

Links

 

Comments

There are no comments for this article (or are awaiting acceptance).

New comment

All the comments have to be accepted, so there may be some delay between submitting and accepting (or rejecting) the comment. If you enter the e-mail address, you will be informed about acceptance or rejection.

Subject or body may not contain HTML tags - they will be automatically removed. Paragraphs may be separated using a newline (ENTER).

(optional)