本文中
>>
内容
>>
意味着,内容以追加方式输入文件,是该文件内所需要的部分参数
<<
内容
<<
意味着,内容是当前文件中全部内容,可以将文件删除后创建该文件,输入内容
安装环境,CentOS 6.8 ,VMware workstation PRO 12
硬件环境,RAM:4GB ,SWAP:8GB
主机名 localhost
挂载好DVD安装光盘
※准备安装环境※
# yum install binutils compat-libcap1 libXp libXp-devel compat-libstdc++-33 elfutils-libelf elfutils-devel
elfutils-libelf-devel-static gcc gcc-c++ glibc glibc-common glibc-devel kernel-headers ksh libaio libaio-devel libgcc libgomp libstdc++
libstdc++-devel make sysstat unixODBC unixODBC-devel readline-devel -y
※上传oracle 11G 的安装文件到/v※
<<
/v/database
<<
※修改/v/database文件权限※
# chmod -R 777 /v/database
# chown -R oracle.oinstall /v/database
※创建用户与组※
# groupadd -g 501 oinstall
# groupadd -g 502 dba
# groupadd -g 503 oper
# useradd -u 502 -g oinstall -G dba,oper oracle
# echo oracle |passwd –stdin oracle
※配置用户变量文件与添加Oracle目录※
(建议新建会话窗口操作此步骤)
# su – oracle
# vim /home/oracle/.bash_profile
>>
PATH=$PATH:$HOME/bin
export ORACLE_BASE=/app/oracle
export ORACLE_HOME=/app/oracle/product
export TEMP=/tmp
export TEPDIR=/tmp
export ORACLE_SID=orcl
export PATH=$ORACLE_HOME/bin:$PATH
alias sqlplus=’/usr/local/bin/rlwrap sqlplus’
alias rman=’/usr/local/bin/rlwrap rman’
>>
# mkdir /app/oracle -pv
# chmod 775 -R /app
# chown -R oracle.oinstall /app
※配置系统环境文件※
# vim /etc/security/limits.conf
>>
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
>>
# vim /etc/sysctl.conf
>>
kernel.shmall = 2097152
kernel.shmmax = 1047853056
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
fs.aio-max-nr = 1048576
net.core.wmem_max = 1048586
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
>>
# sysctl -p
# vim /etc/oraInst.loc
>>
inventory_loc=/app/oraInventory
inst_group=oinstall
>>
# chown oracle:oinstall /etc/oraInst.loc
# chmod 664 /etc/oraInst.loc
※创建Oracle 文件安装目录※
# mkdir -vp /app/oracle /app/oraInventory /app/oradata/
# chown -R oracle:oinstall /app/oracle /app/oraInventory /app/oradata/
# chmod -R 775 /app/oracle /app/oraInventory /app/oradata/
※oracle安装应答模板db_install.rsp文件※
# cp /v/database/response/* /app/oracle/
# vim /app/oracle/db_install.rsp
<<
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=db
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/app/oraInventory
SELECTED_LANGUAGES=en,zh_CN,zh_TW
ORACLE_HOME=/app/oracle/pro
ORACLE_BASE=/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.EEOptionsSelection=false
oracle.install.db.optionalComponents=oracle.rdbms.partitioning:11.2.0.3.0,oracle.oraolap:11.2.0.3.0,oracle.rdbms.dm:11.2.0.3.0,oracle.rdbms.dv:11.2.0.3.0,oracle.rdbms.lbac:11.2.0.3.0,oracle.rdbms.rat:11.2.0.3.0
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=oinstall
oracle.install.db.CLUSTER_NODES=
oracle.install.db.isRACOneInstall=
oracle.install.db.racOneServiceName=
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
oracle.install.db.config.starterdb.globalDBName=orcl
oracle.install.db.config.starterdb.SID=orcl
oracle.install.db.config.starterdb.characterSet=AL32UTF8
oracle.install.db.config.starterdb.memoryOption=true
oracle.install.db.config.starterdb.memoryLimit=
oracle.install.db.config.starterdb.installExampleSchemas=false
oracle.install.db.config.starterdb.enableSecuritySettings=true
oracle.install.db.config.starterdb.password.ALL=oracle
oracle.install.db.config.starterdb.password.SYS=
oracle.install.db.config.starterdb.password.SYSTEM=
oracle.install.db.config.starterdb.password.SYSMAN=
oracle.install.db.config.starterdb.password.DBSNMP=
oracle.install.db.config.starterdb.control=DB_CONTROL
oracle.install.db.config.starterdb.gridcontrol.gridControlServiceURL=
oracle.install.db.config.starterdb.automatedBackup.enable=false
oracle.install.db.config.starterdb.automatedBackup.osuid=
oracle.install.db.config.starterdb.automatedBackup.ospwd=
oracle.install.db.config.starterdb.storageType=
oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=
oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=
oracle.install.db.config.asm.diskGroup=
oracle.install.db.config.asm.ASMSNMPPassword=
MYORACLESUPPORT_USERNAME=
MYORACLESUPPORT_PASSWORD=
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true
PROXY_HOST=
PROXY_PORT=
PROXY_USER=
PROXY_PWD=
PROXY_REALM=
COLLECTOR_SUPPORTHUB_URL=
oracle.installer.autoupdates.option=
AUTOUPDATES_MYORACLESUPPORT_USERNAME=
AUTOUPDATES_MYORACLESUPPORT_PASSWORD=
<<
# chown -R oracle:oinstall /app/oracle /app/oraInventory /app/oradata/
# chmod -R 775 /app/oracle /app/oraInventory /app/oradata/
※安装Oracle※
# /v/database/runInstaller -silent -force -ignorePrereq -responseFile /app/oracle/db_install.rsp
※监控Oracle安装进度※
# watch -d -n 2 'du -sh /app/oracle' ※监控Oracle安装进度※ # /usr/oracle/oraInventory/orainstRoot.sh # /usr/oracle/product/11.2.0/db_1/root.sh