1、检查内存、磁盘空间、系统版本:
[root@localhost ~]# grep MemTotal /proc/meminfo 
MemTotal:       515308 kB
[root@localhost ~]# grep SwapTotal /proc/meminfo 
SwapTotal:     1044216 kB
[root@localhost ~]# cat /proc/version 
Linux version 2.6.18-194.el5 ([email protected]) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Tue Mar 16 21:52:43 EDT 2010

2、检查软件包:
[root@localhost Server]# rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' \binutils elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers libaio libgcc libstdc++ make sysstat
binutils-2.17.50.0.6-14.el5 (i386)
elfutils-libelf-0.137-3.el5 (i386)
elfutils-libelf-devel-0.137-3.el5 (i386)
gcc-4.1.2-48.el5 (i386)
gcc-c++-4.1.2-48.el5 (i386)
glibc-2.5-49 (i686)
glibc-common-2.5-49 (i386)
glibc-devel-2.5-49 (i386)
glibc-headers-2.5-49 (i386)
libaio-0.3.106-5 (i386)
libgcc-4.1.2-48.el5 (i386)
libstdc++-4.1.2-48.el5 (i386)
make-3.81-3.el5 (i386)
sysstat-7.0.2-3.el5 (i386)

3、创建用户及用户组:
[root@localhost Server]# groupadd oinstall
[root@localhost Server]# groupadd dba
[root@localhost Server]# useradd -g oinstall -g dba -m oracle
[root@localhost Server]# passwd oracle
Changing password for user oracle.
New UNIX password: 
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password: 
passwd: all authentication tokens updated successfully.

4、内核修改:
[root@localhost Server]# vi /etc/sysctl.conf 
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 4294967295
kernel.shmall = 268435456
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65535
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144
"/etc/sysctl.conf" 44L, 1227C written
[root@localhost Server]# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 4294967295
kernel.shmall = 268435456
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65535
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144
[root@localhost ~]# vi /etc/security/limits.conf 
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
# End of file
"/etc/security/limits.conf" 53L, 1897C written
[root@localhost ~]# vi /etc/pam.d/login 
auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
auth       include      system-auth
account    required     pam_nologin.so
account    include      system-auth
password   include      system-auth
# pam_selinux.so close should be the first session rule
session    required     pam_selinux.so close
session    include      system-auth
session    required     pam_loginuid.so
session    optional     pam_console.so
# pam_selinux.so open should only be followed by sessions to be executed in the user context
session    required     pam_selinux.so open
session    optional     pam_keyinit.so force revoke
session required pam_limits.so
"/etc/pam.d/login" 15L, 674C written

5、创建目录:
[root@localhost Server]# cd /opt
[root@localhost opt]# mkdir oracle
[root@localhost opt]# mkdir software
[root@localhost opt]# chown -R oracleinstall /opt/oracle/
[root@localhost opt]# chown -R oracleinstall software/
[root@localhost opt]# ls -l
total 16
drwxr-xr-x 2 oracle oinstall 4096 Sep  5 01:03 oracle
drwxr-xr-x 2 oracle oinstall 4096 Sep  5 01:12 software

6、开始安装:
[oracle@localhost database]$./runInstaller -silent -debug -force \
>FROM_LOCATION=/opt/software/database/stage/products.xml \
>oracle.install.option=INSTALL_DB_SWONLY \
>UNIX_GROUP_NAME=dba \
>INVENTORY_LOCATION=/opt/oracle/oraInventory \
>ORACLE_HOME=/opt/oracle/product/11.2.0/db \
>ORACLE_HOME_NAME="Oracle111" \
>ORACLE_BASE=/opt/oracle \
>oracle.install.db.InstallEdition=EE \
>oracle.install.db.isCustomInstall=false \
>oracle.install.db.DBA_GROUP=dba \
>oracle.install.db.OPER_GROUP=dba \
>DECLINE_SECURITY_UPDATES=true
......
As a root user, execute the following script(s):
        1. /opt/oracle/oraInventory/orainstRoot.sh
        2. /opt/oracle/product/11.2.0/db/root.sh
Successfully Setup Software.
copying /opt/oracle/oraInventory/logs/oraInstall2012-09-05_01-32-48AM.out to /opt/oracle/product/11.2.0/db/cfgtoollogs/oui/oraInstall2012-09-05_01-32-48AM.out
copying /opt/oracle/oraInventory/logs/oraInstall2012-09-05_01-32-48AM.err to /opt/oracle/product/11.2.0/db/cfgtoollogs/oui/oraInstall2012-09-05_01-32-48AM.err
copying /opt/oracle/oraInventory/logs/installActions2012-09-05_01-32-48AM.log to /opt/oracle/product/11.2.0/db/cfgtoollogs/oui/installActions2012-09-05_01-32-48AM.log
copying /opt/oracle/oraInventory/logs/silentInstall2012-09-05_01-32-48AM.log to /opt/oracle/product/11.2.0/db/cfgtoollogs/oui/silentInstall2012-09-05_01-32-48AM.log

运行脚本:
[root@localhost logs]# /opt/oracle/oraInventory/orainstRoot.sh
Changing permissions of /opt/oracle/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /opt/oracle/oraInventory to dba.
The execution of the script is complete.
[root@localhost logs]# /opt/oracle/product/11.2.0/db/root.sh
Check /opt/oracle/product/11.2.0/db/install/root_localhost.localdomain_2012-09-05_02-01-01.log for the output of root script
7、登录数据库检查版本:
[oracle@localhost database]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on 星期三 9月 5 02:02:09 2012
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Connected to an idle instance.
SQL> 
8、静默建库:
[oracle@localhost response]$ cat /opt/software/database/response/mydb.rsp 
[GENERAL]
RESPONSEFILE_VERSION = "11.2.0"
OPERATION_TYPE = "createDatabase"
[CREATEDATABASE]
GDBNAME = "chen"
SID = "chen"
TEMPLATENAME = "New_Database.dbt"
SYSPASSWORD = "oracle"
SYSTEMPASSWORD = "oracle"
SYSMANPASSWORD = "oracle"
DBSNMPPASSWORD = "oracle"
DATAFILEDESTINATION ="/opt/oracle/oradata"
STORAGETYPE=FS
CHARACTERSET = "ZHS16GBK"
DATABASETYPE = "MULTIPURPOSE"
AUTOMATICMEMORYMANAGEMENT = "FALSE"
[oracle@localhost response]$ dbca -silent -responseFile /opt/software/database/response/mydb.rsp 
Creating and starting Oracle instance
1% complete
3% complete
Creating database files
4% complete
7% complete
Creating data dictionary views
8% complete
9% complete
10% complete
11% complete
12% complete
13% complete
14% complete
16% complete
17% complete
18% complete
19% complete
Adding Oracle JVM
25% complete
30% complete
36% complete
38% complete
Adding Oracle Text
39% complete
40% complete
41% complete
Adding Oracle XML DB
43% complete
44% complete
45% complete
49% complete
Adding Oracle Multimedia
50% complete
60% complete
Adding Oracle OLAP
61% complete
62% complete
64% complete
Adding Oracle Spatial
65% complete
66% complete
67% complete
71% complete
Adding Enterprise Manager Repository
73% complete
75% complete
Adding Oracle Application Express
78% complete
82% complete
Adding Oracle Warehouse Builder
86% complete
90% complete
Completing Database Creation
91% complete
92% complete
93% complete
96% complete
100% complete
Look at the log file "/opt/oracle/cfgtoollogs/dbca/chen/chen.log" for further details.
9、检查建库是否成功:
[oracle@localhost response]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on 星期三 9月 5 17:57:40 2012
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
PL/SQL Release 11.2.0.3.0 - Production
CORE    11.2.0.3.0      Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
SQL> select instance_name,version from v$instance;
INSTANCE_NAME    VERSION
---------------- -----------------
chen             11.2.0.3.0
SQL> select name,open_mode from v$database;
NAME      OPEN_MODE
--------- --------------------
CHEN      READ WRITE