First of all we will remove the existing oracle in our machine.For this we will run the following commands listed with their purposes:
Issue following commands by oracle user:
echo $ORACLE_BASE can be done to be sure for the value of $ORACLE_BASE.
# rm -rf $ORACLE_BASE/* #<--- Removes Entire Oracle Software Directory following commands can be removed by oracle/root user
# rm -f /etc/oraInst.loc #<--- Removes Install Loc # rm -f /etc/oratab #<--- Removes OraTab used by dbstart and dbshut scripts # rm -f /usr/local/bin/dbhome #<--- Removes Database Home Identifier Script # rm -f /usr/local/bin/oraenv #<--- Removes Env Script used by Bourne, Bash, or Korn shell # rm -f /usr/local/bin/coraenv #<--- Removes Env Script used by C shell-->
Install Oracle
Now we will install the oracle application in our machine.
--------------------------------------------------------
Steps to Install Oracle 10g Release 2 (10.2.0.1) on Red Hat Linux:
Download the 64-bit installation file 10201_database_linux_x86_64.cpio and place it in specific drive (/u01/d2dba)
Unpack the contents of the file:
cpio -idmv < 10201_database_linux_x86_64.cpio Kernel parameter Setup
Add the following lines to the /etc/sysctl.conf file:
kernel.shmall = 4101757
kernel.shmmax = 16800796672
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
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.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144
Run the following command to change the current kernel parameters:
? /sbin/sysctl p
Add the following lines to the /etc/security/limits.conf file:
* soft nproc 2047
* hard nproc 16384
* soft nofile 2048
* hard nofile 65536
Add the following line to the /etc/pam.d/login file, if it does not already exist:
session required /lib/security/pam_limits.so
Install the following packages, if necessary:
? # From RedHat AS3 Disk 2
? cd /mnt/cdrom/RedHat/RPMS
? rpm -Uvh setarch-1.3-1.i386.rpm
? rpm -Uvh sysstat-4.0.7-4.EL3.3.i386.rpm
?
? # From RedHat AS3 Disk 3
? cd /mnt/cdrom/RedHat/RPMS
? rpm -Uvh openmotif21-2.1.30-8.i386.rpm
? rpm -Uvh ORBit-0.5.17-10.4.i386.rpm
? rpm -Uvh libpng10-1.0.13-15.i386.rpm
? rpm -Uvh gnome-libs-1.4.1.2.90-34.1.i386.rpm
? rpm -Uvh compat-glibc-7.x-2.2.4.32.6.i386.rpm \
? compat-gcc-7.3-2.96.128.i386.rpm \
? compat-gcc-c++-7.3-2.96.128.i386.rpm \
? compat-libstdc++-7.3-2.96.128.i386.rpm \
? compat-libstdc++-devel-7.3-2.96.128.i386.rpm
RPMs can be chzecked by :
rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n'
binutils compat-db control-center gcc gcc-c++ glibc glibc-common gnome-libs libstdc++ libstdc++-devel
make pdksh sysstat xscreensaver libaio libaio-devel
Create the new groups and users:
groupadd oinstall
groupadd dba
groupadd oper
useradd -g oinstall -G dba -s /bin/ksh oracle
passwd oracle
chown oracle:oinstall /home/oracle -R
yum install libXp
Create the directories in which the Oracle software will be installed:
mkdir -p /u01/app/oracle/product/j2ee_10_1_2
chown -R oracle.oinstall /u01
Login as root and issue the following command:
xhost +
/*
[oracle@host database]$ export DISPLAY=192.168.112.36:0.0
[oracle@host database]$ xhost +
xhost: unable to open display "192.168.112.36:0.0"
[oracle@host database]$ export DISPLAY=192.168.112.36:2.0 (if :2)
[oracle@host database]$ xhost +
access control disabled, clients can connect from any host
*/
Edit .bash_profile as:
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
#PATH=$PATH:/usr/sbin:$PATH; export PATH
#PATH=$ORACLE_HOME/bin:$PATH; export PATH
#ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
#ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
#PATH=$ORACLE_HOME/bin:$PATH; export PATH
#LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
export ORACLE_SID=orcl
PATH=$PATH:$HOME/bin
ORACLE_BASE=/u01/app/oracle
export ORACLE_BASE
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
unset USERNAME
#export PATH
#unset USERNAME
Log into the oracle user. If you are using X emulation then set the DISPLAY environmental variable:
DISPLAY=
Start the Oracle Universal Installer (OUI) by issuing the following command in the Disk1 directory:
./runInstaller
Steps to upgrade Oracle 10.2.0.X to 10.2.0.4:
Download the oracle patch of 64-bit and uncompress it:
unzip p6810189_10204_Linux-x86-64.zip
Stop all the current oracle services issuing following commands:
o emctl stop dbconsole
o $ isqlplusctl stop
o $ lsnrctl stop
Shutdown the oracle instance:
o Shutdown immediate
Now to enable X applications, run the following command on the machine that you want to use to display Oracle Universal Installer:
o $ xhost +
Go to the directory of Disk1 to locate runInstaller and issue following command to execute it:
o ./runInstaller
Follow the windows installation procedure of installation (OUI)
Run $ORACLE_HOME/root.sh as root after completion
? Supply the bin parameter when prompted
On the End of Installation screen, click Exit, then click Yes to exit from Oracle Universal Installer
Start the listener
Enter the following command from the command prompt:
dbua
Follow the database Upgrade Assistance Windows instruction for upgrade to version 10.2.0.4.
run $ORACLE_HOME/install/changePerm.sh
System Parameters to be configured
alter system set filesystemio_options="asynch" scope=spfile;
alter system set db_file_multiblock_read_count=128 scope=spfile;
alter system set sga_max_size=19G scope=spfile;
alter system set sga_target=19G scope=spfile;
alter system set pga_aggregate_target=10G scope=spfile;
alter system set "_gby_hash_aggregation_enabled"=false;
--------------------------------------------------------
No comments:
Post a Comment