官方下载地址:http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
[root@oracle data]# ls
linuxamd64_12c_database_1of2.zip linuxamd64_12c_database_2of2.zip
yum install -y binutils compat-libstdc++ gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel libXext libXtst libX11 libXau libXi make sysstat
groupadd dba
groupadd oinstall
useradd -g oinstall -G dba oracle
echo ‘ycig1234‘ | passwd oracle --stdin
chown -R oracle.oinstall /data/
[root@oracle data]# ll /data/
total 2419500
-rw-r--r-- 1 oracle oinstall 1361028723 Jan 28 08:06 linuxamd64_12c_database_1of2.zip
-rw-r--r-- 1 oracle oinstall 1116527103 Jan 28 08:05 linuxamd64_12c_database_2of2.zip
setenforce 0
service iptables stop
chkconfig iptables off
先备份
cp /etc/sysctl.conf{,.bak}
再修改
vim /etc/sysctl.conf
kernel.shmmni = 4096
kernel.sem =250 32000 100 128
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144
net.ipv4.ip_local_port_range =9000 65500
fs.file-max=65536
fs.aio-max-nr=1048576
使其生效
sysctl -p
修改用户限制
vim /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 10240
vim /etc/profile
if [ $USER = "oracle" ]; then
ulimit -u 16384
ulimit -n 65536
fi
su - oracle
vi ~/.bash_profile
export ORACLE_BASE=/data/oracle/app
export ORACLE_HOME=$ORACLE_BASE/oracle/product/12.1.0/dbhome_1
export ORACLE_SID=orcl
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
export ORACLE_CLIENT=$ORACLE_HOME
解压文件
cd /data
unzip linuxamd64_12c_database_1of2.zip
unzip linuxamd64_12c_database_2of2.zip
拷贝静默安装模板文件到/data目录下
cd /data/database/response/
cp * /data/
[oracle@ecs-5864 response]$ ll
total 96
-rwxrwxr-x 1 oracle oinstall 58021 Aug 30 2012 dbca.rsp
-rw-rw-r-- 1 oracle oinstall 26690 May 25 2013 db_install.rsp
-rwxrwxr-x 1 oracle oinstall 6038 Jun 19 2012 netca.rsp
(建议在原模板文件上修改,以下为修改了的配置项)
vim /data/db_install.rsp
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v12.1.0
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=ecs-5864
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/data/oracle/app/oraInventory
SELECTED_LANGUAGES=en
ORACLE_HOME=/data/oracle/app/oracle/product/12.1.0/dbhome_1
ORACLE_BASE=/data/oracle/app
oracle.install.db.InstallEdition=EE
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=dba
oracle.install.db.BACKUPDBA_GROUP=dba
oracle.install.db.DGDBA_GROUP=dba
oracle.install.db.KMDBA_GROUP=dba
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
oracle.install.db.config.starterdb.globalDBName=VMS3DEVDB
oracle.install.db.config.starterdb.SID=VMS3DEVDB
oracle.install.db.ConfigureAsContainerDB=false
oracle.install.db.config.starterdb.characterSet=ZHS16GBK
oracle.install.db.config.starterdb.password.ALL=123456
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true
选项帮助可以用./runInstaller -h
cd /data/database/
./runInstaller -force -silent -noconfig -responseFile /data/db_install.rsp
安装完成后根据提示使用root执行两个脚本文件
su - root
sh /data/oracle/app/oraInventory/orainstRoot.sh
sh /data/oracle/app/oracle/product/12.1.0/dbhome_1/root.sh
原文地址:http://blog.51cto.com/13323775/2083009