Tuesday, May 18, 2010
How to install Oracle Enterprise Linux R5
In this demo VMware Fusion (for Windows VMware workstation),
Enterprise-R5-U5-Server-i386-dvd.iso, Oracle Database Grid Infrastructure, Oracle 11gR2 and ASMlibs will be used.
Oracle Linux 5r5
Close Settings screen and click on “Start Up” button.
Linux Installation will start now.
Select Skip
Welcome to Oracle Unbreakable Linux
Next:
Select language -> NEXT
Select keyboard -> NEXT
Warning -> YES (6x for each disk)
Mark “sda” disk 14331 MB as the only disk to be used during installation
Custom layout
Select "New"
Create boot partition, 100MB.
Select "New"
Create Swap partition 1GB (1024MB).
Select "New"
Create root partition from free space.
Click next.
Select default for GRUB.
Network device
On this screen we can choose hostname.
Where are you?
Enter root password (and forget it immediately ☺)
Select for “Software Development”
Click “Next” to begin installation.
Ok, reboot.
After reboot you are in the WELCOME screen, just follow the screen instructions.
This is test installation, therefore we do not need firewall
Firewall -> Disables + YES.
SELinux -> Disable + YES.
Date and time.
Create user, we could create user ‘oracle’ here, but I prefer to create users later.
The next step is the “Sound card” step and as the last step, Finish + one more reboot.
Next I recommend installing VMware Tools.
Log on as root
Select “Virtual Machine” -> “Install VMware Tools”
At this stage a new window appears with two files.
Start Terminal session “Applications -> Accessories -> Terminal”
Go to /tmp and execute the following commands:
• cd /tmp
• cp /media/VMware\ Tools/VMwareTools-8.2.4.232708.tar.gz .
** please notice “.” at end of command line and of course you can have other version of VMware tools file
• tar xzf VMwareTools_4.2.4.232708.tar.gz
• cd vmware_tools_distrib
• ./vmware-install.pl
• accept all defaults
Reboot the virtual machine.
Now you can use the shared folders inside the virtual machine. On my host machine I already have all software installations saved in a directory which I share with my virtual machine with the name “SOFTWARE”.
cd /mnt/hgfs/"the name of shared directory"
Anyway, we should continue with the Linux installation.
Connect Linux image to CD ROM and mount it:
1. Click on CD/DVD symbol on the bottom of screen and select “Choose Disk Image”
2. Click again on the same symbol and select “Connect CD/DVD”
Brows to your Linux iso file and select it.
Now click on the same CD/DVD symbol and select “Connect CD/DVD”
You should have the DVD mounted to your machine.
cd /media/Enerprise\ Linux\ DVD\ nnnnnn/Server
Install missing Linux packages.
rpm -Uvh elfutils-libelf-devel* glibc-devel-2* glibc-headers-2* gcc-4* libgomp-4* gcc-c++-4* libstdc++-devel-4* compat-libstdc++-33*
rpm -Uvh sysstat-* libaio-devel-* sysstat* unixODBC-* unixODBC-devel-*
To verify that ALL the required packages are installed on your system run the following command:
rpm -q compat-libstdc++-33 elfutils-libelf-devel glibc-devel-2.5 gcc gcc-c++ libaio-devel libstdc++-devel unixODBC unixODBC-devel sysstat binutils elfutils-libelf glibc glibc-common libaio libgcc libstdc++ make
Configuring Linux for Oracle
Now that the Linux software is installed, you need to configure it for Oracle.
Create Oracle groups and the user account.
Create Linux groups and user account that will be used to install and maintain the Oracle Database software. The user account name is “oracle”, and the group name is “dba”. Execute the following commands as root:
[root@oraasm-primary Server]# /usr/sbin/groupadd dba
[root@oraasm-primary Server]# /usr/sbin/useradd -m -g dba oracle
[root@oraasm-primary Server]# id oracle
uid=500(oracle) gid=500(dba) groups=500(dba)
[root@oraasm-primary Server]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
Create Directories
Issue the following commands as root to create directories to store Oracle software:
[root@oraasm-primary Server]# mkdir -p /data/app/oracle
[root@oraasm-primary Server]# chown -R oracle:dba /data/app
[root@oraasm-primary Server]# chmod -R 775 /data/app
Configuring the Linux Kernel Parameters
Oracle Database 11g requires the kernel parameter settings shown below. The values provided are minimum required values. If your system uses larger values, do not modify them here. Linux allows modification of most kernel parameters while the system is up and running therefore there is no need to reboot the system to change kernel parameters.
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=4194304
net.core.wmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_max=262144
Note that OEL 5 already has values defined for kernel.shmall and kernel.shmmax. Use the default values if the same or larger than the required values. Check file /etc/sysctl.conf.
In my case I only had to add the following lines:
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=4194304
net.core.wmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_max=262144
execute the following command as root:
cat >> /etc/sysctl.conf << EOF
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=4194304
net.core.wmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_max=262144
EOF
If you are following this document and have just installed Linux, the kernel parameters have the default values and you can just cut and paste the following commands while logged in as root:
/sbin/sysctl -p
Setting shell limits for the oracle user
Oracle recommends setting limits on the number of processes and open files for each Linux account . To make these changes, execute the following commands as root:
cat >> /etc/security/limits.conf << EOF
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF
cat >> /etc/pam.d/login << EOF
session required pam_limits.so
EOF
Change the default profile for bash and ksh and the default login script for cshell.
cat >> /etc/profile << EOF
if [ \$USER = "oracle" ]; then
if [ \$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
EOF
cat >> /etc/csh.login << EOF
if ( \$USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
umask 022
endif
EOF
next “How to install and configure ASM”
Labels:
Linux installatie on VMware