Professional Documents
Culture Documents
Task List:
Pre-Installation Task:
Installing Required rpm (Packages)
Memory and Swap Space
Kernel Parameter
Creating oracle User account
Setting Shell limits for the oracle user
Creating Oracle Software Directories
Setting up oracle User account
Obtaining Oracle 10g 32-bit Software for Redhat Linux x86
Installation Task:
Installing Oracle 10g Software
Post-Installation Task:
Creating Backup of the root.sh
Updating .bash_profile
Creating database Using following Storage Options
Automatic Storage Management (ASM) Option
RawDevice Option
File System Option
Configuring new or Upgraded database
Pre-Installation Task
NOTE: Installing Oracle 10g on RedHat EL4 works same way as that of on Cent OS 4.
Installing Oracle 10g on RedHat EL3 works same way as that of on Cent OS 3.
Installing CentOS:
If you do not have CentOS installed on your pc, goto www.centos.org and download the appropriate isos. You can use below
command to copy iso file on the CD from Linux command line I use scanbus option of cdrecord utility to locate the device id
which is used to write data on.
Packages:
Before you start installing Oracle10g software, please make sure that you have the below packages installed on your Linux box,
else you will get error(s) during the installation process.
glibc-2.3.4-2.13
glibc-common-2.3.4-2.13
gcc-3.4.4-2
gcc-c++-3.4.4-2
libstdc++-3.4.4-2
libstdc++-devel-3.4.4-2
libaio-0.3.103-3
binutils-2.15.92.0.2-15
make-3.80-5
compat-db-4.1.25-9
gnome-libs-1.4.1.2.90-44.1
pdksh-5.2.14-30.3
sysstat-5.0.5-1
Please execute the below comand as root to make sure that you have this rpms installed. If not installed, then download them
from appropriate linux site.
Oracle Documents says that you need at least 512MB of memory and 1024MB of swap space (Double the size of memory if you
have
RAM larger than 2 gigs) to run Oracle (9i and above) Database on Linux. Well, I have managed to successfully run one 9i and 2
10g instances (one ASM and one regular) simultaneously on a single linux box with 512 MB of memory. You simply need to adjust
the init.ora memory parameter for that.
[root@shree ~]# cat /proc/meminfo | grep Total
MemTotal: 515768 kB
HighTotal: 0 kB
LowTotal: 515768 kB
SwapTotal: 4192956 kB
VmallocTotal: 499704 kB
If you do not have enough Swap Space, you can add extra temporary swap space.
[root@shree ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda5 40662492 5226432 33370508 14% /
none 257884 0 257884 0% /dev/shm
/dev/hdb1 9621848 3341000 5792072 37% /backup
[root@shree ~]# mkdir /swap
[root@shree ~]# cd /swap
[root@shree swap]# dd if=/dev/zero of=extraSwapbs=1024 count=128000
128000+0 records in
128000+0 records out
[root@shree swap]# chmod 600 extraSwap
[root@shree swap]# ls -l extr*
-rw------- 1 root root 131072000 Nov 28 14:16 extraSwap
[root@shree swap]# mkswapextraSwap
Setting up swapspace version 1, size = 131067 kB
[root@shree swap]# swaponextraSwap
[root@shree swap]# swapoffextraSwap
Kernel Parameters:
Oracle recommends that you set shared memory segment attributes as well as semaphores to the following
values.
If not set, database instance creation will fail. I added the following lines to /etc/sysctl.conf file. Every OS process
needs
semaphore where It waits on for the resources. For more on semaphore, please read the UNIX os documents.
NOTE: If the current value for any parameter is higher than the value listed in this table, then do not change
the value of that parameter.
To see the current setting in the kernel, please use the below command.
/sbin/sysctl -a | grepsem -- for semmsl, semmns, semopm, semmni
/sbin/sysctl -a | grepshm -- for shmall, shmmax, shmmni
/sbin/sysctl -a | grep file-max
/sbin/sysctl -a | grep ip_local_port_range
/sbin/sysctl -a | greprmem_default
Please add/change the appropriate variables value in the /etc/sysctl.conf file as shown below.
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
kernel.shmmax = 2147483648
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_max = 262144
After adding these lines to /etc/sysctl.conf, please run the below command as root to make them enabled.
[root@shree ~]# sysctl -p
You need OS “oracle” user account created which owns the Oracle software. Oracle Software installation
needs to be proceeds by this account. Oracle software installation (without Companion CD) requires 2.5 GB
of free space available for the ORACLE_BASE directory. Please make sure that the mount point where you
plan to install Software has required free space available. You can use “df –k” to check this out.
[root@shree ~]# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda5 40662492 5345128 33251812 14% /
none 257884 0 257884 0% /dev/shm
/dev/hdb1 9621848 3344928 5788144 37% /backup
I had about 33GB of free space available on “/” mount point. So I decided to install Oracle under this
mount point.
groupadd dba
groupaddoinstall
useradd -g oinstall -G dba oracle
passwd oracle
You do not need oinstall group if you are not installing on the production server or you (or your team) are the
only person responsible for future installations/upgrades of Oracle Software.
To improve the performance of the software on Linux systems, you must increase the following shell limits
for the oracle user:
Add or edit the following line in the /etc/pam.d/login file, if it does not already exist:
For the Bourne, Bash, or Korn shell, add the following lines to the /etc/profile:
If you have more than one Oracle software installed on the machine, then you might want to create .bash_profile
for each oracle home. For e.g, I have two oracle software installed on my machine. I have created .bash_profile9i
for my 9i server and .bash_profile10g for my 10g server. I leave .bash_profile to its default. If you are going to
install Only 10g, then no need to create extra .bash_profiles.
Add the below lines into the .bash_profile file. DO NOT include the ORACLE_HOME variable.
We will add it once the software is installed.
export ORACLE_BASE=/u01/app
export ORACEL_SID=db10
I used a CD media of 700MB capacity and 10g (10.2.0.1) was copied successfully.
[root@shree ~]# unzip /tmp/0201_database_linux32.zip
[root@shree ~]# mkisofs -r /tmp/databases | cdrecord -v dev=1,1,0 speed=20 -
If you are installing the software from disc, mount the first disc if it is not already mounted. Some platforms
automatically mount the disc when you insert the disc into the drive. Wherever you store software, you “cd” to that
directory.
Post-Installation Task
Oracle recommends that you back up the root.sh script after you complete an installation. If you install other
products
in the same Oracle home directory, then Oracle Universal Installer updates the contents of the
existing root.sh script
during the installation. If you require information contained in the original root.sh script, then you can recover it
from
the backed up root.sh file.
Updating .bash_profile:
Now .bash_profile needs to be updated with the value of ORACLE_HOME, path and LD_LIBRARY_PATH.
export ORACLE_HOME=$ORACLE_BASE/oracle/product/10.2.0/db_1
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
File system
Automatic Storage Management (ASM)
Raw devices
NOTE: Database files are supported on file systems, Automatic Storage Management, and raw devices.
Recovery
files are supported only on file systems and Automatic Storage Management.
Run the below command as oracle user and follow the mentioned steps
Main Screen: