Installing Oracle 11g on Fedora 13 through 18

Set the Host Name

Sometimes 11g installations fail late in the process if the hostname is set to localhost. So, prior to installation, make sure the hostname is set to something other than localhost. Even localhost.localdomain appears to work. Also, make sure the /etc/hosts file contains an entry for the hostname you use. You can set the hostname to localhost.localdomain, for example, by editing /etc/sysconfig/network and setting:

HOSTNAME=localhost.localdomain
and then rebooting. Do not just temporarily set the hostname during installation and then set it back later as the tns listener will refuse to start if you do.

Install Software Packages

Oracle 11g requires some software packages that may not have been installed on your system. Run the following yum command to install them:

yum install libaio libaio-devel compat-libstdc++-33 elfutils-libelf-devel \
sysstat unixODBC unixODBC-devel ksh

Configure the Kernel

Oracle 11g requires that you at least temporarily increase the values of a couple of kernel parameters. To temporarily increase these values, follow these instructions (as root):

echo 6815744 > /proc/sys/fs/file-max
echo "9000 65500" > /proc/sys/net/ipv4/ip_local_port_range
echo 262144 > /proc/sys/net/core/rmem_default
echo 4194304 > /proc/sys/net/core/rmem_max
echo 262144 > /proc/sys/net/core/wmem_default
echo 1048576 > /proc/sys/net/core/wmem_max
echo 1048576 > /proc/sys/fs/aio-max-nr
echo 2097152 > /proc/sys/kernel/shmall
echo 2147483648 > /proc/sys/kernel/shmmax
echo 4096 > /proc/sys/kernel/shmmni
echo "250 32000 100 128" > /proc/sys/kernel/sem

Install Oracle

Now, log in as the oracle user.

Since Oracle 11.2.0 uses a graphical installer, you need to be running X Windows or point the DISPLAY environment variable to an X Windows session running somewhere.

I have had problems with the graphical installer on enlightenment and fluxbox window managers in the past, though they may work for you.

If you have a CD, mount it and cd to the mount point. If you have a zip distribution, extract the file using:

unzip linux_11gR2_database_1of2.zip
unzip linux_11gR2_database_2of2.zip
Change directories to the database directory.

Type ./runInstaller

On the first screen, leave the Email box blank, uncheck the box next to I wish to receive security updates via My Oracle Support and click Next.

When the Email Address Not Specified popup appears, click Yes.

On the Select Installation Option screen, accept the default Create and configure a databaseand click Next.

On the System Class screen, accept the default Desktop Class and click Next.

On the Typical Install Configuration screen, change the Global database name from "orcl.localdomain" to "ora1.localdomain". Enter a password in the Administrative Password and Confirm Password boxes. Click Next

On the Create Inventory screen, accept the defaults and click Next

On the Perform Prerequisite Checks screen, operating system requirements will be checked. When it's done, click Next.

Some of the prerequisite checks have failed. Many are likely tunable system parameters and may be fixed by clicking Fix & Check Again and following the instructions. Other failures, such as missing packages, may not be fixable by the installer and may require manual intervention. Sometimes the installation will complain because it's looking for older packages than the ones that are actually installed. I have always been able to safely ignore this. After fixing them, click Check Again. When all is well, a Summary screen will appear. Click Finish.

On the Oracle Configuration Manager Registration screen, just click Next.

On the Summary screen, click Install

The Install Product screen will show the progress of the installation


Partway through the installation, you may get an error dialog saying something like error invoking target "agent nmhs". If you do, then log in as the oracle user, change directories to /u01/app/oracle/product/11.2.0/sysman/lib and run the following command:
gcc -o /u01/app/oracle/product/11.2.0/sysman/lib/emdctl \
-L/u01/app/oracle/product/11.2.0/lib/ \
-L/u01/app/oracle/product/11.2.0/sysman/lib/ \
-L/u01/app/oracle/product/11.2.0/lib/stubs/ \
`cat /u01/app/oracle/product/11.2.0/lib/sysliblist` \
-Wl,-rpath,/u01/app/oracle/product/11.2.0/lib -lm \
`cat /u01/app/oracle/product/11.2.0/lib/sysliblist` \
-ldl -lm \
-L/u01/app/oracle/product/11.2.0/lib \
/u01/app/oracle/product/11.2.0/sysman/lib/s0nmectl.o -lnmectl -lclntsh \
-L/u01/app/oracle/product/11.2.0/lib \
-L/u01/app/oracle/product/11.2.0/sysman/lib/ -lnmemso -lnnz11 -lcore11 \
-Wl,-rpath,/u01/app/oracle/product/11.2.0/lib/:\
/u01/app/oracle/product/11.2.0/sysman/lib/:\
/u01/app/oracle/product/11.2.0/jdk/jre/lib/i386/client:\
/u01/app/oracle/product/11.2.0/jdk/jre/lib/i386 \
-L/u01/app/oracle/product/11.2.0/jdk/jre/lib/i386/client \
-L/u01/app/oracle/product/11.2.0/jdk/jre/lib/i386 \
-z lazyload -ljava -ljvm -lverify \
-z nolazyload \
-Wl,-rpath,/u01/app/oracle/product/11.2.0/lib/:\
/u01/app/oracle/product/11.2.0/sysman/lib/:\
/u01/app/oracle/product/11.2.0/jdk/jre/lib/i386/client:\
/u01/app/oracle/product/11.2.0/jdk/jre/lib/i386 \
-Wl,--allow-shlib-undefined \
`cat /u01/app/oracle/product/11.2.0/lib/sysliblist` \
-ldl -lm
On 64 bit machines, you will have to replace i386 with either x86_64 or amd64. On some installations you might have to replace client with server. Try various permutations until it succeeds then click the Continue.

Eventually, a Database Configuration Assistant dialog should pop up. The image on the left hand side will change regularlry, but the dialog itself may not display anything. Ignore this, the configuration is occurring.

When database creation is complete, a dialog will pop up with a summary. Click OK.

A dialog will pop up asking you to run some scripts as root. Just follow the directions on the dialog and click Ok

On the Finish screen click Close

Post-Installation

During my installation, several directories got created with "localhost" in their names, but then various utilities expected directories with "localhost.localdomain" in them. I created symbolic links to resolve the problem:

cd /u01/app/oracle/product/11.2.0
ln -s localhost_ora1 localhost.localdomain_ora1
cd oc4j/j2ee
ln -s OC4J_DBConsole_localhost_ora1 OC4J_DBConsole_localhost.localdomain_ora1

You may or may not run into the same problem.

During the installation, several ancillary processes were started. You can shut some of them down by executing the following commands (as oracle):

emctl stop dbconsole

At this point, only the database and tns listener should be running.

During the installation, the tnsnames.ora file which tells clients how to connect to the database will most likely have been created in 640 mode, leaving it unreadable by anyone not in the oinstall group. There are 2 options here, either add every user that you want to be able to access oracle to the oinstall group, or change permissions on tnsnames.ora to make it world-readable. If you opt for the latter, you can do so using the following command:

chmod o+r /u01/app/oracle/product/11.2.0/network/admin/tnsnames.ora

No comments:

Post a Comment