Oracle 11g silent installation
1. Check the installation package
Yum-y install gcc make binutils gcc-c++ compat-libstdc++-33 elfutils-libelf-devel elfutils-libelf-devel-static elfutils-libelf-devel ksh libaio libaio-devel numactl-devel sysstat unixODBC unixODBC-devel pcre-devel
2. Create user groups and users
Groupadd oinstall
Groupadd dba
Useradd-g oinstall-G dba oracle
Passwd oracle
3. Modify kernel parameters
Vi / etc/sysctl.conf
Kernel.shmall = 2097152
Kernel.shmmax = 4294967295
Fs.aio-max-nr = 1048576
Fs.file-max = 6815744
Kernel.shmmni = 4096
Kernel.sem = 250 32000 100 128
Net.ipv4.ip_local_port_range = 9000 65500
Net.core.rmem_default = 262144
Net.core.rmem_max = 4194304
Net.core.wmem_default = 262144
Net.core.wmem_max = 1048576
Use / sbin/sysctl-p to make kernel parameters take effect in real time
4. Modify user resource restrictions
Vi / etc/security/limits.conf
Oracle soft nproc 2047
Oracle hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
Oracle soft stack 10240
5. Modify the configuration file
Vi / etc/pam.d/login
Session required / lib/security/pam_limits.so
Session required pam_limits.so
6. Close selinux
Vi / etc/selinux/config
Just set SELINUX=disabled to disabled.
Sed-I "s/SELINUX=enforcing/SELINUX=disabled/"
7. Create an installation directory
Mkdir-p / u01/app/oracle
Chown-R oracle:oinstall / u01/app
Chmod-R 755 / u01/app/
8. Modify / etc/profile configuration file
Vi / etc/profile
If [$USER = "oracle"]; then
If [$SHELL = "/ bin/ksh"]; then
Ulimit-p 16384
Ulimit-n 65536
Else
Ulimit-u 16384-n 65536
Fi
Fi
9. Modify the host name
Vi / etc/sysconfig/network
Hostname=oracledb
Vi / etc/hosts
192.168.0.106 oracledb
10. Fix the Oracle user variable
Vi / home/oracle/.bash_profile
Export ORACLE_BASE=/u01/app
Export ORACLE_HOME=$ORACLE_BASE/oracle/product/11.2.0/dbhome_1
Export PATH=$ORACLE_HOME/bin:$PATH
Export ORACLE_SID=orcl
# export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
Export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
11. Extract the installation package
Unzip linux.x64_11gR2_database_1of2.zip-d / u01/app/
Unzip linux.x64_11gR2_database_2of2.zip-d / u01/app/
12 Silent installation
Cd / u01/app/database/response
Cp db_install.rsp db_install.rsp.bak
Vi db_install.rsp
Oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
Oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=oracledb
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oracle/oraInventory
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
ORACLE_BASE=/u01/app
Oracle.install.db.InstallEdition=EE
Oracle.install.db.isCustomInstall=false
Oracle.install.db.customComponents=oracle.server:11.2.0.1.0,oracle.sysman.ccr:10.2.7.0.0,oracle.xdk:11.2.0.1.0,oracle.rdbms.oci:11.2.0.1.0,oracle.network:11.2.0.1.0,oracle.network.listener:11.2.0.1.0,oracle.rdbms:11.2.0.1.0,oracle.options:11.2.0.1.0 Oracle.rdbms.partitioning:11.2.0.1.0,oracle.oraolap:11.2.0.1.0,oracle.rdbms.dm:11.2.0.1.0,oracle.rdbms.dv:11.2.0.1.0,orcle.rdbms.lbac:11.2.0.1.0,oracle.rdbms.rat:11.2.0.1.0
Oracle.install.db.InstallEdition=EE
Oracle.install.db.isCustomInstall=false
Oracle.install.db.customComponents=oracle.server:11.2.0.1.0,oracle.sysman.ccr:10.2.7.0.0,oracle.xdk:11.2.0.1.0,oracle.rdbms.oci:11.2.0.1.0,oracle.network:11.2.0.1.0,oracle.network.listener:11.2.0.1.0,oracle.rdbms:11.2.0.1.0,oracle.options:11.2.0.1.0 Oracle.rdbms.partitioning:11.2.0.1.0,oracle.oraolap:11.2.0.1.0,oracle.rdbms.dm:11.2.0.1.0,oracle.rdbms.dv:11.2.0.1.0,orcle.rdbms.lbac:11.2.0.1.0,oracle.rdbms.rat:11.2.0.1.0
Oracle.install.db.DBA_GROUP=dba
Oracle.install.db.OPER_GROUP=oinstall
Oracle.install.db.CLUSTER_NODES=
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=512
Oracle.install.db.config.starterdb.installExampleSchemas=false
Oracle.install.db.config.starterdb.enableSecuritySettings=true
Oracle.install.db.config.starterdb.password.ALL=orcl
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.dbcontrol.enableEmailNotification=false
Oracle.install.db.config.starterdb.dbcontrol.emailAddress=
Oracle.install.db.config.starterdb.dbcontrol.SMTPServer=
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=/home/oracle/oradata
Oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=/u01/app/oracle/recovery
Oracle.install.db.config.asm.diskGroup=
Oracle.install.db.config.asm.ASMSNMPPassword=
MYORACLESUPPORT_USERNAME=
MYORACLESUPPORT_PASSWORD=
SECURITY_UPDATES_VIA_MYORACLESUPPORT=
DECLINE_SECURITY_UPDATES=true
PROXY_HOST=
PROXY_PORT=
PROXY_USER=
PROXY_PWD=
Note:
Oracle.install.option=INSTALL_DB_SWONLY / / installation type, only database software is installed
ORACLE_HOSTNAME=oracledb / / Host name (command hostname query)
UNIX_GROUP_NAME=oinstall / / installation group
INVENTORY_LOCATION=/u01/app/oracle/oraInventory / / INVENTORY directory (leave it empty is the default value. This example needs to be modified here, depending on the installation directory created by the individual)
SELECTED_LANGUAGES=en,zh_CN / / Select language
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1 / / oracle_home path according to the directory situation, pay attention to modify the installation path of this example / u01/app/oracle
ORACLE_BASE=/u01/app/oracle / / oracle_base pay attention to modification
Oracle.install.db.InstallEdition=EE / / oracle version
Oracle.install.db.isCustomInstall=false / / Custom installation, No, use default components
Oracle.install.db.DBA_GROUP=dba / / dba user group
Oracle.install.db.OPER_GROUP=oinstall / / oper user group
Oracle.install.db.config.starterdb.type=GENERAL_PURPOSE / / database type
Oracle.install.db.config.starterdb.globalDBName=orcl / / globalDBName
Oracle.install.db.config.starterdb.SID=orcl / / SID (note here that it is consistent with the configuration SID in the environment variable)
Oracle.install.db.config.starterdb.memoryLimit=81920 / / automatically manage memory (M)
Oracle.install.db.config.starterdb.password.ALL=oracle / / set all database users to use the same password
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false / / (false is manually written)
DECLINE_SECURITY_UPDATES=true / / * * Note that this parameter must be set to true
13. Start installation
Su-oracle
Cd / u01/app/database
. / runInstaller-silent-responseFile / u01/app/database/response/db_install.rsp
. / runInstaller-silent-ignoreSysPrereqs-ignorePrereq-responseFile / u01/app/database/response/db_install.rsp
14. Log in with oracle users to configure monitoring
Netca-silent-responseFile / u01/app/database/response/netca.rsp
Netca-silent-responseFile / u01/app/database/response/netca.rsp
* DISPLAY environment variable not set!
Oracle Net Configuration Assistant is a GUI tool
Which requires that DISPLAY specify a location
Where GUI tools can display.
Set and export DISPLAY, then re-run.
[oracle@oracledb database] $export DISPLAY=localhost:0.0
[oracle@oracledb database] $netca-silent-responseFile / u01/app/database/response/netca.rsp
15. Set up a database
Dbca-silent-responseFile / u01/app/database/response/dbca.rsp
Note: you need to modify the instance name in the dbca file and the password of sys and system users.