Install Oracle 11g On RHEL 6.5 Using Local Dump
Step 1 Include following package groups during installation of linux.
Base System > Base
Base System > Client management tools
Base System > Compatibility libraries
Base System > Hardware monitoring utilities
Base System > Large Systems Performance
Base System > Network file system client
Base System > Performance Tools
Base System > Perl Support
Servers > Server Platform
Servers > System administration tools
Desktops > Desktop
Desktops > Desktop Platform
Desktops > Fonts
Desktops > General Purpose Desktop
Desktops > Graphical Administration Tools
Desktops > Input Methods
Desktops > X Window System
Development > Additional Development
Development > Development Tools
Applications > Internet Browser
Step 2 Download Software
Download Oracle 11gR2 and Unzip Files in one Directory. You should get one directory named “database”
Step 3 Hosts File
Verify and Ensure you have a Network Interface Card with Static IP Address is configured properly.
#ifconfig
Verify that the eth0 has a static IP Address. If not, use following set of commands to configure and verify.
#system-config-network-tui
Use 10.0.2.15 as the IP Address (For Example)
#service network restart
#service NetworkManager restart
#ifconfig
#ping 10.0.2.15
The “/etc/hosts” file must contain a fully qualified name for the server.
127.0.0.1 localhost.localdomain localhost
10.0.2.15 oracle.example.com oracle
Step 4 Set Kernel Parameters
Oracle recommend the following minimum parameter settings.
fs.suid_dumpable = 1
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
The current values can be tested using the following command /sbin/sysctl -a | grep <param-name>
Step 5 Add or amend the following lines in the “/etc/sysctl.conf” file.
cat>>/etc/sysctl.conf<<EOF
fs.suid_dumpable = 1
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=4194304
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048586
EOF
Run the following command to change the current kernel parameters.
/sbin/sysctl -p
Step 6 Add the following lines to the “/etc/security/limits.conf” file.
cat>>/etc/security/limits.conf<<EOF
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 4096
oracle hard nofile 65536
oracle soft stack 10240
EOF
Step 7 Disable secure linux by editing the “/etc/selinux/config” file, making sure the SELINUX flag is set as follows.
SELINUX=disabled
Once the change is complete, restart the server.
Step 8 Install the following packages if they are not already present.
# From Oracle Linux 6.5 DVD
cd /media/cdrom/Server/Packages
yum -y install binutils-2*x86_64*
yum -y install glibc-2*x86_64* nss-softokn-freebl-3*x86_64*
yum -y install glibc-2*i686* nss-softokn-freebl-3*i686*
yum -y install compat-libstdc++-33*x86_64*
yum -y install glibc-common-2*x86_64*
yum -y install glibc-devel-2*x86_64*
yum -y install glibc-devel-2*i686*
yum -y install glibc-headers-2*x86_64*
yum -y install elfutils-libelf-0*x86_64*
yum -y install elfutils-libelf-devel-0*x86_64*
yum -y install gcc-4*x86_64*
yum -y install gcc-c++-4*x86_64*
yum -y install ksh-*x86_64*
yum -y install libaio-0*x86_64*
yum -y install libaio-devel-0*x86_64*
yum -y install libaio-0*i686*
yum -y install libaio-devel-0*i686*
yum -y install libgcc-4*x86_64*
yum -y install libgcc-4*i686*
yum -y install libstdc++-4*x86_64*
yum -y install libstdc++-4*i686*
yum -y install libstdc++-devel-4*x86_64*
yum -y install make-3.81*x86_64*
yum -y install numactl-devel-2*x86_64*
yum -y install sysstat-9*x86_64*
yum -y install compat-libstdc++-33*i686*
yum -y install compat-libcap*
cd /
eject
Note. This will install all the necessary packages for 11.2.0.1. From 11.2.0.2 onwards many of these are unnecessary, but having them present does not cause a problem.
Step 8 Create the new groups and users.
/usr/sbin/groupadd -g 501 oinstall
/usr/sbin/groupadd -g 502 dba
/usr/sbin/groupadd -g 503 oper
/usr/sbin/groupadd -g 504 asmadmin
/usr/sbin/groupadd -g 506 asmdba
/usr/sbin/groupadd -g 505 asmoper
/usr/sbin/useradd -u 502 -g oinstall -G dba,asmdba,oper oracle
/usr/sbin/passwd oracle
Step 9 Create the directories in which the Oracle software will be installed.
mkdir -p /u01/app/oracle/product/11.2.0/dbhome_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01
Step 10 Login as root and issue the following command.
xhost +<machine-name>
Step 11 Login as the oracle user and add the following lines at the end of the “.bash_profile” file.
cat>>/home/oracle/.bash_profile<<EOF
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=oracle.example.com; export ORACLE_HOSTNAME
ORACLE_UNQNAME=orcl; export ORACLE_UNQNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
Step 12 Log into the oracle user. If you are using X emulation then set the DISPLAY environmental variable.
DISPLAY=<machine-name>:0.0; export DISPLAY
Start the Oracle Universal Installer (OUI) by issuing the following command in the database directory.
./runInstaller
Step 13 Post Installation : Edit the “/etc/oratab” file setting the restart flag for each instance to ‘Y’.
cat>>/etc/oratab<<EOF
ORCL:/u01/app/oracle/product/11.2.0/dbhome_1:Y
EOF
Next, create a file called “/etc/init.d/oracledb” as the root user, containing the following.
#!/bin/sh
# chkconfig: 35 99 10
# description: Oracle auto start-stop script.
#
# Set ORA_HOME to be equivalent to the $ORACLE_HOME
# from which you wish to execute dbstart and dbshut;
#
# Set ORA_OWNER to the user id of the owner of the
# Oracle database in ORA_HOME.
ORA_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
ORA_OWNER=oracle
if [ ! -f $ORA_HOME/bin/dbstart ] then
echo “Oracle startup: cannot start”
exit
fi
case “$1″ in
‘start’)
# Start the Oracle databases:
# The following command assumes that the oracle login
# will not prompt the user for any values
su – $ORA_OWNER -c “$ORA_HOME/bin/dbstart $ORA_HOME”
su – $ORA_OWNER -c “emctl start dbconsole”
touch /var/lock/subsys/oracledb
;;
‘stop’)
# Stop the Oracle databases:
# The following command assumes that the oracle login
# will not prompt the user for any values
su – $ORA_OWNER -c “$ORA_HOME/bin/dbshut $ORA_HOME”
su – $ORA_OWNER -c “emctl stop dbconsole”
rm -f /var/lock/subsys/oracledb
;;
esac
Use the chmod command to set the privileges to 750.
chmod 750 /etc/init.d/oracledb
Associate the oracledb service with the appropriate run levels and set it to auto-start using the following command.
chkconfig –add oracledb
---To Increase the size of swap
[root@localhost ~]# dd if=/dev/zero of=/myswapfile bs=1024M count=4
4+0 records in
4+0 records out
4294967296 bytes (4.3 GB) copied, 6.77915 s, 634 MB/s
[root@localhost ~]# mkswap /myswapfile
Setting up swapspace version 1, size = 4194300 KiB
no label, UUID=9c07ed67-c3d7-48ef-a4a3-9f65794d4d59
[root@localhost ~]# chmod 600 /myswapfile
[root@localhost ~]# swapon /myswapfile
swapon: /myswapfile: swapon failed: Device or resource busy
[root@localhost ~]# vi /etc/fstab
add entry in above file
/myswapfile swap swap defaults 0 0
Monday, 8 June 2020
Install Oracle 11g On RHEL 6.5 Using Local Dump
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment