I. Runtime Environment
Note: The SWAP installed on Oracle11 must be above 2.57G. Therefore, when installing CentOS, make sure that the swap is larger than 2.57G.
System Environment: centos 5.6 32-bit (graphical installation)
Hard Disk Partition:
/Boot 150 M
Swap 4096 M (at least 3 GB)
/10G
/Home 5G
/Tmp 5G
/Usr 10G
/Usr/local 10G
/Var 10G
/Opt 10G
/Data all remaining
Df-h
# Synchronous clock
Yum-y install ntp
Ntpdate time.nist.gov
Echo "**/2 ***/sbin/ntpdate time.nist.gov">/etc/crontab
Close the service:
Iptables
Selinux
Portmap
Rpc. statd
Cupsd
Avahi-daemon
Sendmail
Killall iptables
Chkconfig -- level 2345 iptables off
Killall portmap
Chkconfig -- level 2345 portmap off
Killall avahi-daemon
Chkconfig -- level 2345 avahi-daemon off
Killall sendmail
Chkconfig -- level 2345 sendmail off
Ii. Install the component package on which oracle 11gR2 depends
# The following components are required:
Downloading Packages:
(1/22): libaio-devel-0.3.106-5.i386.rpm | 12 kB
(2/22): numactl-devel-0.9.8-11.el5.i386.rpm | 17 kB
(3/22): elfutils-libelf-devel-0.137-3.el5.i386.rpm | 24 kB
(4/22): elfutils-libelf-devel-static-0.137-3.el5.i386.rpm | 66 kB
(5/22): libgomp-4.4.4-13.el5.i386.rpm | 72 kB
(6/22): libgcc-4.1.2-50.el5.i386.rpm | 96 kB
(7/22): nscd-2.5-58.el5_6.3.i386.rpm | 167 kB
(8/22): sysstat-7.0.2-3.el5_5.1.i386.rpm | 170 kB
(9/22): pdksh-5.2.14-36.el5.i386.rpm | 198 kB
(10/22): compat-libstdc ++-33-3.2.3-61.i386.rpm | 232 kB
(11/22): libstdc ++-4.1.2-50. el5.i386. rpm | 362 kB
(12/22): glibc-headers-2.5-58.el5_6.3.i386.rpm | 603 kB
(13/22): unixODBC-devel-2.2.11-7.1.i386.rpm | 739 kB
(14/22): unixODBC-2.2.11-7.1.i386.rpm | 832 kB
(15/22): kernel-headers-2.6.18-238.9.1.el5.i386.rpm | 1.1 MB
(16/22): glibc-devel-2.5-58.el5_6.3.i386.rpm | 2.0 MB
(17/22): cpp-4.1.2-50.el5.i386.rpm | 2.7 MB
(18/22): libstdc ++ devel-4.1.2-50.el5.i386.rpm | 2.8 MB
(19/22): gcc-c ++-4.1.2-50. el5.i386. rpm | 3.4 MB
(20/22): gcc-4.1.2-50.el5.i386.rpm | 5.2 MB
(21/22): glibc-2.5-58.el5_6.3.i686.rpm | 5.3 MB
(22/22): glibc-common-2.5-58.el5_6.3.i386.rpm
Yum-y install binutils compat-libstdc ++-33 elfutils-libelf-devel glibc-common glibc-devel gcc-c ++ libaio-devel libaliblibgcc gcc stdc + + libstdc ++-devel make sysstat unixODBC-devel pdksh numactl-devel glibc-headers
/Sbin/ldconfig
3. Adjust Kernel Parameters
Vi/etc/sysctl. conf
Fs. file-max = 6815744
Kernel. shmall = 2097152
Kernel. shmmax = 536870912
Kernel. shmmni = 4096
Kernel. sem = 250 32000 100 128
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
Fs. aio-max-nr = 1048576
# Make kernel parameters take effect
Sysctl-p
# Modify limits. conf
Vi/etc/security/limits. conf
# Oracle settings
Oracle soft nproc 2047
Hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
# Modify the system version (RedHat 5. X Series Systems skipped this step)
Cp/etc/redhat-release/etc/redhat-release.bk
Vi/etc/redhat-release
# Modify the content:
Red Hat Enterprise Linux AS release 5 (Taroon)
# Modify/etc/pam. d/login
# Add the following content:
Session required/lib/security/pam_limits.so
Session required pam_limits.so
# Modify/etc/profile
Vi/etc/profile
# Add the following content:
If [$ USER = "oracle"]; then
If [$ SHELL = "/bin/ksh"]; then
Ulimit-p 16384
Ulimit-n 65536
Else
Ulimit-u 16384-n 65536
Fi
Fi
# Modify/etc/csh. login
Vi/etc/csh. login
# Add the following content:
If ($ USER = "oracle") then
Limit maxproc 16384
Limit deors 65536
Endif
4. Create an oracle user
Groupadd oinstall
Groupadd dba
Useradd-g oinstall-G dba oracle
Passwd oracle #753951
Mkdir-p/data/oracle
Mkdir-p/data/oralnventory
Mkdir-p/data/software
Chown-R oracle: oinstall/data/oracle
Chown-R oracle: oinstall/data/software
Chown-R oracle: oinstall/data/oralnventory
# Setting user environment variables
# Su-oracle
$ Vi. bash_profile
# Add the following content:
ORACLE_SID = kerry; export ORACLE_SID
ORACLE_BASE =/data/oracle; export ORACLE_BASE
ORACLE_HOME = $ ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
PATH = $ PATH: $ ORACLE_HOME/bin: $ HOME/bin; export PATH
Admin and product under ORACLE_BASE
ORACLE commands, database connection, installation assistant, listener, and so on in ORACLE_HOME.
This is just the definition of ORACLE. ORACLE_HOME is deeper than the ORACLE_BASE directory. That is, ORACLE_HOME = $ ORACLE_BASE/product/version
ORACLE_BASE is the root directory of oracle and ORACLE_HOME is the directory of oracle products.
Simply put, if you have two versions of oracle, ORACLE_BASE can be one, but ORACLE_HOME can be two.
The global database name is used to differentiate instances on different machines of a distributed database.
SID is used to distinguish different instances on the same machine,
That is, one is used for external differentiation.
One is used for internal differentiation.
$ Source. bash_profile