Antes de instalar Oracle debemos realizar una serie de pasos previos, como creación de cuentas de usuario, grupos, cambios de parámetros del kernel. Se utilizará la documentación oficial de Oracle disponible en el sitio web de Oracle.
Para ello los pasos a seguir son:
1. Creación de cuentas de usuario para Oracle. Para ello con el usuario root debemos ejecutar lo siguiente:
# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba
# /usr/sbin/groupadd asmadmin
# /usr/sbin/groupadd asmdba
# /usr/sbin/useradd -g oinstall -G dba,asmdba oracle
# /usr/sbin/useradd -g oinstall -G asmadmin grid
Colocar una clave al usuario oracle y grid
# 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.
# 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.
# passwd grid
Changing password for user grid.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
Changing password for user grid.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
2. Creación de directorios para la instalación:
# mkdir -p /u01/app/grid
# mkdir -p /u01/app/11.2.0/grid
# chown -R grid:oinstall /u01
# mkdir -p /u01/app/oracle
# chown -R oracle:oinstall /u01/app/oracle
# chmod -R 775 /u01
3. Editar perfil de los usuarios oracle y grid:
3.1 Para el usuario oracle:
#su - oracle
$echo umask 022 >> $HOME/.bash_profile
$echo ORACLE_BASE=/u01/app/oracle >> $HOME/.bash_profile
$echo export ORACLE_BASE >> $HOME/.bash_profile
3.2 Para el usuario grid:
#su - grid
$echo umask 022 >> $HOME/.bash_profile
$echo ORACLE_BASE=/u01/app/grid >> $HOME/.bash_profile
$echo export ORACLE_BASE >> $HOME/.bash_profile
4.Instalación de paquetes necesarios para Oracle
Es necesario instalar paquetes de software. Ejecutar el siguiente comando desde el directorio que contiene los RPM's.
[root@laboracle ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
25G 2.6G 21G 12% /
/dev/sda1 99M 12M 83M 13% /boot
tmpfs 1014M 0 1014M 0% /dev/shm
/dev/hdc 2.6G 2.6G 0 100% /media/Enterprise Linux dvd 20080528
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
25G 2.6G 21G 12% /
/dev/sda1 99M 12M 83M 13% /boot
tmpfs 1014M 0 1014M 0% /dev/shm
/dev/hdc 2.6G 2.6G 0 100% /media/Enterprise Linux dvd 20080528
[root@laboracle ~]# cd /media/Enterprise\ Linux\ dvd\ 20080528/
[root@laboracle Enterprise Linux dvd 20080528]# cd Server
[root@laboracle Server]# rpm -Uvh elfutils-devel-0.125-3.el5.i386.rpm elfutils-libelf-devel-0.125-3.el5.i386.rpm elfutils-devel-static-0.125-3.el5.i386.rpm kernel-headers-2.6.18-92.el5.i386.rpm glibc-headers-2.5-24.i386.rpm glibc-devel-2.5-24.i386.rpm libstdc++-devel-4.1.2-42.el5.i386.rpm libgomp-4.1.2-42.el5.i386.rpm gcc-4.1.2-42.el5.i386.rpm gcc-c++-4.1.2-42.el5.i386.rpm
[root@laboracle Server]# rpm -Uvh libaio-devel-0.3.106-3.2.i386.rpm sysstat-7.0.2-1.el5.i386.rpm unixODBC-2.2.11-7.1.i386.rpm unixODBC-devel-2.2.11-7.1.i386.rpm
[root@laboracle Server]# rpm -Uvh libaio-devel-0.3.106-3.2.i386.rpm sysstat-7.0.2-1.el5.i386.rpm unixODBC-2.2.11-7.1.i386.rpm unixODBC-devel-2.2.11-7.1.i386.rpm
5. Agregar (con root) las siguientes líneas al archivo /etc/sysctl.conf:
kernel.shmall=2097152
kernel.shmmax=2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
fs.aio-max-nr = 1048576
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 = 1048576
6., Agregar las siguientes líneas al archivo /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
grid soft stack 10240
7. Agregar las siguientes líneas al final del archivo /etc/profile
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -u 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
if [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -u 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
7. Agregar las siguientes líneas al final del archivo /etc/profile
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -u 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
if [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -u 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
A continuación es necesario preparar los discos para su uso con ASM.
No hay comentarios:
Publicar un comentario