C. Preparing Environment
1. Edit /etc/hosts file and put the host name and fully qualified domain name with ip address
[root@oracle11gr2 ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:0F:C5:C1
inet addr:192.168.72.198 Bcast:192.168.72.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe0f:c5c1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:807 errors:0 dropped:0 overruns:0 frame:0
TX packets:250 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:63039 (61.5 KiB) TX bytes:37827 (36.9 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:52 errors:0 dropped:0 overruns:0 frame:0
TX packets:52 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3956 (3.8 KiB) TX bytes:3956 (3.8 KiB)
[root@oracle11gr2 ~]# hostname
oracle11gr2.oracle.com
[root@oracle11gr2 ~]# vi /etc/hosts
[root@oracle11gr2 ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.72.198 oracle11gr2.oracle.com oracle11gr2
[root@oracle11gr2 ~]#
2. Disable the SELINUX
[root@oracle11gr2 ~]# vi /etc/selinux/config[root@oracle11gr2 ~]# cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
[root@oracle11gr2 ~]#
3. Verify the File System mount point.
[root@oracle11gr2 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 30G 4.4G 24G 16% /
tmpfs 2.0G 76K 2.0G 1% /dev/shm
/dev/sda1 59G 52M 56G 1% /oraarch
/dev/sda3 30G 44M 28G 1% /oradata1
/dev/sda5 30G 44M 28G 1% /oradata2
/dev/sda8 12G 30M 12G 1% /software
/dev/sda6 30G 44M 28G 1% /u01
/dev/sr0 3.7G 3.7G 0 100% /media/OL6.5 x86_64 Disc 1 20131125
[root@oracle11gr2 ~]#
4. Install the below RPM packages.
[root@oracle11gr2 ~]# cd "/media/OL6.5 x86_64 Disc 1 20131125/Packages"[root@oracle11gr2 Packages]# pwd
/media/OL6.5 x86_64 Disc 1 20131125/Packages
[root@oracle11gr2 Packages]#
rpm -Uvh binutils-2.* --nodeps
rpm -Uvh compat-libstdc++-33* --nodeps
rpm -Uvh compat-libstdc++-33* --nodeps
rpm -Uvh elfutils-libelf* --nodeps
rpm -Uvh glibc-2.* --nodeps
rpm -Uvh glibc-common-2.* --nodeps
rpm -ivh kernel-headers-2.6.* --nodeps
rpm -Uvh glibc-headers-2.* --nodeps
rpm -Uvh glibc-devel-2.* --nodeps
rpm -Uvh ksh* --nodeps
rpm -Uvh libaio-0.* --nodeps
rpm -Uvh libaio-devel-0.* --nodeps
rpm -Uvh libgomp-4.* --nodeps
rpm -Uvh libgcc-4.* --nodeps
rpm -Uvh libstdc++-4.* --nodeps
rpm -Uvh libstdc++-devel-4.* --nodeps
rpm -Uvh make-3.* --nodeps
rpm -Uvh gcc-4.* --nodeps
rpm -Uvh gcc-c++-4.* --nodeps
rpm -Uvh sysstat-7.* --nodeps
rpm -Uvh unixODBC-2.* --nodeps
rpm -Uvh unixODBC-devel-2.* --nodeps
rpm -Uvh numact* --nodeps
rpm -Uvh elfutils-libelf-0.137-3.el5.i386* --nodeps
rpm -Uvh elfutils-libelf-devel-0.137-3.el5.i386.rpm elfutils-libelf-devel-static-0.137-3.el5.i386.rpm
5. Linux group creation.
[root@oracle11gr2 ~]# groupadd oinstall[root@oracle11gr2 ~]# groupadd dba
[root@oracle11gr2 ~]# groupadd oper
[root@oracle11gr2 ~]#
[root@oracle11gr2 ~]# tail /etc/group
oinstall:x:500:
dba:x:501:
oper:x:502:
[root@oracle11gr2 ~]#
6. Linux user addition.
[root@oracle11gr2 ~]# useradd -g oinstall -G dba,oper oracle[root@oracle11gr2 ~]#
[root@oracle11gr2 ~]# passwd oracle
Changing password for user oracle.
New password:
BAD PASSWORD: it is based on a dictionary word
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully.
[root@oracle11gr2 ~]#
[root@oracle11gr2 ~]# tail /etc/passwd |grep oracle
oracle:x:500:500::/home/oracle:/bin/bash
[root@oracle11gr2 ~]#
7. Directory creation and change permission.
[root@oracle11gr2 ~]# mkdir -p /u01/app/oracle/product/11.2.0.4/db_1[root@oracle11gr2 ~]# chown -R oracle:oinstall /u01
[root@oracle11gr2 ~]# chmod -R 775 /u01
[root@oracle11gr2 ~]#
8. Make Directory and Give permission for Creation of Database objects.
[root@oracle11gr2 ~]# df -hFilesystem Size Used Avail Use% Mounted on
/dev/sda2 30G 4.3G 24G 16% /
tmpfs 2.0G 72K 2.0G 1% /dev/shm
/dev/sda1 59G 52M 56G 1% /oraarch
/dev/sda3 30G 44M 28G 1% /oradata1
/dev/sda5 30G 44M 28G 1% /oradata2
/dev/sda8 12G 4.9G 6.2G 45% /software
/dev/sda6 30G 4.3G 24G 16% /u01
[root@oracle11gr2 ~]# mkdir -p /oradata1/DB11G
[root@oracle11gr2 ~]# mkdir -p /oradata2/DB11G
[root@oracle11gr2 ~]# mkdir -p /oraarch/DB11G
[root@oracle11gr2 ~]# chown -R oracle:oinstall /oradata1/DB11G
[root@oracle11gr2 ~]# chown -R oracle:oinstall /oradata2/DB11G
[root@oracle11gr2 ~]# chown -R oracle:oinstall /oraarch/DB11G
[root@oracle11gr2 ~]# chmod -R 775 /oradata1/DB11G
[root@oracle11gr2 ~]# chmod -R 775 /oradata2/DB11G
[root@oracle11gr2 ~]# chmod -R 775 /oraarch/DB11G
[root@oracle11gr2 ~]#
9. Configure the ".bash_profile" for "oracle" user
[root@oracle11gr2 ~]# su - oracle[oracle@oracle11gr2 ~]$
[oracle@oracle11gr2 ~]$ vi .bash_profile
[oracle@oracle11gr2 ~]$ cat .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=oracle11gr2.oracle.com; export ORACLE_HOSTNAME
ORACLE_UNQNAME=DB11G; export ORACLE_UNQNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0.4/db_1; export ORACLE_HOME
ORACLE_SID=DB11G; 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
export NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"
[oracle@oracle11gr2 ~]$ . .bash_profile
[oracle@oracle11gr2 ~]$
No comments:
Post a Comment