Perform a Generic OEL 5.4 installation
prepare the os as with rpm and kernal settings
as follows
General Cd/DVD mount
mkdir /media/cdrom
mount -t iso9660 -o ro /dev/cdrom /media/cdrom
cd /media/cdrom/Server
Specific mount
cd /media/Enterprise\ Linux\ dvd\ 20090908/Server/
# rpm -ivh libaio-devel*rpm
warning: libaio-devel-0.3.106-3.2.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing... ########################################### [100%]
1:libaio-devel ########################################### [ 50%]
2:libaio-devel ########################################### [100%]
[root@host5 Server]# rpm -ivh unixODBC-2*rpm unixODBC-devel-2*rpm
warning: unixODBC-2.2.11-7.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing...
########################################### [100%]
1:unixODBC ########################################### [ 25%]
2:unixODBC ########################################### [ 50%]
3:unixODBC-devel ########################################### [ 75%]
4:unixODBC-devel ########################################### [100%]
As root, open a terminal window and perform these steps:
Edit /etc/hosts. The file should contain text similar to the following:
vi /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
192.168.100.58 host5.localdomain host5
Configure the kernel.
vi /etc/sysctl.conf
Add the following to the file:
# Kernel paramaters required by Oracle 11gR1
fs.file-max = 6553600
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144
For the /etc/sysctl.conf changes to take effect now issue this command.
sysctl -p
vi /etc/security/limits.conf
Add these lines:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
vi /etc/pam.d/login
Add these lines:
session required /lib/security/pam_limits.so
session required pam_limits.so
vi /etc/profile
Add these lines:
if [ \$USER = "oracle" ] || [ \$USER = "grid" ]; then
if [ \$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
Create Groups and User for Grid Infrastructure
Lets start this section by creating the recommended OS groups and user for Grid Infrastructure on both Oracle RAC nodes:
[root@racnode1 ~]#
groupadd -g 1000 oinstall
groupadd -g 1200 asmadmin
groupadd -g 1201 asmdba
groupadd -g 1202 asmoper
groupadd -g 1300 dba
useradd -m -u 1100 -g oinstall -G asmadmin,asmdba,asmoper,dba -d /home/grid -s /bin/bash -c "Grid Infrastructure Owner" grid
id grid
uid=1100(grid) gid=1000(oinstall) groups=1000(oinstall),1200(asmadmin),1201(asmdba),1202(asmoper)
Set the password for the grid account:
[root@racnode1 ~]#
passwd grid
Changing password for user grid.
New UNIX password:
xxxxxxxxxxx
Retype new UNIX password:
xxxxxxxxxxx
passwd: all authentication tokens updated successfully.
[grid@host5 ~]$ vi .bash_profile
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=host5.localdomain; export ORACLE_HOSTNAME
ORACLE_BASE=/u01/app/grid; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/grid; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
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/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
if [ \$USER = "oracle" ] || [ \$USER = "grid" ]; then
if [ \$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
Create Groups and User for Oracle Database Software
Next, create the the recommended OS groups and user for the Oracle database software
[root@racnode1 ~]#
groupadd -g 1301 oper
useradd -m -u 1101 -g oinstall -G dba,oper,asmdba -d /home/oracle -s /bin/bash -c "Oracle Software Owner" oracle
[root@racnode1 ~]#
id oracle
uid=1101(oracle) gid=1000(oinstall) groups=1000(oinstall),1201(asmdba),1300(dba),1301(oper)
[root@host5 Server]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@host5 Server]#
[root@host5 Server]# su - oracle
[oracle@host5 ~]$ vi .bash_profile
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=host5.localdomain; export ORACLE_HOSTNAME
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
ORACLE_TERM=xterm; export ORACLE_TERM
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/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
if [ \$USER = "oracle" ] || [ \$USER = "grid" ]; then
if [ \$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
Create the Oracle Base Directory Path
The final step is to configure an Oracle base path compliant with an Optimal Flexible Architecture (OFA) structure and correct permissions. This will need to be performed on both Oracle RAC nodes in the cluster as root.
This guide assumes that the /u01 directory is being created in the root file system. Please note that this is being done for the sake of brevity and is not recommended as a general practice. Normally, the /u01 directory would be provisioned as a separate file system with either hardware or software mirroring configured.
[root@racnode1 ~]#
mkdir -p /u01/app/grid
[root@racnode1 ~]#
mkdir -p /u01/app/11.2.0/grid
[root@racnode1 ~]#
chown -R grid:oinstall /u01
[root@racnode1 ~]#
mkdir -p /u01/app/oracle
[root@racnode1 ~]#
chown oracle:oinstall /u01/app/oracle
[root@racnode1 ~]#
chmod -R 775 /u01
prepare the os as with rpm and kernal settings
as follows
General Cd/DVD mount
mkdir /media/cdrom
mount -t iso9660 -o ro /dev/cdrom /media/cdrom
cd /media/cdrom/Server
Specific mount
cd /media/Enterprise\ Linux\ dvd\ 20090908/Server/
# rpm -ivh libaio-devel*rpm
warning: libaio-devel-0.3.106-3.2.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing... ########################################### [100%]
1:libaio-devel ########################################### [ 50%]
2:libaio-devel ########################################### [100%]
[root@host5 Server]# rpm -ivh unixODBC-2*rpm unixODBC-devel-2*rpm
warning: unixODBC-2.2.11-7.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing...
########################################### [100%]
1:unixODBC ########################################### [ 25%]
2:unixODBC ########################################### [ 50%]
3:unixODBC-devel ########################################### [ 75%]
4:unixODBC-devel ########################################### [100%]
As root, open a terminal window and perform these steps:
Edit /etc/hosts. The file should contain text similar to the following:
vi /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
192.168.100.58 host5.localdomain host5
Configure the kernel.
vi /etc/sysctl.conf
Add the following to the file:
# Kernel paramaters required by Oracle 11gR1
fs.file-max = 6553600
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144
For the /etc/sysctl.conf changes to take effect now issue this command.
sysctl -p
vi /etc/security/limits.conf
Add these lines:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
vi /etc/pam.d/login
Add these lines:
session required /lib/security/pam_limits.so
session required pam_limits.so
vi /etc/profile
Add these lines:
if [ \$USER = "oracle" ] || [ \$USER = "grid" ]; then
if [ \$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
Create Groups and User for Grid Infrastructure
Lets start this section by creating the recommended OS groups and user for Grid Infrastructure on both Oracle RAC nodes:
[root@racnode1 ~]#
groupadd -g 1000 oinstall
groupadd -g 1200 asmadmin
groupadd -g 1201 asmdba
groupadd -g 1202 asmoper
groupadd -g 1300 dba
useradd -m -u 1100 -g oinstall -G asmadmin,asmdba,asmoper,dba -d /home/grid -s /bin/bash -c "Grid Infrastructure Owner" grid
id grid
uid=1100(grid) gid=1000(oinstall) groups=1000(oinstall),1200(asmadmin),1201(asmdba),1202(asmoper)
Set the password for the grid account:
[root@racnode1 ~]#
passwd grid
Changing password for user grid.
New UNIX password:
xxxxxxxxxxx
Retype new UNIX password:
xxxxxxxxxxx
passwd: all authentication tokens updated successfully.
[grid@host5 ~]$ vi .bash_profile
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=host5.localdomain; export ORACLE_HOSTNAME
ORACLE_BASE=/u01/app/grid; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/grid; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
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/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
if [ \$USER = "oracle" ] || [ \$USER = "grid" ]; then
if [ \$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
Create Groups and User for Oracle Database Software
Next, create the the recommended OS groups and user for the Oracle database software
[root@racnode1 ~]#
groupadd -g 1301 oper
useradd -m -u 1101 -g oinstall -G dba,oper,asmdba -d /home/oracle -s /bin/bash -c "Oracle Software Owner" oracle
[root@racnode1 ~]#
id oracle
uid=1101(oracle) gid=1000(oinstall) groups=1000(oinstall),1201(asmdba),1300(dba),1301(oper)
[root@host5 Server]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@host5 Server]#
[root@host5 Server]# su - oracle
[oracle@host5 ~]$ vi .bash_profile
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=host5.localdomain; export ORACLE_HOSTNAME
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
ORACLE_TERM=xterm; export ORACLE_TERM
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/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
if [ \$USER = "oracle" ] || [ \$USER = "grid" ]; then
if [ \$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
Create the Oracle Base Directory Path
The final step is to configure an Oracle base path compliant with an Optimal Flexible Architecture (OFA) structure and correct permissions. This will need to be performed on both Oracle RAC nodes in the cluster as root.
This guide assumes that the /u01 directory is being created in the root file system. Please note that this is being done for the sake of brevity and is not recommended as a general practice. Normally, the /u01 directory would be provisioned as a separate file system with either hardware or software mirroring configured.
[root@racnode1 ~]#
mkdir -p /u01/app/grid
[root@racnode1 ~]#
mkdir -p /u01/app/11.2.0/grid
[root@racnode1 ~]#
chown -R grid:oinstall /u01
[root@racnode1 ~]#
mkdir -p /u01/app/oracle
[root@racnode1 ~]#
chown oracle:oinstall /u01/app/oracle
[root@racnode1 ~]#
chmod -R 775 /u01
No comments:
Post a Comment