installation environment and system requirements (the specific parameter values and paths below are adjusted according to your environment)
Operating systems: Red Hat Enterprise Linux 6 (x86) or CentOS 6 (x64)
Database: Oracle 11g R2 32-bit for Linux or Oracle 11g R2 64-bit for Linux
Memory: At least 1G of physical memory
Swap space: 1G of memory recommended setting swap partition at least 2G
Hard disk: At least 5G hard disk space
Configuring Linux system parameters for Oracle Installation
Under root user, perform the following steps:
Premise:
1. Cat/etc/sysconfig/network (view host name)
Vi/etc/hosts (add IP and host name)
2. vi/etc/resolv.conf
This file was last added: NameServer 8.8.8.8
(1) Modify the user's shell limit, modify the/etc/security/limits.conf file
Input command: vi/etc/security/limits.conf, press I to enter edit mode, add the following content to the file.
Oracle Soft Nproc 2047
Oracle Hard Nproc 16384
Oracle Soft Nofile 1024
Oracle Hard Nofile 65536
Press ESC when editing is complete and enter ": Wq" to eject
(2) Modify the/etc/pam.d/login file, enter the command: Vi/etc/pam.d/login, press the I key to enter the editing mode, the following content to join the file.
Session required/lib64/security/pam_limits.so (/LIB64 for x86_64 machine, if the/lib is 32 for the machine, otherwise there is no sign-in phenomenon)
Session Required Pam_limits.so
Press ESC when editing is complete and enter ": Wq" to eject
(3) Modify the Linux kernel, modify the/etc/sysctl.conf file, enter the command: vi/etc/sysctl.conf, press the I key to enter the editing mode, add the following content to the file
Fs.file-max = 6815744
FS.AIO-MAX-NR = 1048576
Kernel.shmall = 2097152
Kernel.shmmax = 2147483648
Kernel.shmmni = 4096
Kernel.sem = 250 32000 100 128
Net.ipv4.ip_local_port_range = 9000 65500
Net.core.rmem_default = 4194304
Net.core.rmem_max = 4194304
Net.core.wmem_default = 262144
Net.core.wmem_max = 1048576
Press ESC when editing is complete and enter ": Wq" to eject
(4) Edit/etc/profile, enter command: Vi/etc/profile, press I to enter edit mode, add the following content to the file.
if [$USER = "Oracle"]; Then
if [$SHELL = "/bin/ksh"]; Then
Ulimit-p 16384
Ulimit-n 65536
Else
Ulimit-u 16384-n 65536
Fi
Fi
Press ESC when editing is complete and enter ": Wq" to eject
(5) Create the relevant users and groups as the owner of the software installation and Support group.
To create a user, enter a command:
Groupadd Oinstall
Groupadd dba
To create an Oracle user and password, enter the command:
USERADD-G oinstall-g dba-m Oracle
passwd Oracle
Then will let you enter the password, the password any input 2 times, but must be consistent, enter the confirmation
(6) Create database software directory and data file storage directory
Enter the command:
Mkdir/u01/app/oracle
(7) Change of directory owner is owned by Oracle user
Enter the command:
Chown-r oracle:oinstall/u01/app/oracle
(8) Configure the Yum source, complement the package
Yum install binutils compat-libcap1 vsftpd compat-libstdc++-33 iptraf gcc gcc-c++
Glibc-devel glibc elfutils-libelf-devel compat-libcap1 compat-libstdc++-33 libaio-devel ksh LIBGCC
LIBSTDC libstdc++ libstdc++-devel Libaio libaio-devel make Sysstat UnixODBC unixodbc-devel-y
Under Oracle users, perform the following steps:
(1) Configuring environment variables for Oracle users
Enter the command:
VI. bash_profile
Press I to enter edit mode to add the following:
Path= $PATH: $HOME/bin
Export Oracle_base=/u01/app/oracle
Export Oracle_home=/u01/app/oracle/product/11.2.0/dbhome_1
Export Oracle_sid=nifa
Export path= $PATH: $HOME/bin: $ORACLE _home/bin
Export Ld_library_path= $ORACLE _home/lib:/usr/lib
Press ESC when editing is complete and enter ": Wq" to save the exit. The Execute command takes effect directly from the source. Bash_profile
(2) Copy the Oracle installation package (64 bits for example) to the home directory of Linux, open the terminal command line interface, and run the unzip command to extract the Oracle installation files.
Enter the command:
Unzip Linux.x64_11gR2_database_1of2.zip
Unzip Linux.x64_11gR2_database_2of2.zip
(3) Create ORAINST.LOC (command vim/etc/orainst.loc without this file entry below save will be created)
Inventory_loc=/u01/app/oracle/orainventory
Inst_group=oinstall
Press ESC when editing is complete and enter ": Wq" to eject
(4) Silent installation software
[Email protected] ~]$ VI/HOME/ORACLE/DATABASE/RESPONSE/DB_INSTALL.RSP
[Email protected] ~]$ CAT/HOME/ORACLE/DATABASE/RESPONSE/DB_INSTALL.RSP
Oracle.install.option=install_db_swonly//installation type, only database software installed
Oracle_hostname=oracle//Host name (Command HOSTNAME query)
Unix_group_name=oinstall//Installation Group
Inventory_location=/u01/app/oracle/orainventory//inventory Directory (* * Not filled is the default value, this example needs to be modified here, because the individual created the installation directory)
SELECTED_LANGUAGES=EN,ZH_CN//Select language
Oracle_home=/u01/app/oracle/product/11.2.0/dbhome_1//Oracle_home * Path according to the table of contents notice Modify This example of the diameter/u01/app/oracle
Oracle_base=/u01/app/oracle//oracle_base * Note changes
Oracle.install.db.installedition=ee//Oracle Version
Oracle.install.db.iscustominstall=false//Custom installation, no, using 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=nifa//globaldbname
Oracle.install.db.config.starterdb.sid=nifa//SID (* * Note here is consistent with the configuration SID within the environment variable)
oracle.install.db.config.starterdb.memorylimit=81920//memory for automatic management of memory (M)
Oracle.install.db.config.starterdb.password.all=oracle//Set all database users to use the same password
Security_updates_via_myoraclesupport=false//(manual write False)
Decline_security_updates=true//* * Note This parameter setting must be True
[Email protected] ~]$ CD database/
[Email protected] database]$./database/runinstaller-silent-force-noconfig-ignoreprereq-responsefile
/home/oracle/database/response/db_install.rsp
# # # Parameter Description:
/database is the path after the installation package decompression, here according to the location of the installation package decompression changes, varies from person to person.
Runinstaller is the main installation script
-silent Silent mode
-force Mandatory Installation
-ignoreprereq Ignore warning direct installation.
-responsefile read the installation answer file.
Starting Oracle Universal Installer ...
Checking Temp space:must be greater than MB. Actual 2533 MB Passed
Checking swap space:must be greater than MB. Actual 2047 MB Passed
Preparing to launch Oracle Universal Installer from/tmp/orainstall2017-07-30_01-58-53pm. Please wait ... [[Email protected] database]$ You can find the log of this install session at:
/u01/app/oracle/orainventory/logs/installactions2017-07-30_01-58-53pm.log
The installation of Oracle Database 11g was successful.
Please check the '/u01/app/oracle/orainventory/logs/silentinstall2017-07-30_01-58-53pm.log ' for more details.
As a root user, execute the following script (s):
1./u01/app/oracle/11.2.0/product/db/root.sh
Successfully Setup software.
(5) Root execution script
[Email protected] ~]#/u01/app/oracle/11.2.0/product/db/root.sh
(6) Manually configure the monitoring, the file does not exist manually create a
[Email protected] response]$ Cat/u01/app/oracle/11.2.0/product/db/network/admin/listerer.ora
LISTENER =
(Description_list =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.1.8) (PORT = 1521))
(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521))
)
)
[Email protected] response]$ Cat/u01/app/oracle/11.2.0/product/db/network/admin/tnsnames.ora
# Tnsnames.ora Network Configuration File:/u01/app/oracle/11.2.0/product/db/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
Nifa =
(DESCRIPTION =
(Connect_data =
(SERVER = dedicated)
(service_name = Nifa)
)
)
(7) DBCA Silent Build Library:
[Email protected] bin]$ VI/HOME/ORACLE/DATABASE/RESPONSE/DBCA.RSP
[[email protected] bin]$ CAT/HOME/ORACLE/DATABASE/RESPONSE/DBCA.RSP (some values are #recoveryareadestination can use default values)
[General]
Responsefile_version = "11.2.0"
Operation_type = "CreateDatabase"
[CreateDatabase]
Gdbname = "Nifa"
SID = "Nifa"
templatename = "General_purpose.dbc"
Storagetype=fs
Datafiledestination =/oracle/app/oradata
Recoveryareadestination=/oracle/app/flash_recovery_area
CHARACTERSET = "Al32utf8"
nationalcharacterset= "Al32utf8"
Listeners=listener
TotalMemory = "7000"
Syspassword = "Oracle"
Systempassword = "Oracle"
[Email protected] bin]$ $ORACLE _HOME/BIN/DBCA-SILENT-RESPONSEFILE/HOME/ORACLE/DATABASE/RESPONSE/DBCA.RSP
Copying Database files
1% Complete
3% Complete
11% Complete
18% Complete
26% Complete
37% Complete
Creating and Starting Oracle instance
40% Complete
45% Complete
50% Complete
55% Complete
56% Complete
57% Complete
60% Complete
62% Complete
Completing Database Creation
66% Complete
70% Complete
73% Complete
85% Complete
96% Complete
100% Complete
Look at the log file '/u01/app/oracle/cfgtoollogs/dbca/nifa/nifa.log ' for further details.
(8) Check whether the Oracle instance is running properly
[Email protected] ~]$ Ps-ef|grep Ora_pmon
Oracle 3400 5309 0 18:01 pts/1 00:00:00 grep ora_pmon
Oracle 31779 1 0 15:45? 00:00:01 Ora_pmon_nifa
[Email protected] ~]$ Sqlplus/as SYSDBA
Sql*plus:release 11.2.0.4.0 Production on Sun Jul 30 18:01:53 2017
Copyright (c) 1982, Oracle. All rights reserved.
centos6.8 silent installation of Oracle 11.2.0.4