Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oracle 12c R2 silent installation

2025-04-08 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

1. Expand the switching partition

Dd if=/dev/zero of=/tmp/mem.swap bs=1M count=4096

/ sbin/mkswap / tmp/mem.swap

/ sbin/swapon / tmp/mem.swap

Vi / etc/fstab

/ tmp/mem.swap swap swap defaults 0 0

2. Install oracle dependency package relationship

Yum install-y binutils compat-libcap1 compat-libstdc++-33 compat-libstdc++-33.i686 glibc glibc.i686 glibc-devel glibc-devel.i686 ksh libaio libaio.i686 libaio-devel libaio-devel.i686 libX11 libX11.i686 libXau libXau.i686 libXi libXi.i686 libXtst libXtst.i686 libgcc libgcc.i686 libstdc++ libstdc++.i686 libstdc++-devel libstdc++-devel.i686 libxcb libxcb.i686 make nfs-utils net-tools smartmontools sysstat unixODBC unixODBC-devel gcc gcc-c++ libXext libXext.i686 zlib-devel zlib-devel.i686

3. Increase number of users

/ usr/sbin/groupadd oinstall

/ usr/sbin/groupadd dba

/ usr/sbin/groupadd asmadmin

/ usr/sbin/groupadd asmdba

/ usr/sbin/groupadd oper

/ usr/sbin/useradd-g oinstall-G dba,asmdba,oper oracle-d / home/oracle

4. Modify operating system parameters

A. Modify sawp greater than 4G (required)

B. Modify kernel parameters and increase operating system restrictions

Vim / etc/sysctl.conf should be modified according to your actual situation. The kernel parameters are as follows

Fs.file-max = 6815744

Kernel.sem = 250 32000 100 128

Kernel.shmmni = 4096

Kernel.shmall = 1073741824

Kernel.shmmax = 4398046511104

Kernel.panic_on_oops = 1

Net.core.rmem_default = 262144

Net.core.rmem_max = 4194304

Net.core.wmem_default = 262144

Net.core.wmem_max = 1048576

Net.ipv4.conf.all.rp_filter = 2

Net.ipv4.conf.default.rp_filter = 2

Fs.aio-max-nr = 1048576

Net.ipv4.ip_local_port_range = 9000 65500

Detailed description of each parameter:

Fs.aio-max-nr:

This parameter limits the concurrency of outstanding requests and should be set to avoid the failure of the Istroke O subsystem.

Fs.file-max:

This parameter determines the maximum number of file handles allowed in the system, and the file handle setting represents the number of files that can be opened in the linux system.

Kernel.shmall:

This parameter controls the total number of pages of shared memory that can be used. The page size of Linux shared memory is 4KB, and the size of shared memory segments is an integral multiple of the size of shared memory pages. The maximum size of a shared memory segment is 16G, so the number of pages of shared memory needs to be 16GB/4KB=16777216KB / 4KB=4194304 (pages), that is, 16GB physical memory under 64Bit system. Set kernel.shmall = 4194304 to meet the requirement.

Kernel.shmmax:

Is one of the most important core parameters that defines the maximum value of a single shared memory segment. The setting should be large enough, and a low setting may result in the need to create multiple shared memory segments, which may lead to a decline in system performance. The main reason for the system decline is that when the instance is started and the ServerProcess is created, multiple small shared memory segments may lead to a slight degradation of system performance at that time (multiple virtual address fields need to be created at startup, and there will be some impact when the process is created to let the process "identify" multiple segments), but it will not be affected at other times.

Official recommended values:

32-bit linux system: the maximum preferred value is 4GB (4294967296bytes)-1byte, which is 4294967295. The recommended value is more than half of the memory, so if 32 is the system, the value is generally 4294967295.

64-bit linux system: the maximum preferred value is the physical memory value-1byte, and the recommended value is more than half of the physical memory. For example, in the case of 12GB physical memory, it is preferable to take 12 '1024' 1024-1 '12884901887.

Kernel.shmmni:

This parameter is the maximum number of shared memory segments. The default value of shmmni is 4096, which is generally sufficient.

Kernel.sem:

Take kernel.sem = 250 32000 100128 as an example:

250 is the value of the parameter semmsl, indicating the maximum number of semaphores that can be contained in a semaphore set.

32000 is the value of the parameter semmns, indicating the maximum number of semaphores allowed in the system.

100 is the value of the parameter semopm, which represents the number of operations that a single semopm () call can perform on a semaphore set.

The value of the parameter semmni represents the total set of system semaphores.

Net.ipv4.ip_local_port_range:

Represents the range of IPv4 ports that the application can use.

Net.core.rmem_default:

The default value that represents the size of the socket receive buffer.

Net.core.rmem_max:

Represents the maximum size of the socket receive buffer.

Net.core.wmem_default:

The default value that represents the size of the socket send buffer.

Net.core.wmem_max:

Represents the maximum size of the socket send buffer.

Vim / etc/security/limits.d/20-nproc.conf

# Default limit for number of user's processes to prevent

# accidental fork bombs.

# See rhbz # 432903 for reasoning.

* soft nproc 4096

Root soft nproc unlimited

Oracle soft nofile 1024

Oracle hard nofile 65536

Oracle soft nproc 16384

Oracle hard nproc 16384

Oracle soft stack 10240

Oracle hard stack 32768

Oracle hard memlock 134217728

Oracle soft memlock 134217728

3. Create a new directory

Mkdir / u01

Mkdir / u01/app

Mkdir-p / u01/app/oracle/oradata

Chmod-R 775 / u01/app

Chown-R oracle:oinstall / U01

4. Modify environment variables

Export PATH

# Oracle Settings

Export TMP=/tmp

Export TMPDIR=$TMP

Export ORACLE_UNQNAME=cdb1

Export ORACLE_BASE=/u01/app/oracle

Export ORACLE_HOME=$ORACLE_BASE/product/12.2.0.1/db_1

Export ORACLE_SID=cdb1

Export PATH=/usr/sbin:$PATH

Export PATH=$ORACLE_HOME/bin:$PATH

Export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

Export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

Export PATH=/usr/sbin:$PATH

Export PATH=$ORACLE_HOME/bin:$PATH

Export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

Export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

Unzip linuxx64_12201_database.zip / u01

Chown-R oracle:oinstall / U01

Oracle 12c R2

Vi / u01/db_install.rsp

Oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v12.2.0

Oracle.install.option=INSTALL_DB_SWONLY

UNIX_GROUP_NAME=oinstall

INVENTORY_LOCATION=/u01/app/oracle/oraInventory

ORACLE_HOME=/u01/app/oracle/product/12.2.0.1/db_1

ORACLE_BASE=/u01/app/oracle

Oracle.install.db.InstallEdition=EE

Oracle.install.db.OSDBA_GROUP=dba

Oracle.install.db.OSOPER_GROUP=oper

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.config.starterdb.type=GENERAL_PURPOSE

Oracle.install.db.config.starterdb.globalDBName=cdb1

Oracle.install.db.config.starterdb.SID=cdb1

Oracle.install.db.config.starterdb.characterSet=AL32UTF8

SECURITY_UPDATES_VIA_MYORACLESUPPORT=false

DECLINE_SECURITY_UPDATES=true

Cd / u01/database

. / runInstaller-force-silent-noconfig-responseFile / u01/database/response/db_install.rsp

Tail-f / u01/app/oracle/oraInventory/logs/installActions2017-04-15008-36-48PM.log

6, silent configuration monitoring (switch to oracle user)

Netca-silent-responsefile / u01/database/response/netca.rsp

7. Build the database configuration file

R2

Vim / u01/database/response/dbca.rsp

ResponseFileVersion=/oracle/assistants/rspfmt_dbca_response_schema_v12.2.0//21 lines cannot be changed

GdbName=cdb1 / / 32

Sid=cdb1 / / 42

DatabaseConfigType=SI / / 52

PolicyManaged=false / / 74

CreateServerPool=false / / 88

Force=false / / 127

CreateAsContainerDatabase=true / / 163

NumberOfPDBs=1 / / 172

PdbName=cdb1pdb / / 182

UseLocalUndoForPDBs=true / / 192

TemplateName=/u01/app/oracle/product/12.2.0.1/db_1/assistants/dbca/templates/General_Purpose.dbc / / 223

EmExpressPort=5500 / / 273

RunCVUChecks=false / / 284

OmsPort=0 / / 313

DvConfiguration=false / / 341

OlsConfiguration=false / / 391

DatafileJarLocation= {ORACLE_HOME} / assistants/dbca/templates/ 401

DatafileDestination= {ORACLE_BASE} / oradata/ {DB_UNIQUE_NAME} / 411

RecoveryAreaDestination= {ORACLE_BASE} / fast_recovery_area/ {DB_UNIQUE_NAME} / / 421

StorageType=FS / / 431

The characterSet=AL32UTF8 / / 468character set cannot be changed after creating the library.

NationalCharacterSet=AL16UTF16 / / 478

RegisterWithDirService=false / / 488

Listeners=LISTENER / / 526

Variables=DB_UNIQUE_NAME=cdb1,ORACLE_BASE=/u01/app/oracle,PDB_NAME=,DB_NAME=cdb1,ORACLE_HOME=/u01/app/oracle/product/12.2.0.1/db_1,SID=cdb1 / / 546

InitParams=undo_tablespace=UNDOTBS1,memory_target=796MB,processes=300,db_recovery_file_dest_size=2780MB,nls_language=AMERICAN,dispatchers= (PROTOCOL=TCP) (SERVICE=cdb1XDB), db_recovery_file_dest= {ORACLE_BASE} / fast_recovery_area/ {DB_UNIQUE_NAME}, db_block_size=8192BYTES,diagnostic_dest= {ORACLE_BASE}, audit_file_dest= {ORACLE_BASE} / admin/ {DB_UNIQUE_NAME} / adump,nls_territory=AMERICA,local_listener=LISTENER_CDB1,compatible=12.2.0 Control_files= ("{ORACLE_BASE} / oradata/ {DB_UNIQUE_NAME} / control01.ctl", "{ORACLE_BASE} / fast_recovery_area/ {DB_UNIQUE_NAME} / control02.ctl"), db_name=cdb1,audit_trail=db,remote_login_passwordfile=EXCLUSIVE,open_cursors=300 / / 555

SampleSchema=false / / 565

MemoryPercentage=40 / / 574

DatabaseType=MULTIPURPOSE / / 584

AutomaticMemoryManagement=true / / 594

TotalMemory=0 / / 604

Dbca-silent-createDatabase-responseFile / u01/dbca1.rsp

[WARNING] [DBT-06801] Specified Fast Recovery Area size (2780 MB) is less than the recommended value.

CAUSE: Fast Recovery Area size should at least be three times the database size (2730 MB).

ACTION: Specify Fast Recovery Area Size to be at least three times the database size.

[WARNING] [DBT-11209] Current available physical memory is less than the required physical memory (796MB) for creating the database.

Enter SYS user password: # Super Admin password

Enter SYSTEM user password: # Administrator password

Enter PDBADMIN User Password: # Library password

Check oracle process status

Ps-ef | grep ora_ | grep-v grep

Lsnrctl status (lsnrctl is the oracle command)

8, login database reminder: switch to oracle user

[oracle@Oracle response] $sqlplus / as sysdba

SQL > select open_mode from v$database

SQL > select status from v$instance

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report