Linux Server Setup with CentOS 4.3

Revision as of 14:25, 20 June 2011 by HE-NICK (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
The information on this page has been deprecated..

It is provided for informational purposes only.


Go Here Instead

Operating System Installation: CentOS 5.2

For setup instructions under CentOS 5.2, see Linux Server Setup with CentOS 5.2


We chose to use CentOS 4.3 as our Linux software. It has the same versions of install packages supported by Oracle as Red Hat EL3, however it is free. You may choose to use another Linux flavor, although we strongly recommend using a version that is supported by Oracle. If you are using or going to use another flavor of Linux please do not skip reading the CentOS installation as it contains configurations needed to run Oracle properly. However, you may have to adjust these configurations changes for your version. We will go through the installation and configuration of CentOS and Oracle now.

CentOS 4.3 Installation

Install CentOS 4.3 -- You may want to tweak what does and does not get installed for each catagory.

X Window System 
GNOME Desktop Environment 
Graphical Internet 
Text-based Internet 
Server Configuration Tools 
Development Tools 
Administration Tools 
System Tools 

I've found it may not be necessary to install packages from GNOME and Graphical Internet, but if you have plenty of hdd space go ahead.

Set Kernel Parameters Modify the /etc/sysctl.conf file to include the lines appropriate to your operating system:

# Red Hat Enterprise Linux 4.0 and CentOS 4.x
kernel.shmmax = 536870912 ! This number should equal 1/2 of the physical RAM in the machine.
kernel.shmmni = 4096
kernel.shmall = 2097152
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000

Run the following command to change the current kernel parameters: /sbin/sysctl -p

Disable secure linux by editing the /etc/selinux/config file, making sure the SELINUX flag is set as follows: SELINUX=disabled Alternatively, this alteration can be done using the GUI tool (Applications > System Settings > Security Level). Click on the SELinux tab and disable the feature.

Setup -- I did a custom setup and didn't install gnome so I'm missing a few things. I just used 'yum install ......' to add missing packages. The documentation states that the following packages are required by the relevant operating systems:

  1. Red Hat Enterprise Linux 4.0 and CentOS 4.x
compat-db-4.1.25-9  -- not installed with default CentOS installation
control-center-2.8.0-12  -- not installed with default CentOS installation
gnome-libs- -- not installed with default CentOS installation
libaio-0.3.96 -- not installed with default CentOS installation
openmotif21-2.1.30-11 -- not installed with default CentOS installation -- NOT SURE IF NEEDED by ORACLE.
sysstat-5.0.5-1 -- not installed with default CentOS installation -- IS NOT NEEDED by ORACLE
xscreensaver-4.18-5.rhel4.2 --  IS NOT NEEDED by ORACLE

Create the new groups and users:

groupadd oinstall
groupadd dba
useradd -g oinstall -G dba -d /opt/oracle -m -s /bin/bash oracle
passwd oracle

Login as the oracle user and add the following lines at the end of the .profile (or .bash_profile) file:

# Oracle Settings
TMP=/tmp; export TMP
ORACLE_BASE=/opt/oracle; export ORACLE_BASE
PATH=.:/usr/sbin:$ORACLE_HOME/bin:$PATH; export PATH
PATH=$PATH:$ORACLE_HOME/dcm/bin:$ORACLE_HOME/opmn/bin; export PATH
PATH=$PATH:$ORACLE_HOME/Apache/Apache/bin; export PATH
# set -o emacs
set -o  vi
set filec

Perforce Client Setup

We keep our schemas and scripts in perforce. If your company does not use perforce for this purpose then you can skip this section.

Download the latest p4 client for Linux.
You'll need to determine which one best fits your system
For us we're using the Linux client 2.6 kernel for x86 CPU
It is customary to put 3rd party, non-daemon/server, applications into /usr/local/bin.
Make sure the permissions are correct, I've found it's necessary to run 'chmod 755 /usr/local/bin/p4'.
Finally you'll want to setup the client spec, but that's beyond the scope of this document.

Directions for Oracle Installation

If you are installing from the server open up a terminal and start the Oracle Universal Installer (OUI). If you're SSHed into the computer make sure you're have XForwarding enabled and you use the '-X' switch when connecting.

ssh -X oracle@your_server

Now run the Oracle Installer by issuing the following command in the installation software directory:

As of this writing I use an nfs mount from depot - Most users will install from the CDROM.
'mount -t nfs depot:/opt/10g_r2 /mnt'

You should get a screen similar to the one below with the settings:

Oracle Home Location: /opt/oracle/product/10.2.0
Installation Type: Standard Edition
UNIX DBA Group: oinstall
Uncheck 'Create Starter Database'

Oracle inital install.jpg

If everything is going well you will see a screen similar to the one below with the following settings:

Use the default /opt/oracle/oraInventory for the inventory directory
Use the default oinstall for Operating System group name

Oracle second screen.jpg

Oracle will now do it's "Pre-flight" check to make sure everything is as it should be before it starts intalling all of the files. You'll notice an error on this screen capture that I didn't have a large enough swap partition. Always remember your swap partition should be 1.5x-2x the amount of RAM you have installed. Since I'm just documentating how to do a basically Oracle 10Gr2 installation we'll continue on.

Oracle pre flight check.jpg

Click Next to continue.

Oracle will present a 'Summary' screen detailing everything which is going to be installed. If you're happy with everything click 'Install' to continue

Oracle summary.jpg

Oracle will do it's thing and install all the necessary software.

Oracle installing 1.jpgOracle installing 2.jpg

Once it's finished a window will pop up instructing you to run two commands AS ROOT.

Open up an other SSH windows or terminal window as root or become root (su -).
Run the scripts
Return to the window and click "OK" to continue

Oracle run as root.jpg

Oracle end of installation.jpg

Oracle really done YN.jpg

If you've gotten this far, congratulations you've completed a basic installation of Oracle. BUT WE'RE NOT DONE! Now we need to install the patches and updates.

Install your patch/update media or if you've done a few installations like me you have them available on a convienent nfs share. cd into the patch/update location and run the installer (./runInstaller). Once the Welcome screen loads click 'Next' to continue:

Oracle patch screen 1.jpg

The next screen will ask you to verify the name and location of the installed version of Oracle. If you're satisfied click 'Next' to continue.

Oracle patch screen 2.jpg

Next you will see the Summary screen. This details what will be patched/updated. Click 'Install' to continue:

Oracle patch summary.jpg

The installation of the updates/patches will begin. You'll see it progress along towards 100%.

Oracle patch install.jpg

As the update progresses near 100% a window will pop up requesting you to run a script as root:

Open up an other SSH windows or terminal window as root or become root (su -).
Run the scripts -- you'll be prompted to answer a few questions.  The defaults are fine.  Since this an update you may already have the correct values and you can choose 'n' to not over write you're current values.

Oracle patch RunAsRoot term screen.jpg

Return to the window and click "OK" to continue 

Oracle patch RunAsRoot.jpg

You will now see the "End of Installation' screen. Click 'Exit' to finish. A window will pop-up asking you to confirm you're done, click 'Yes' to REALLY finish.

Oracle patch finsh.jpg

Oracle really done YN.jpg

Now we need to apply some one-off patches. Ensure that all Oracle software is shutdown.

First, apply the patch for the wrong_schema_bug:

change directory to the directory where the patch is located:
% cd 5458753
Apply the patch:

% /opt/oracle/product/10.2.0/OPatch/opatch apply

When asked if you want to proceed, enter Y

Next, apply the patch for the DST changes:

change directory to the directory where the patch is located:
% cd 5632264
Apply the patch:

% /opt/oracle/product/10.2.0/OPatch/opatch apply

When asked if you want to proceed, enter Y

And last, apply the patch for the JVM_DST changes:

change directory to the directory where the patch is located:
% cd 5458753

Follow the instructions in the README.txt file.

This completes the Oracle install.

Note: It is strongly suggested to add Oracle to the startup script.

Next step

Now we are ready to move on to the Database Schemas setup. For information on how to setup an initial schema, see:

Personal tools