----------------------------------Inicio del script-------------------------------
#!/bin/bash
/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/useradd -g oinstall -G dba oracle
/usr/bin/passwd oracle
# ingresar el password que se solicita
echo "kernel.shmall = 2097152" >> /etc/sysctl.conf
echo "kernel.shmmax = 2147483648" >> /etc/sysctl.conf
echo "kernel.shmmni = 4096" >> /etc/sysctl.conf
echo "kernel.sem = 250 32000 100 128" >> /etc/sysctl.conf
echo "fs.file-max = 6815744" >> /etc/sysctl.conf
echo "fs. aio-max-nr = 1048576 " >> /etc/sysctl.conf
echo "net.ipv4.ip_local_port_range = 9000 65500" >> /etc/sysctl.conf
echo "net.core.rmem_default=262144" >> /etc/sysctl.conf
echo "net.core.rmem_max=4194304" >> /etc/sysctl.conf
echo "net.core.wmem_default=262144" >> /etc/sysctl.conf
echo "net.core.wmem_max=1048576" >> /etc/sysctl.conf
echo "* soft nproc 2047" >> /etc/security/limits.conf
echo "* hard nproc 16384" >> /etc/security/limits.conf
echo "* soft nofile 1024" >> /etc/security/limits.conf
echo "* hard nofile 65536" >> /etc/security/limits.conf
echo "session required pam_limits.so" >> /etc/pam.d/login
echo "umask 022" >> /home/oracle/.bash_profile
echo "PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin" >> /home/oracle/.bash_profile
echo "LD_LIBRARY_PATH=/usr/lib:/usr/X11R6/lib" >> /home/oracle/.bash_profile
echo "ORACLE_BASE=/u01/app/oracle" >> /home/oracle/.bash_profile
echo "ORACLE_HOME=$ORACLE_BASE/product/10gR2" >> /home/oracle/.bash_profile
echo "ORACLE_SID= " >> /home/oracle/.bash_profile
echo "PATH=$ORACLE_HOME/bin:$PATH" >> /home/oracle/.bash_profile
echo "LD_LIBRARY_PATH=$ORACLE_HOME/jdk/jre/lib/i386:$ORACLE_HOME/jdk/jre/lib/i386/server:$ORACLE_HOME/rdbms/lib:$ORACLE_HOME/lib:$ORACLE_HOME/rdbms/mesg:$LD_LIBRARY_PATH" >> /home/oracle/.bash_profile
echo "export PATH LD_LIBRARY_PATH" >> /home/oracle/.bash_profile
echo "export ORACLE_BASE ORACLE_HOME ORACLE_SID" >> /home/oracle/.bash_profile
echo "if [ $USER = "oracle" ]; then" >> /etc/profile
echo "if [ $SHELL = "/bin/ksh" ]; then" >> /etc/profile
echo "ulimit -p 16384" >> /etc/profile
echo "ulimit -n 65536" >> /etc/profile
echo "else" >> /etc/profile
echo "ulimit -u 16384 -n 65536" >> /etc/profile
echo "fi" >> /etc/profile
echo "fi" >> /etc/profile
mkdir /u01
mkdir -p /u01/app/oracle/product/10gR2/
chown -R oracle:oinstall /u01
chmod -R 775 /u01
----------------------------------Fin del script-------------------------------
No hay comentarios:
Publicar un comentario