preface

With the widespread use of Oracle database, everyone needs to install Oracle database more or less, such as application launch, application test, recovery drill, version upgrade and so on. As DBA operation and maintenance personnel often engaged in this kind of work, I believe that we are tired of these repetitive work, tedious and boring. In the trend of universal automation, one-click installation scripts came into being, so how to use scripts? Direct command: . / OracleShellInstall. Sh -i 10.211.55.100

Notes: The simplest single-node installation, just run the script to follow the host IP address, you can install the Oracle database in one click.

Download the script at the end of the article

1. Script introduction

This script is written by shell command and can be installed in a single machine or RAC cluster. Just fill in a single line of commands and you’ll be free to install your Oracle database.

Function:

Configure the operating system. 2. Install the Grid software. 3. Install PSU&&RU patch 5. Create database 6. Optimize databaseCopy the code
Current support:

ORACLE versions: 11GR2, 12CR2, 18C, 19C.

OS versions: Linux6(x86_64), Linux7(x86_64), and Linux8(x86_64).

Including Single and Oracle Real Cluster modes.

Currently, only two nodes are supported for RAC installation.

2. Script commands

The script must be executed as user Root:

chmod +x OracleShellInstall.sh

1. Single mode installation
cd/soft./ oracleshellinstall. sh -i 10.211.55.100 '#Public ip`\
-n single `# hostname`\
-o nocdb `# oraclesid`\
-op oracle `# oracle user password`\
-b /oracle/app `# install basedir`\
-s AL32UTF8 `# characterset`\
-opa 31537677 `# oracle psu number`
Copy the code
2. Install Oracle Rac mode
cd/soft./ oracleshellinstall. sh -i 10.211.55.100 '#Public ip`\
-n rac `# hostname`\
-rs oracle `# root password`\
-op oracle `# oracle password`\
-gp oracle `# grid password`\
-b /u01/app `# install basedir`\
-o nocdb `# oraclesid`\
-s AL32UTF8 `# characterset`\- PB1 10.211.55.100 - PB2 10.211.55.101 '# node public ip`\- VI1 10.211.55.102 -vi2 10.211.55.103 '# node virtual ip`\- PI1 10.10.1.1 - PI2 10.10.1.2# node private ip`\
-puf eth0 -prf eth1 `# network fcname`\- si 10.211.55.105 `# scan ip`\
-dd /dev/sde,/dev/sdf `# asm data disk`\
-od /dev/sdb,/dev/sdc,/dev/sdd `# asm ocr disk`\
-or EXTERNAL `# asm ocr redundancy`\
-dr EXTERNAL `# asm data redundancy`\
-on OCR `# asm ocr diskgroupname`\
-dn DATA `# asm data diskgroupname`\
-gpa 32580003 `# GRID PATCH`
Copy the code

Script testing

Linux system installation can refer to the article:

How to play Linux installation on Windows host, just read this article

Teach you three steps to install Linux on MacOS

1. Create a software directory, for example, /soft

mkdir /soft

2. Mount the image ISO file
## 1. Mount via Cdrom
mount /dev/cdrom /mnt
## 2. Mount by installing the image sourceMount -o loop /soft/ Rhel-server-7.9-x86_64-DVD. iso/MNTCopy the code

3. Upload the installation media and scripts to the software directory
## Install shell script with one click
140K	OracleShellInstall.sh
Oracle 11GR2 installation package1.3 G p13390677_112040_Linux - x86-64 _1of7.zip 1.1 G p13390677_112040_Linux - x86-64 _2of7. ZipGrant script execution permission
chmod +x OracleShellInstall.sh
Copy the code

4. Perform installation:

. / OracleShellInstall. Sh -i 10.211.55.100 After 5-10 minutes, the installation is successful.

5. Database connection

Create a connection user: PLSQL connections: More advanced use recommendations:

15 minutes! Single-click Oracle 12CR2 standalone CDB+PDB for 20 minutes! Single-click Oracle 18C CDB+PDB deployment in 25 minutes! One-click Oracle 11GR2 HA cluster deployment 30 minutes! One-click Oracle 19C standalone CDB+PDB deployment 1.5 hours! One-click Deployment of Oracle 11GR2 RAC clusters

Script download address:

1.GitHub

2. SHELL script to install the Oracle database in one click to implement unattended installation

About me:

Lucifer: Lucifer

CSDN Blog: Lucifer Think before you think

Think twice before you act

The following is the qr code picture of my official account, welcome to follow.