CentOS silently installs Oracle database
1. Install the RPM package
# yum install binutils\
Compat-libstdc++-33\
Elfutils-libelf\
Elfutils-libelf-devel\
Expat\
Gcc\
Gcc-c++\
Glibc\
Glibc-common\
Glibc-devel\
Glibc-headers\
Libaio\
Libaio-devel\
Libgcc\
Libstdc++\
Libstdc++-devel\
Make\
Pdksh\
Sysstat\
UnixODBC\
UnixODBC-devel
Note: some machines estimate that both 32 and 64 packets of libaio are needed, not yet.
2. Fixed IP address, hostname,hosts record
[root@localhost]
# vim / etc/sysconfig/network
Hostname=oracle11g.example.com
[root@oracle11g ~] # vim / etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
HWADDR=00:0C:29:1E:68:68
ONBOOT=yes
IPADDR=192.168.1.16
NETMASK=255.255.255.0
GATEWAY=192.168.1.254
[root@oracle11g]
# ifconfig eth0 | head-n 2
Eth0 Link encap:Ethernet HWaddr 00:0C:29:9F:DF:4A
Inet addr:192.168.1.16 Bcast:192.168.1.255 Mask:255.255.255.0
[root@oracle11g]
# grep-v'^ #'/ etc/hosts
127.0.0.1localhost.localdomain localhost
192.168.1.16 oracle11g.example.com
3. Set up the operation resources of the system
[root@oracle11g]
# vim / etc/sysctl.conf is added to the bottom of the file
Kernel.shmall = 2097152
Kernel.shmmax = 2147483648
Kernel.shmmni = 4096
Kernel.sem = 250 32000 100 128
Fs.file-max = 65536
Net.ipv4.ip_local_port_range = 1024 65000
Net.core.rmem_default = 1048576
Net.core.rmem_max = 1048576
Net.core.wmem_default = 262144
Net.core.wmem_max = 262144
[root@oracle11g]
# sysctl-p
Shell restriction
[root@oracle11g]
# grep-v'^ #'/ etc/security/limits.conf
Oracle soft nproc 2047
Oracle hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
[root@oracle11g]
# grep 'limit' / etc/pam.d/system-auth
Session required pam_limits.so
4. Set up oracle users
It is recommended to specify GID and UID methods (especially in cluster environment)
[root@oracle11g]
# groupadd-g 1000 oinstall
[root@oracle11g]
# groupadd-g 1001 dba
[root@oracle11g]
# useradd-u 1000-g oinstall-G dba oracle
[root@oracle11g]
# passwd oracle
Establish a directory of oracle software installation files
[root@oracle11g]
# mkdir-p / u01/oracle
[root@oracle11g]
# chown-R oracle:oinstall / u01 /
Set the oracle environment variable
[root@oracle11g]
Vi ~ oracle/.bash_profile
Umask 022
Export ORACLE_BASE=/u01/oracle
Export ORACLE_HOME=$ORACLE_BASE/product/11.2.0
Export ORACLE_SID=oracle11g
Export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
Export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
Load configuration
Oracle user logout and re-login or #
# su-oracle
# source .bash _ profile
5. Decompress the installation file
# unzip linux.x64_11gR2_database_1of2.zip-d / mnt
# unzip linux.x64_11gR2_database_2of2.zip-d / mnt
6. Modify the configuration file
[root@oracle11g ~] # grep-v'^ #'/ mnt/database/response/db_install.rsp (see silent installation-configuration file description)
Oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
Oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=oracle11g.example.com
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/oracle
SELECTED_LANGUAGES=en,zh_CN,zh_TW (choose the language to support)
ORACLE_HOME=/u01/oracle/product/11.2.0
ORACLE_BASE=/u01/oracle
Oracle.install.db.InstallEdition=EE
Oracle.install.db.isCustomInstall=true
Oracle.install.db.DBA_GROUP=dba
Oracle.install.db.OPER_GROUP=oinstall
Oracle.install.db.config.starterdb.characterSet=AL32UTF8 (modify the character set as needed in the production environment)
Oracle.install.db.config.starterdb.memoryOption=true
Oracle.install.db.config.starterdb.installExampleSchemas=false
Oracle.install.db.config.starterdb.enableSecuritySettings=true
Oracle.install.db.config.starterdb.control=DB_CONTROL
Oracle.install.db.config.starterdb.automatedBackup.enable=false
DECLINE_SECURITY_UPDATES=true (want to have a family, otherwise you will report the wrong message [server]
Email address error
)
7. Silently install the database
[root@oracle11g ~] # cd / mnt/database/response
[root@oracle11g response] $chown-R oracle:oinstall / mnt/database/response/db_install.rsp
[root@oracle11g response] $chmod 700 db_install.rsp
# su-oracle
# cd / mnt/database/
$. / runInstaller-silent-force-responseFile / mnt/database/response/db_install.rsp (note to write the absolute path)
If you report an ins-13014 error, you do not need to report that some files in the ins-07001 configuration file can not be found, not for the installation
How much influence
(log file to see installation progress)
# tail-100f / u01/oracle/logs/installActions2013-06-100.004-01-32PM.log
The following indicates that the installation is successful
#! / bin/sh
# Root scripts to run
/ u01/oracle/orainstRoot.sh
/ u01/oracle/product/11.2.0/root.sh
To execute the configuration scripts:
1. Open a terminal window
2. Log in as "root"
3. Run the scripts
4. Return to this window and hit "Enter" key to continue
Successfully Setup Software.
Note: you must run the script with the root user
# / u01/oracle/orainstRoot.sh
# / u01/oracle/product/11.2.0/root.sh
[root@oracle11g 11.2.0] # su-oracle
[oracle@oracle11g ~] $ps aux | grep ora_
Oracle 18649 0.0 61188 744 pts/2 S + 16:31 0:00 grep ora_ (indicating no database) only the instance is installed
[oracle@oracle11g ~] $sql
Sqlite3 sqlldr sqlldrO sqlplus
[oracle@oracle11g ~] $sqlplus / as sysdba (error occurred, but the instance has been installed)
Sqlplus: error while loading shared libraries: / u01/oracle/product/11.2.0/lib/libclntsh.so.11.1: cannot restore segment prot after reloc: Permission denied
(turn off firewall and sensetforce)
[root@oracle11g] # iptables-L
Chain INPUT (policy ACCEPT)
Target prot opt source destination
Chain FORWARD (policy ACCEPT)
Target prot opt source destination
Chain OUTPUT (policy ACCEPT)
Target prot opt source destination
[root@oracle11g ~] # getenforce
Enforcing
[root@oracle11g ~] # setenforce 0
[root@oracle11g ~] # getenforce
Permissive
[oracle@oracle11g ~] $sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Mon Jun 10 16:40:29 2013
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL >