top of page

PRE-REQUISITOS

#!/bin/bash

echo "INICIA PARTE PARA LA INSTALACION DE LOS PAQUETES"
yum clean all
yum install -y elfutils-*
yum install -y glibc-*
yum install -y gcc-4*
yum install -y gcc-c++*
yum install -y libstdc++*
yum install -y glibc-headers*
yum install -y libgomp*
yum install -y compat-libstdc++*
yum install -y libaio-*
yum install -y sysstat*
yum install -y unixODBC
yum install -y unixODBC*
yum install -y rsh-*

#echo "INICIA PARTE PARA LA CREACION DE GRUPOS Y USUARIOS PARA ORACLE"

/usr/sbin/groupadd -g 502 oinstall
/usr/sbin/groupadd -g 503 dba
/usr/sbin/groupadd -g 504 asmoper
/usr/sbin/groupadd -g 505 asmadmin
/usr/sbin/groupadd -g 506 asmdba
/usr/sbin/groupadd -g 507 oper
/usr/sbin/useradd -m -d /home/oracle -u 502 -g oinstall -G dba,asmdba,oper oracle
/usr/sbin/useradd -m -d /home/grid -g oinstall -G dba,asmdba,oper,asmadmin,asmoper -u 503 grid
#ORACLE_BASE
mkdir -p /oradump/grid
mkdir -p /oradump/oracle
#ORACLE_PRODUCT
mkdir -p /grid/product/12102
mkdir -p /oracle/product/12102

chown -R grid:oinstall /grid/
chown -R oracle:oinstall /oracle/
chown -R oracle:oinstall /oradump/
chmod -R 775 /grid
chmod -R 775 /oracle
chmod -R 775 /oradump


echo "INICIA CONFIGURACION DE PARAMETROS DEL KERNEL Y PROFILES"

cat >>/etc/sysctl.conf<<EOF
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=4194304
net.core.wmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_max=1048576
EOF

sleep 2

/sbin/sysctl -p

cat >>/etc/security/limits.conf<<EOF
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF

cat >>/etc/security/limits.conf<<EOF
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
EOF

cat >>/etc/pam.d/login<<EOF
session required pam_limits.so
EOF

cat >>/etc/profile<<EOF
if [ \$USER = "oracle" ]; then
if [ \$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
EOF

cat >>/etc/profile<<EOF
if [ \$USER = "grid" ]; then
if [ \$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
EOF

cat >>/etc/csh.login<<EOF
if ( \$USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
umask 022
endif
EOF

cat >>/etc/csh.login<<EOF
if ( \$USER == "grid" ) then
limit maxproc 16384
limit descriptors 65536
umask 022
endif
EOF

echo "PARAMETROS DE KERNEL Y PROFILE APLICADOS"

bottom of page