After reading the Oracle Installation video from instructor Xiao Bu, I found that Oracle installation is really depressing.
After reading the Oracle Installation video from instructor Xiao Bu, I found that Oracle installation is really depressing.
After reading the Oracle Installation video from instructor Xiao Bu, I found that Oracle installation was really depressing. There is no difficulty, that is, the preparations in the early stage are messy. Therefore, you have compiled an installation script, including 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 my script and Installation notes (Oracle just installed yesterday, there is no time for testing ):
The test is complete. Two mistakes have been modified.
######################################## ############################
#! /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 <
Oracle soft nproc 2047
Hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
EOF
Cat >>$ PAM <
Session required pam_limits.so
EOF