Centos静默安装oracle 11g

centos静默(命令行模式)安装oracle 11g,刚好公司之前oracle是在window的需要迁移到linux,oracle版本是 : Oracle Release 11.2.0.4.0 Production 。
1、压缩包解压
unzip oracle-soft.zipunzip p13390677_112040_Linux-x86-64_1of7.zipunzip p13390677_112040_Linux-x86-64_2of7.zip2、安装依赖包
yum install -y gcc make binutils gcc-c++ compat-libstdc++-33elfutils-libelf-devel elfutils-libelf-devel-static ksh libaio libaio-develnumactl-devel sysstat unixODBC unixODBC-devel pcre-devel libXtst.so.6yum install libXp*.x86_64 libXt*.x86_64 libxtst*.x86_64 -y3、添加用户和用户组
groupadd oinstallgroupadd dbauseradd -g oinstall -G dba oracle4、修改内核参数文件 vi /etc/sysctl.conf
fs.aio-max-nr = 1048576fs.file-max = 6815744kernel.shmall = 2097152kernel.shmmax = 8589934592kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048576其中kernel.shmmax = 8589934592 为本机物理内存的一半,单位为byte
6. 修改文件/etc/security/limits.conf
oracle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536oracle soft stack 102407. 修改文件/etc/pam.d/login,添加
session required /lib64/security/pam_limits.sosession required pam_limits.so8. 修改文件/etc/profile,添加
##ORACLE if [ $USER = "oracle" ]; thenif [ $SHELL = "/bin/ksh" ]; thenulimit -p 16384ulimit -n 65536elseulimit -u 16384 -n 65536fifi9. 创建安装目录和设置目录权限
mkdir -p /data/oracle/product/11.2.0.4.0mkdir /data/oracle/oradata //数据库文件,生产一般是放在存储上的mkdir /data/oracle/inventorymkdir /data/oracle/fast_recovery_areachown -R oracle:oinstall /data/oraclechmod -R 775 /data/oraclechown -R oracle:oinstall /oradata //数据库文件,这里存储是挂在这个目录10. 设置oracle用户变量,编辑文件.bash_profile,添加
【Centos静默安装oracle 11g】ORACLE_BASE=/data/oracleORACLE_HOME=$ORACLE_BASE/product/11.2.0.4.0ORACLE_SID=orclPATH=$PATH:$ORACLE_HOME/binexport ORACLE_BASE ORACLE_HOME ORACLE_SID PATH使用命令,让其生效
source /home/oracle/.bash_profile11、编辑安装文件
grep -v '^#' /data/database/response/db_install.rsp | more[oracle@oracle admin]$ grep -v '^#' /data/database/response/db_install.rsp | moreoracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0oracle.install.option=INSTALL_DB_SWONLYORACLE_HOSTNAME=oracleUNIX_GROUP_NAME=oinstallINVENTORY_LOCATION=/data/oracle/inventorySELECTED_LANGUAGES=en,zh_CNORACLE_HOME=/data/oracle/product/11.2.0.4.0ORACLE_BASE=/data/oracleoracle.install.db.InstallEdition=EEoracle.install.db.EEOptionsSelection=falseoracle.install.db.optionalComponents=oracle.rdbms.partitioning:11.2.0.4.0,oracle.oraolap:11.2.0.4.0,oracle.rdbms.dm:11.2.0.4.0,oracle.rdbms.dv:11.2.0.4.0,oracle.rdbms.lbac:11.2.0.4.0,oracle.rdbms.rat:11.2.0.4.0oracle.install.db.DBA_GROUP=dbaoracle.install.db.OPER_GROUP=dbaoracle.install.db.CLUSTER_NODES=oracle.install.db.isRACOneInstall=oracle.install.db.racOneServiceName=oracle.install.db.config.starterdb.type=oracle.install.db.config.starterdb.globalDBName=oracle.install.db.config.starterdb.SID=oracle.install.db.config.starterdb.characterSet=AL32UTF8oracle.install.db.config.starterdb.memoryOption=trueoracle.install.db.config.starterdb.memoryLimit=oracle.install.db.config.starterdb.installExampleSchemas=falseoracle.install.db.config.starterdb.enableSecuritySettings=trueoracle.install.db.config.starterdb.password.ALL=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_CONTROLoracle.install.db.config.starterdb.gridcontrol.gridControlServiceURL=oracle.install.db.config.starterdb.automatedBackup.enable=falseoracle.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=DECLINE_SECURITY_UPDATES=truePROXY_HOST=PROXY_PORT=PROXY_USER=PROXY_PWD=PROXY_REALM=COLLECTOR_SUPPORTHUB_URL=oracle.installer.autoupdates.option=oracle.installer.autoupdates.downloadUpdatesLoc=AUTOUPDATES_MYORACLESUPPORT_USERNAME=AUTOUPDATES_MYORACLESUPPORT_PASSWORD=12. 静默安装:


推荐阅读