Oracle 12C R2 Silent Installation Documentation

Source: Internet
Author: User
Tags create directory dba iptables

disabling firewalls
/etc/init.d/iptables stop
/etc/init.d/ip6tables stop
Chkconfig iptables off


Disable SELinux
Cat/etc/selinux/config
--Change into selinux=disabled
# This file controls the state of the SELinux on the system.
# selinux= can take one of these three values:
# Enforcing-selinux security policy is enforced.
# Permissive-selinux Prints warnings instead of enforcing.
# disabled-no SELinux policy is loaded.
Selinux=disabled
# selinuxtype= can take one of these the values:
# targeted-targeted processes is protected,
# Mls-multi level Security protection.
selinuxtype=targeted


Temporarily close SELinux
Setenforce 0


vi/etc/sysctl.conf Add the following content:
KERNEL.MSGMNB = 65536
Fs.file-max = 6815744
Kernel.msgmni = 2878
Kernel.msgmax = 8192
KERNEL.MSGMNB = 65536
Kernel.sem = 250 32000 100 142
Kernel.shmmni = 4096
Kernel.shmall = 1073741824
Kernel.shmmax = 4398046511104
KERNEL.SYSRQ = 1
Net.core.rmem_default = 1048576
Net.core.rmem_max = 4194304
Net.core.wmem_default = 262144
Net.core.wmem_max = 1048576
FS.AIO-MAX-NR = 3145728
Net.ipv4.ip_local_port_range = 9000 65500
Vm.min_free_kbytes = 51200


Effect:
Sysctl-p

vi/etc/security/limits.conf Add the following content:
Oracle Soft Nofile 1024
Oracle Hard Nofile 65536
Oracle Soft Nproc 2047
Oracle Hard Nproc 16384
Oracle Soft Stack 10240
Oracle Hard Stack 32768


Vi/etc/pam.d/login
Session Required Pam_limits.so

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

Create groups and users
/usr/sbin/groupadd Oinstall
/usr/sbin/groupadd DBA
/USR/SBIN/USERADD-G oinstall-g dba Oracle

If the Oracle user already exists
[Email protected] response]$/usr/sbin/usermod-g oinstall-g dba Oracle

[Email protected] response]$ echo Oracle | passwd--stdin Oracle


Install dependent packages
# Linux 6
Yum install-y gcc gcc-c++ glibc glibc-devel libaio libaio-devel libgcc libstdc++ libstdc++ -devel libxext libxtst libX11 libxau libxi make Sysstat unixodbc-devel unixODBC ksh compat-libcap1 compat-libstdc++-33

# Linux 7
Yum install-y binutils* compat-libcap1* compat-libstdc++* glibc* glibc-devel* ksh* libx11* libXau* LibX i* libxtst* libaio* libaio-devel* libgcc* libstdc++* libstdc++-devel* libxcb* make* net-tools* nfs-utils* smartmontools* s ysstat* unixodbc* binutils*686* compat-libcap1*686* compat-libstdc++*686* glibc*686* glibc-devel*686* ksh*686* libX11* 686* libxau*686* libxi*686* libxtst*686* libaio*686* libaio-devel*686* libgcc*686* libstdc++*686* libstdc++-devel*686* libxcb*686* make*686* net-tools*686* nfs-utils*686* smartmontools*686* sysstat*686* unixODBC*686*

Create directory structure

Mkdir-p/home/software
Mkdir-p/home/app/oracle
Mkdir-p/home/app/oracle/admin/lgjdb/adump
Mkdir-p/home/app/oracle/admin/lgjdb/dpdump
Mkdir-p/home/app/oracle/admin/lgjdb/pfile
Mkdir-p/home/app/oracle/audit
Mkdir-p/home/app/oracle/cfgtoollogs/dbca/lgjdb
Mkdir-p/home/app/oracle/oradata/lgjdb
Mkdir-p/home/app/oracle/product/12.2.0.1/db_1/dbs

[Email protected] response]$ chown-r Oracle:oinstall/home/app
[Email protected] response]$ chmod-r 775/home/app

Setting environment variables
[Email protected] response]$ Vi/home/oracle/.bash_profile
Export Oracle_base=/home/app/oracle
Export Oracle_home= $ORACLE _base/product/12.2.0.1/db_1/
Export Oracle_sid=lgjdb
Export path= $ORACLE _home/bin: $PATH: $HOME/bin
Export PATH

[Email protected] response]$ cat/etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
:: 1 localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.56.18 hcdb


Adjust answer file templates

oracle.install.responsefileversion=/oracle/install/rspfmt_dbinstall_response_schema_v12.2.0
Oracle.install.option=install_db_swonly
Unix_group_name=oinstall
Inventory_location=/home/app/orainventory
Oracle_home=/home/app/oracle/product/12.2.0.1/db_1
Oracle_base=/home/app/oracle
Oracle.install.db.installedition=ee
Oracle.install.db.osdba_group=dba
Oracle.install.db.osoper_group=dba
Oracle.install.db.osbackupdba_group=dba
Oracle.install.db.osdgdba_group=dba
Oracle.install.db.oskmdba_group=dba
Oracle.install.db.osracdba_group=dba
Oracle.install.db.rac.configurationtype=
oracle.install.db.cluster_nodes=
Oracle.install.db.israconeinstall=false
Oracle.install.db.raconeservicename=
Oracle.install.db.rac.serverpoolname=
oracle.install.db.rac.serverpoolcardinality=
Oracle.install.db.config.starterdb.type=
Oracle.install.db.config.starterdb.globaldbname=
Oracle.install.db.config.starterdb.sid=
oracle.install.db.configureascontainerdb=
Oracle.install.db.config.pdbname=
Oracle.install.db.config.starterdb.characterset=al32utf8
oracle.install.db.config.starterdb.memoryoption=
oracle.install.db.config.starterdb.memorylimit=16384
oracle.install.db.config.starterdb.installexampleschemas=
Oracle.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.dbsnmp=
oracle.install.db.config.starterdb.password.pdbadmin=
oracle.install.db.config.starterdb.managementoption=
oracle.install.db.config.starterdb.omshost=
oracle.install.db.config.starterdb.omsport=
Oracle.install.db.config.starterdb.emadminuser=
oracle.install.db.config.starterdb.emadminpassword=
oracle.install.db.config.starterdb.enablerecovery=
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=false
Decline_security_updates=true
Oracle.installer.autoupdates.option=skip_updates
proxy_host=
proxy_port=
Proxy_user=
Proxy_pwd=
Collector_supporthub_url=


Installing Oracle Software
[Email protected] response]$ pwd
/home/software/database

[Email protected] response]$ chmod 700/HOME/SOFTWARE/DATABASE/RESPONSE/MY_DB_INSTALL.RSP


[Email protected] response]$./runinstaller-silent-force-ignoreprereq-responsefile/home/software/database/ Response/my_db_install.rsp

When it appears:
As a root user, execute the following script (s):
1./home/app/orainventory/orainstroot.sh
2./home/app/oracle/product/12.2.0.1/db_1/root.sh

Successfully Setup software.

Switch to the root user to execute the prompt script
Confirm execution

Success. To this, the Oracle software has been silently installed.

Silent Configuration Monitoring

[Email protected] response]$ NETCA-SILENT-RESPONSEFILE/HOME/SOFTWARE/DATABASE/RESPONSE/NETCA.RSP

Create a database silently

Create data File storage location
[Email protected] response]$ Mkdir–p/home/oradata
[Email protected] response]$ chown Oracle:oinstall/home/oradata

Dbca-silent-createdatabase-templatename GENERAL_PURPOSE.DBC \
-gdbname Lgjdb-sid lgjdb \
-responsefile no_value \
-syspassword Oracle \
-systempassword Oracle \
-emconfiguration NONE \
-recoveryareadestination NONE \
-datafiledestination/home/oradata \
-redologfilesize 200 \
-sampleschema false \
-automaticmemorymanagement true \
-initparams processes=500,audit_trail=none \
-characterset Al32utf8 \
-nationalcharacterset al16utf16 \
-memorypercentage 40

Parameter description:
1.gdbname represents the global database name
2.SID represents the database instance name, SID is the same as service_name in a single instance environment
3.–responsefile answer file, no use here, so it's no_value.
4.SysPassword, Systempassword is the password of the Sys,system user respectively
5.–emconfiguration, Recoveryareadestination here is the shutdown of the OEM, the function of the flashback zone, the use of the current network is generally not open these features
6.DatafileDestination indicates where the data files are stored
7.redoLogFileSize Redo log size, Unit is m, the default is only 50M, should be adjusted according to actual needs, here to adjust to 200M
8.sampleSchema If you need to create a sample user (Scott,sh,... )
9.automaticMemoryManagement whether automatic memory management is enabled
10.initParams can be followed by a number of parameter = value form, with a comma interval, here to test the adjustment of database connections and the Shutdown database audit function two parameters, you can configure the required parameters as needed.
11.characterSet set character sets, after the creation of the database, it is not possible to adjust, or adjustment is very difficult, so be sure to use before the implementation of the character set.
12.nationalCharacterSet setting the national character set
13.memoryPercentage sets the percentage of physical memory that Oracle uses the server in total


Login Verification:
Set Linesize 500
Set pagesize 999
Col comp_id for A20
Col Comp_name for A40
Col VERSION for A20
Col STATUS for A20
Select Comp_id,comp_name,version,status from Sys.dba_registry;


comp_id comp_name VERSION STATUS
-------------------- ---------------------------------------- -------------------- --------------------
Catalog Oracle Database catalog views 12.2.0.1.0 VALID
Catproc Oracle Database Packages and Types 12.2.0.1.0 VALID
JAVAVM jserver JAVA Virtual machine 12.2.0.1.0 VALID
XML Oracle XDK 12.2.0.1.0 VALID
Catjava Oracle Database Java Packages 12.2.0.1.0 VALID
APS OLAP Analytic Workspace 12.2.0.1.0 VALID
RAC Oracle Real Application Clusters 12.2.0.1.0 OPTION OFF
XDB Oracle XML Database 12.2.0.1.0 VALID
OWM Oracle Workspace Manager 12.2.0.1.0 VALID
CONTEXT Oracle Text 12.2.0.1.0 VALID
Ordim Oracle Multimedia 12.2.0.1.0 VALID
SDO Spatial 12.2.0.1.0 VALID
Xoq Oracle OLAP API 12.2.0.1.0 VALID
OLS Oracle Label Security 12.2.0.1.0 VALID
DV Oracle Database Vault 12.2.0.1.0 VALID

Rows selected.


Viewing the Listening status
[Email protected] response]$ lsnrctl status

Lsnrctl for linux:version 12.2.0.1.0-production on 24-may-2018 01:18:41

Copyright (c) 1991, Oracle. All rights reserved.

Connecting to (description= (address= (protocol=tcp) (host=hcdb))
STATUS of the port=1521
-------- ----------------
Alias LISTENER
Version Tnslsnr for linux:version 12.2.0.1.0-production
Start Date 24- MAY-2018 00:36:52
Uptime 0 days 0 hr. The min. SEC
Trace level off
Security on:local OS authentication
SNMP OFF
Listener Parameter file/home/app/oracle/product/12.2.0.1/db_1/network/admin/listener.ora
Listener Log File/home/app/oracle/diag/tnslsnr/hcdb/listener/alert/log.xml
Listening Endpoints Summary ...
(description= (address= (protocol=tcp) (HOST=HCDB) (port=1521))
(description= (address= (PROTOCOL=IPC) (KEY= EXTPROC1521)))
Services Summary ... The
Service "Lgjdb" has 1 instance (s).
Instance "Lgjdb", status ready, have 1 handler (s) for the This service ... The
Service "Lgjdbxdb" has 1 instance (s).
Instance "Lgjdb", status ready, have 1 handler (s) for the This service ...
The command completed successfully

Oracle 12C R2 silent Installation documentation

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.