MRKAVANA (mrkavana@gmail.com) - www.facebook.com/kavanathai

Jul 18, 2011

How to install Oracle 10g from rpm in redhat enterprise linux rhel5

This document explains how to install the Oracle 10g database server on a redhat rhel5 linux
machine using rpm package. This steps will work in other redhat distros like Centos, Fedora etc.

System:
VMware VM
OS Redhat enterprise Linux 5.4
32 bit
IP: 192.168.0.56
RAM = 1700Mb
Host machine Dell inspiron 1545

Oracle software:
Oracle 10g
Version 10.2.0.1.0

Other Requirements:
Yum server

Installation:
Login as root user
login as: root
root@192.168.0.35's password:
Last login: Sat Nov 20 15:17:28 2010

Download the rpm from oracle.com:
[root@oracle /]# ls
bin dev home lost+found misc net oracle-xe-univ-10.2.0.1-1.0.i386.rpm root selinux sys tmp var boot etc lib media mnt opt proc sbin srv tftpboot usr

#Changing the version 5.4 to rhel4:
[root@oracle /]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 4 (Tikanga)installed #10g doesnt support rhel 5.4
[root@oracle /]#

Checking whether the dependencies are installed or not:
[root@oracle /]# rpm -r prm -q glibc libaio
libaio-0.3.106-3.2

Checking the swap space:
[root@oracle /]# swapon -s
FilenameTypeSizeUsedPriority
/dev/sda3 partition 23535120 -1

Checking the memory status:
[root@oracle /]# free -m
total used free shared buffers cached
Mem: 1685 654 1030 0 27 544
-/+ buffers/cache: 82 1602
Swap: 2298 0 2298

#Adding the kernel parameters to the sysctl.conf file:
[root@oracle /]# cat /etc/sysctl.conf

# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls IP packet forwarding
net.ipv4.ip_forward = 0
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0
# Controls whether core dumps will append the PID to the core filename
# Useful for debugging multi-threaded applications
kernel.core_uses_pid = 1
# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1
# Controls the maximum size of a message, in bytes
kernel.msgmnb = 65536
# Controls the default maxmimum size of a mesage queue
kernel.msgmax = 65536
# Controls the maximum shared segment size, in bytes
kernel.shmmax = 4294967295
# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 268435456

#Parameters for Oracle installation
kernel.sem = 250 32000 100 128
kernel.shmmax =536870912
kernel.shmmni =4096
kernel.shmall =2097152
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
[root@oracle /]#

Reloading and checking for errors:
[root@oracle /]#
[root@oracle /]# sysctl -p > /dev/null
[root@oracle /]#

Installing the oracle rpm:
[root@oracle /]# rpm -ivh oracle-xe-univ-10.2.0.1-1.0.i386.rpm
Preparing... [100%]
1:oracle-xe-univ [100%]
Executing Post-install steps...
You must run '/etc/init.d/oracle-xe configure' as the root user to
configure the database.


You will be prompted to run the following command for configuring oracle:
[root@oracle /]# /etc/init.d/oracle-xe configure

Oracle Database 10g Express Edition Configuration
-------------------------------------------------
This will configure on-boot properties of Oracle Database 10g Express
Edition. The following questions will determine whether the database should
be starting upon system boot, the ports it will use, and the passwords that
will be used for database accounts. Press to accept the defaults.
Ctrl-C will abort.

Specify the HTTP port that will be used for Oracle Application Express [8080]: #Hit enter

Specify a port that will be used for the database listener [1521]: #Hit enter
Specify a password to be used for database accounts. Note that the same
password will be used for SYS and SYSTEM. Oracle recommends the use of
different passwords for each database account. This can be done after
initial configuration: #Give a password
Confirm the password: #Retype it

Do you want Oracle Database 10g Express Edition to be started on boot (y/n) [y]:y or #Hit enter

Starting Oracle Net Listener...Done
Configuring Database...Done
Starting Oracle Database 10g Express Edition Instance...Done
Installation Completed Successfully.
To access the Database Home Page go to "http://127.0.0.1:8080/apex"
[root@oracle /]#

[root@oracle /]# cd /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/

Run the following script for setting environment variables:
[root@oracle bin]# . oracle_env.sh
[root@oracle bin]# echo $?
0

Add the script in profile file for environment variables for oracle [To survive reboots]:
[root@oracle bin]# cat >> /etc/profile
. /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh

And source it to make effect:
[root@oracle bin]# . source /etc/profile
[root@oracle bin]# cat /etc/profile
# /etc/profile
# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc
pathmunge () {
if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
if [ "$2" = "after" ] ; then
PATH=$PATH:$1

else
PATH=$1:$PATH
fi
fi
}
# ksh workaround
if [ -z "$EUID" -a -x /usr/bin/id ]; then
EUID=`id -u`
UID=`id -ru`
fi
# Path manipulation
if [ "$EUID" = "0" ]; then
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
fi
# No core files by default
ulimit -S -c 0 > /dev/null 2>&1
if [ -x /usr/bin/id ]; then
USER="`id -un`"
LOGNAME=$USER
MAIL="/var/spool/mail/$USER"
fi
HOSTNAME=`/bin/hostname`
HISTSIZE=1000
if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
INPUTRC=/etc/inputrc
fi
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC
for i in /etc/profile.d/*.sh ; do
if [ -r "$i" ]; then
if [ "$PS1" ]; then
. $i
else
. $i >/dev/null 2>&1
fi
fi
done
unset i
unset pathmunge
. /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh
[root@oracle bin]#

Checking oracle from Command line:
[root@oracle bin]# sqlplus system

SQL*Plus: Release 10.2.0.1.0 - Production on Sat Nov 20 16:58:56 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production

SQL> exit
Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
[root@oracle bin]# cd

Checking the user list:
SQL> select * from all_users;

USERNAME USER_ID CREATED
------------------------------ ---------- ------------------
FLOWS_020100 35 31-JAN-06
FLOWS_FILES 34 31-JAN-06
HR 33 31-JAN-06
MDSYS 32 31-JAN-06
ANONYMOUS 28 31-JAN-06
XDB 27 31-JAN-06
CTXSYS 25 31-JAN-06
DBSNMP 23 31-JAN-06
TSMSYS 20 31-JAN-06
DIP 18 31-JAN-06
OUTLN 11 31-JAN-06

USERNAME USER_ID CREATED
------------------------------ ---------- ------------------
SYSTEM5 31-JAN-06
SYS0 31-JAN-06

13 rows selected.

Listing the DBA users:
SQL> select username from dba_users;

USERNAME
------------------------------
TSMSYS
XDB
HR
FLOWS_020100
DBSNMP
DIP
OUTLN
CTXSYS
MDSYS
FLOWS_FILES
SYSTEM

USERNAME
------------------------------
SYS
ANONYMOUS
13 rows selected

Licence:
.

Login:
Databse:


Http Access:



No comments:

Post a Comment