cent os 6.6 x64 自動靜默安裝oracle 11gr2指令碼
前提:centos 6.6已經做了basic安裝,ip和主機名已設定.oracle安裝檔案p13390677_112040_Linux-x86-64_1of7.zip,p13390677_112040_Linux-x86-64_2of7.zip
放在/root下,pdksh-5.2.14-30.x86_64.rpm包放在/root下.
os:centos 6.6
oracle:11.2.0.4
IP:192.108.56.119
hostname:ct6602
---以下內容放在一個文字下,sh執行即可:
#!/bin/bash
##此處用於載入光碟機安裝缺少的包,也可改為網路方式.
mkdir /media/cdrom
mount /dev/cdrom /media/cdrom
mv /etc/yum.repos.d/*.repo /root/
cat > /etc/yum.repos.d/CentOS-Media.repo << EOF
[c6-media]
name=CentOS-$releasever - Media
baseurl=file:///media/cdrom/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
EOF
yum clean all
yum makecache
##配置作業系統
chkconfig iptables off
service iptables stop
setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
cat >> /etc/hosts << EOF
192.108.56.119 ct6602
EOF
cat >> /etc/sysctl.conf << EOF
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.aio-max-nr = 1048576
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 1048576
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
EOF
sysctl -p
cat >> /etc/security/limits.conf << EOF
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF
##配置oracle使用者
groupadd oinstall
groupadd dba
useradd -d /home/oracle -g oinstall -G dba oracle
echo "system"|passwd --stdin oracle
cat >> /home/oracle/.bash_profile << EOF
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=\$ORACLE_BASE/product/11.2.0/db_1
export ORACLE_SID=ct6602
export ORACLE_TERM=xterm
export PATH=/usr/sbin:\$PATH
export PATH=\$ORACLE_HOME/bin:\$PATH
export LD_LIBRARY_PATH=\$ORACLE_HOME/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin/
export CLASSPATH=\$ORACLE_HOME/JRE:\$ORACLE_HOME/jlib:\$ORACLE_HOME/rdbms/jlib
ulimit -u 16384 -n 65536
umask 022
EOF
. /home/oracle/.bash_profile
mkdir -p /u01/app/oracle /u02/oradata /u03/archivelog /u09/orabackup
chown -R oracle.oinstall /u01/app /u02/oradata /u03/archivelog /u09/orabackup
chmod -R 775 /u01/app
yum -y install gcc gcc-c++ make binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel glibc glibc-common glibc-devel libaio libaio-devel libgcc libstdc++ libstdc++-devel unixODBC unixODBC-devel
rpm -ivh /root/pdksh-5.2.14-30.x86_64.rpm
yum -y install expect
mv /root/p13390677_112040_Linux-x86-64_* /home/oracle/
chown -R oracle.oinstall /home/oracle/p13390677_112040_Linux-x86-64_*
su - oracle -c "unzip /home/oracle/p13390677_112040_Linux-x86-64_1of7.zip"
su - oracle -c "unzip /home/oracle/p13390677_112040_Linux-x86-64_2of7.zip"
##配置安裝響應檔案
##db_install.rsp
su - oracle -c cat >> /home/oracle/db_install.rsp <<EOF
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
oracle.install.option=INSTALL_DB_AND_CONFIG
ORACLE_HOSTNAME=ct6602
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oraInventory
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
ORACLE_BASE=/u01/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.EEOptionsSelection=false
oracle.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.0
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=dba
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=ct6602
oracle.install.db.config.starterdb.SID=ct6602
oracle.install.db.config.starterdb.characterSet=AL32UTF8
oracle.install.db.config.starterdb.memoryOption=true
oracle.install.db.config.starterdb.memoryLimit=700
oracle.install.db.config.starterdb.installExampleSchemas=false
oracle.install.db.config.starterdb.enableSecuritySettings=false
oracle.install.db.config.starterdb.password.ALL=system
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=FILE_SYSTEM_STORAGE
oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=/u02/oradata/
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=
oracle.installer.autoupdates.downloadUpdatesLoc=
AUTOUPDATES_MYORACLESUPPORT_USERNAME=
AUTOUPDATES_MYORACLESUPPORT_PASSWORD=
EOF
##netca.rsp
su - oracle -c cat > /home/oracle/netca.rsp << EOF
[GENERAL]
RESPONSEFILE_VERSION="11.2"
CREATE_TYPE="CUSTOM"
[oracle.net.ca]
INSTALLED_COMPONENTS={"server","net8","javavm"}
INSTALL_TYPE=""typical""
LISTENER_NUMBER=1
LISTENER_NAMES={"LISTENER"}
LISTENER_PROTOCOLS={"TCP;1521"}
LISTENER_START=""LISTENER""
NAMING_METHODS={"TNSNAMES","ONAMES","HOSTNAME"}
NSN_NUMBER=1
NSN_NAMES={"EXTPROC_CONNECTION_DATA"}
NSN_SERVICE={"PLSExtProc"}
NSN_PROTOCOLS={"TCP;HOSTNAME;1521"}
EOF
##dbca.rsp
su - oracle -c cat > /home/oracle/dbca.rsp << EOF
[GENERAL]
RESPONSEFILE_VERSION = "11.2.0"
OPERATION_TYPE = "createDatabase"
[CREATEDATABASE]
GDBNAME = "ct6602"
SID = "ct6602"
TEMPLATENAME = "General_Purpose.dbc"
CHARACTERSET = "AL32UTF8"
NATIONALCHARACTERSET= "AL16UTF16"
SYSPASSWORD = "system"
SYSTEMPASSWORD = "system"
DATAFILEDESTINATION =/u02/oradata
RECOVERYAREADESTINATION=/u09/orabackup
TOTALMEMORY = "700"
[createTemplateFromDB]
SOURCEDB = "myhost:1521:orcl"
SYSDBAUSERNAME = "system"
TEMPLATENAME = "My Copy TEMPLATE"
[createCloneTemplate]
SOURCEDB = "orcl"
TEMPLATENAME = "My Clone TEMPLATE"
[DELETEDATABASE]
SOURCEDB = "orcl"
[generateScripts]
TEMPLATENAME = "New Database"
GDBNAME = "orcl11.us.oracle.com"
[CONFIGUREDATABASE]
[ADDINSTANCE]
DB_UNIQUE_NAME = "orcl11g.us.oracle.com"
NODELIST=
SYSDBAUSERNAME = "sys"
[DELETEINSTANCE]
DB_UNIQUE_NAME = "orcl11g.us.oracle.com"
INSTANCENAME = "orcl11g"
SYSDBAUSERNAME = "sys"
EOF
##安裝oracle
su - oracle -c "/home/oracle/database/runInstaller -silent -noconfig -ignorePrereq -responseFile /home/oracle/db_install.rsp"
cat << EOF
###########################################################################
安裝完oracle,在root使用者執行下面4條命令.
sh /u01/app/oraInventory/orainstRoot.sh
sh /u01/app/oracle/product/11.2.0/db_1/root.sh
su - oracle -c "netca /silent /responsefile /home/oracle/netca.rsp"
su - oracle -c "dbca -silent -responseFile /home/oracle/dbca.rsp"
############################################################################
EOF
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28539951/viewspace-1764034/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- cent os 6.6 x64 自動配置oracle 11gr2物理standby指令碼Oracle指令碼
- cent os 6.6 x64 自動原始碼安裝mysql 5.6指令碼原始碼MySql指令碼
- 【oracle】靜默安裝 oracle 11gr2Oracle
- 【[Oracle】-【安裝】-Cent OS安裝Oracle ClientOracleclient
- CENTOS 6.6 x64 自動化安裝Oracle Database 11g R2 RAC指令碼CentOSOracleDatabase指令碼
- windows靜默安裝Oracle11G指令碼WindowsOracle指令碼
- Cent OS 安裝 RedisRedis
- 靜默方式安裝11gR2
- oracle單機靜默安裝指令碼oracleAutoInstall.shOracle指令碼
- Oracle 靜默安裝Oracle
- Oracle靜默安裝Oracle
- Oracle 11gr2 RAC on OEL6.4靜默安裝Oracle
- Linux下利用指令碼靜默安裝Oracle11GLinux指令碼Oracle
- 靜默安裝ORACLE(文件)Oracle
- 靜默安裝19C RAC的指令碼指令碼
- Cent os 6.3上安裝rlwrap
- 【配置上線】靜默安裝資料庫Oracle 11gR2資料庫Oracle
- oracle靜默安裝raw裝置Oracle
- 靜默安裝SqlServer2008指令碼SQLServer指令碼
- 靜默安裝oracle時報錯Oracle
- ORACLE 11.2.0.4靜默安裝Oracle
- 靜默安裝oracle軟體Oracle
- Oracle靜默安裝(單機)Oracle
- 靜默安裝ORACLE 軟體Oracle
- Oracle靜默安裝說明Oracle
- PackageInstaller 5.0原始碼分析靜默安裝與靜默解除安裝Package原始碼
- oracle11g在linux7的靜默安裝指令碼OracleLinux指令碼
- Android靜默安裝和靜默解除安裝Android
- Cent OS 7安裝和使用dockerDocker
- CentOS 6.6系統上命令列靜默安裝安裝Oracle 11G R2(11.2.0.3)CentOS命令列Oracle
- oracle 19C 靜默安裝Oracle
- oracle 12c 靜默安裝Oracle
- Oracle 11g 靜默安裝Oracle
- 靜默安裝oracle10gOracle
- oracle10g 靜默安裝Oracle
- Oracle 10g 靜默安裝Oracle 10g
- 【靜默】在RHEL 6.5上靜默安裝Oracle 18cOracle
- linux7 靜默安裝 11GR2 RACLinux