If you are very depressed about the actual operation steps of the Oracle installation script. You can browse the following article. I found an Oracle installation script on a reputable website, including some preparation activities such as modifying the host name, setting kernel variables, and creating users.
In this way, you don't have to repeat the same job. The following is the script I compiled and the Oracle Installation notes I just installed yesterday. There is no time to test it now ):
The test is complete.
- #!/bin/bash
- # Oracle
- # 2009/03/12 first twtcom
- # set variable
- # Oracle_BASE=/u1
- echo -n "Please enter HOSTNAME(default Oracle):"
- read HOSTNAME
- if [ -z $HOSTNAME ]
- then
- HOSTNAME=Oracle
- fi
- echo -n "Please enter Oracle_BASE(default /u1):"
- read Oracle_BASE
- if [ -z $Oracle_BASE ]
- then
- Oracle_BASE=/u1
- fi
- # Oracle_HOME=$Oracle_BASE/Oracle
- echo -n "Please enter HOME(default Oracle):"
- read HOME
- if [ -z $HOME ]
- then
- HOME=Oracle
- fi
- Oracle_HOME=$Oracle_BASE/$HOME
- # Oracle_SID=oral
- echo -n "Please enter Oracle_SID(default oral):"
- read Oracle_SID
- if [ -z $Oracle_SID ]
- then
- Oracle_SID=oral
- fi
- USER=Oracle
- SYSCTL=/etc/sysctl.conf
- LIMITS=/etc/security/limits.conf
- PAM=/etc/pam.d/login
- PROFILE=/etc/profile
- BASH_PROFILE=$Oracle_HOME/.bash_profile
- IPADDR=`ifconfig eth0|grep "inet addr"
- |cut -d : -f 2|cut -d ' ' -f 1`
- HOSTS=/etc/hosts
- NETWORK=/etc/sysconfig/network
- # hostname
- grep -v "HOSTNAME" $NETWORK > $NETWORK
- echo "HOSTNAME=$HOSTNAME" >> $NETWORK
- echo "$IPADDR $HOSTNAME">> $HOSTS
- # useradd
- mkdir -p $Oracle_BASE
- groupadd oinstall
- groupadd dba
- useradd -g oinstall -G dba -d $Oracle_HOME $USER
- chown -R $USER:oinstall $Oracle_BASE
- cat >> $SYSCTL << EOF
- 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 = 262144
- net.core.rmem_max = 4194304
- net.core.wmem_default = 262144
- net.core.wmem_max = 262144
- EOF
- cat >> $LIMITS <<EOF
- Oracle soft nproc 2047
- Oracle hard nproc 16384
- Oracle soft nofile 1024
- Oracle hard nofile 65536
- EOF
- cat >> $PAM <<EOF
- session required pam_limits.so
The above content is a description of the Oracle installation script, hoping to help you in this regard.