Installing Oracle 11g Release 2 on Fedora 14

This post will show you how to install Oracle Database 11g Release 2 on Fedora 14 (Laughlin), configure Oracle Enterprise Manager to access the database and how to access the database from a Window platform using Oracle SQLPlus Instant Client. Note, however, that Oracle Database 11g R2 is not certified by Oracle to run on Fedora 14 so you will not get support from Oracle if you have any questions.

The following steps should be done as root. First add a number of kernel parameters to /etc/sysctl.conf if they do not already exist in this file or have values less than what is shown here.

These are minimum required values by the way; they can be higher. The current value of a particular kernel parameter can be displayed using the following command:

# /sbin/sysctl -a | grep

If you do not want to reboot your system after updating /etc/sysctl.conf, just execute the following command to update the kernel with the new parameters:

# /sbin/sysctl -p

If the Fedora 14 Development Tools package group is already installed, the majority of the necessary packages to build and run the Oracle database are already installed; otherwise install the Development Tools package group using yum. If the following additional packages are not already installed on your system:

binutils

libaio, libaio-devel

ksh

sysstat

unixODBC, unixODBC-devel

compat-libstdc++-33

you also need to install them using yum.

Next, you need to modify PAM (Plugable Authentication Module) configuration files to increase the session limits for the oracle user which we will create later on. Add the following line to /etc/pam.d/login if it does not already exist:

You also must disable Secure Linux (SELINUX) while installing the Oracle database software. To do this, edit /etc/selinux/config as follows:

SELINUX=disabled

and execute setenforce off. Do not forget to enable SELINUX after you have completed the installation!

The release information in /etc/redhat-release is incorrect as far as the Oracle installer is concerned. It knows nothing about Fedora 14 but does know about Red Hat. Therefore the release string needs to be modified as follows:

The next few steps require that you are logged in as oracle. As user oracle, download Oracle Database 11g R2 from Oracle and place the two files you downloaded into the same subdirectory. I placed them in ~oracle but you are free to choose any subdirectory. Then unzip both files.

Note that the ORACLE_UNQNAME environmental variable was previously known as DB_UNIQUE_NAME. This environmental variable is used by Oracle Enterprise Manager; it need not be the same as ORACLE_SID.

If you are using a different shell, you will need to set up these environmental variables and limits using the appropriate shell syntax and shell initialization file. You may also need to set the NLS_LANG environmental variable to match your country, language and desired character set, e.g. ENGLISH_IRELAND.AL32UTF8 for UTF-8 support in Ireland.

Oracle databases are installed using the Oracle Universal Installer (OUI) which is a Java-based GUI that uses the X Window system. There is no command line installer. You can record your OUI session to a response file. All the options you selected during the database installation are saved in the response file. This feature makes it easy to duplicate the results of a successful installation on multiple systems. You may need to set the your DISPLAY environmental variable and use the xhost utility to configure server access.

Start OUI by issuing the runInstaller command in the ~oracle/database directory. If OUI cannot determine your IP address because it is not in /etc/hosts then you will get the following error:

[INS-06101] IP address of localhost could not be determined

If you see an error message similar to one of the following: “Failed to connect to server”, “Connection refused by server” or “Can’t open display”, then you have a problem with X Windows, either with permissions or the DISPLAY variable. I am going to assume you know how to fix such problems.

After answering a few basic questions, you should see the following Typical Install Configuration screen:

Check the settings carefully before proceeding further.

Next OUI checks that the installed software development and runtime packages are correct:

Fedora 14 will fail all these checks. Just tick the check box Ignore All on the top right hand to ignore these errors. So long as you have the latest version of each of these packages installed, all will be fine. Note that you do not need to install pdksh (Public Domain Korn Shell) if you have ksh installed.

During the installation, OUI will popup a dialog window advising you that an error has occurred with ins_emagent.mk. See below:

This error is due to a change to GCC linker which first occurred in Fedora 13. The announcement is here. 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 as shown above.

After saving the changed file, select the Retry option, and the install should successfully continue. Eventually you should see the Database Configuration Assistant screen followed shortly by a Password Management screen as shown below:

Do not ignore the Password Management button; press it and change the passwords for SYS and SYSTEM.

After this you will be asked to run two shell scripts as root. Just open up a root terminal window and execute these shell scripts. One script installs three scripts, coraenv, oraenv and dbhome in /usr/local/bin (or another user-specified directory) and the other creates /etc/oratab.

At this stage the installer has finished installing the Oracle database and you can press the Finish button. The Oracle database does not need to be started; it is already up and running.

If you would like to do a basic smoketest of the installed database software to confirm the installation was successful, try doing the following:

If you have got this far with your installation of Oracle 11g, all is well. The core Oracle 11g database software is installed and working. You may have some tweaking to do for your particular requirements but that is outside the scope of this post.

Before you go any further, as root, you need to do some housekeeping and fix up a couple of files. Edit the /etc/oratab file and change the restart flag for the orclinstance to Y:

orcl:/app/oracle/product/11.2.0:Y

Then replace /etc/redhat-release to restore the correct release information:

# mv /etc/redhat-release.org /etc/redhat-release

If the Oracle Enterprise Manager dbconsole is running (start with emctl start dbconsole, check status with emctl status dbconsole), you should be able to use your web browser to access the console at port 1158. For the initial login, use the username SYS, the password you configured for this user and set the role to SYSDBA.

To display graphs on certain pages of the Enterprise Manager console you need to have an Adobe Flash plugin installed. If you are on 64-bit Fedora, I recommend that you install the new Adobe Square Flash plugin. See this post for details of how to download and install this plugin.

As part of the database installation a sample HR schema was installed but left locked. Here is how to unlock this sample schema using sqlplus:

At this stage you should be able to invoke the Oracle sqldeveloper GUI by invoking $ORACLE_HOME/sqldeveloper/sqldeveloper/bin/sqldeveloper. However before you can log in, you have to configure a valid connection. As an example of how to configure a valid connection, here is my HR connection properties:

Once you have configured a valid connection, you will be able to login as user HR and examine the HR schema.

To automatically start and stop the Oracle database during system startup and shutdown you need to place an appropriate script in the /etc/rc.d/init.d directory and symbolically link it to the appropriate rc directories. See this post for an example of such a script.

An Oracle Instant Client gives customers the ability to quickly install and deploy Oracle applications including sqlplus on various platforms including Microsoft Window 7 without installing the standard Oracle client or having an ORACLE_HOME. Instant Clients for 32-bit Microsoft Windows are available here. You need to download two packagee, i.e the Instant Client Package – Basic Lite (contains English error messages and Unicode, ASCII, and Western European character set support) and the Instant Client Package – SQL*Plus (contains additional libraries and executable for running SQL*Plus with Instant Client.)

Unzip the two packages into a single directory such as C:\SQLPLUS. Then edit the configuration file tnsnames.ora which you will find in this directory to configure the connection to your Fedora 14 system.

If you are using a firewall on your Fedora 14 platform (which you should be!), you will have to modify iptables to open port 1521 for TCP packet send and receive. Here are the appropriate lines to add to /etc/sysconfig/iptables:

In a production environment these rules should be modified to restrict the range of IP addresses that can access the 1521 port.

Once you have configured a valid connection, you will be able to connect to the Oracle database from your Windows 7 platform.

If security is not an issue, you can add a shortcut as shown above so that you are automatically connected to a schema.

Well, time to stop. The information in this post should be enough to get you up and running. Please let me know if I left out anything important that you feel would of been of help to you in installing Oracle 11g on Fedora 14 and I will add it to this post.

December 4th, 2010

4 comments to Installing Oracle 11g Release 2 on Fedora 14

Hi, Nice tutorial. It got working. But after installation as instructed I enabled selinux. And now after restart, oracle is not getting started, as “executable stack is not writable by oracle”! I am still trying , how to make it happen! If any place I can get more information? Please help.

Very helpful.
Works well on Fedora 14 x86-64-bit on an AMD processor, 4Gb memory, Gateway PC.

But could not get EM to work from Firefox. Any suggestions? I am connected to the Internet when I try this and the database instance is local (localhost.localdomain:1158). Will not connect… Could it be a firewall issue? Is so how to check and rectify?

Hi i follow your guide, when im trying to start de dbconsole i get some errors,

emctl status dbconsole
The following exception occurred:
java.net.UnknownHostException: ultra.xfpmurphy.com: ultra.xfpmurphy.com
at java.net.InetAddress.getAllByName0(InetAddress.java:1145)
at java.net.InetAddress.getAllByName(InetAddress.java:1072)
at java.net.InetAddress.getAllByName(InetAddress.java:1008)
at java.net.InetAddress.getByName(InetAddress.java:958)
at oracle.sysman.emd.targetIntg.agent.AgentTargetInstaller.getLocalHost(AgentTargetInstaller.java:4289)
at oracle.sysman.emd.targetIntg.agent.AgentTargetInstaller.printLocalHost(AgentTargetInstaller.java:4252)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at oracle.sysman.emd.targetIntg.Util$DefaultIntegrationMethod.execute(Util.java:598)
at oracle.sysman.emd.targetIntg.TargetInstaller.execute_(TargetInstaller.java:167)
at oracle.sysman.emd.targetIntg.TargetInstaller.execute(TargetInstaller.java:155)
at oracle.sysman.emSDK.conf.TargetInstaller.printLocalHost(TargetInstaller.java:2364)
at oracle.sysman.emSDK.conf.TargetInstaller.main(TargetInstaller.java:3290)
Although there was an exception it might be possible for the program to continue.
OC4J Configuration issue. /home/oracle/app/oracle/product/11.2.0/dbhome_1/oc4j/j2ee/OC4J_DBConsole_ultra.xfpmurphy.com_orcl not found.