First, the implementation of the preparatory work
- 1.1 Server Installation Operating system
- 1.2 Oracle installation media
- 1.3 Shared storage Planning
- 1.4 Network Specification Assignment
Second, pre-installation preparation work
- 2.1 System time proofreading for each node
- 2.2 Each node shuts down the firewall and SELinux
- 2.3 Each node check the system dependency package installation situation
- 2.4 Each node configuration/etc/hosts
- 2.5 Create required users and groups for each node
- 2.6 Creating the installation directory for each node
- 2.7 System configuration file modification for each node
- 2.8 Setting user environment variables for each node
Linux platform Oracle 18c RAC Installation Guide:
Part1:linux platform Oracle 18c RAC installation Part1: Prepare for work
Part2:linux platform Oracle 18c RAC installation PART2:GI configuration
Part3:linux platform Oracle 18c RAC installation PART3:DB installation
This article installs the environment: OEL 7.5 + Oracle 18.3 GI & RAC
First, pre-implementation preparation work 1.1 server installation operating system
Configure exactly the same two servers and install the same version of the Linux operating system. The system CD or image file is retained.
I'm OEL7.5 here. The system directory size is the same. The system image file corresponding to the OEL7.5 is placed on the server for subsequent configuration of local yum.
1.2 Oracle installation media Oracle 18.3 version 2 ZIP package (total size 9g+, note space):
Linux. X64_180000_grid_home.zip md5:cd42d137fd2a2eeb4e911e8029cc82a9
Linux. X64_180000_db_home.zip Md5:99a7c4a088a8a502c261e741a8339ae8
This is the Oracle website to download, and then only need to upload to Node 1.
1.3 Shared storage planning partition two hosts from storage can see the share lun,3 1G disk as OCR and voting disk,1 40G disk do Gimr, the rest of the planning to do data disk and FRA.
Choose Multipath or Udev to bind the device according to actual needs. Multipath bindings are chosen here.
multipath -llmultipath -Fmultipath -v2multipath -ll
I'm here. The storage partition LUN is simulated by an iSCSI server, the following is the main configuration information of the service side:
O/... ... ..... ... ..... ..... ..... ..... ..... ..... ..... .................. ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... ...... ..... ..... [...] O-backstores .............................................................................................................. [ ...] | O-block ..... ..... .... ..... ......................... ..... ..... ..... ..... ..... .............. .......... [Storage Objects:8] | | O-disk1 ..... ..... ..... ..... ..... ................-.....-........ [/dev/mapper/vg_storage-lv_lun1 (1.0GiB) write-thru activated] | | | O-alua ..... ..... ..... ..... .......................... ..... ..... ..... ..... ..... .............. .......... [ALUA groups:1] | | | O-default_tg_pt_gp ... .... ... .... ... ... ... .... ... .... ... .... ... .... ..... ..... ..... ..... ..... ......, ... and ... and ..... .....-...... [ALUA state:active/optimized] | | O-disk2 ..... ..... ..... ..... ..... ................-.....-........ [/dev/mapper/vg_storage-lv_lun2 (1.0GiB) write-thru activated] | | | O-alua ... ..... .... ... ..... ..... .... ..... ..... ........, ... and .... .....-.................................................. [ALUA groups:1] | | | O-default_tg_pt_gp ... .... ... .... ... ... ... .... ... .... ... .... ... .... ..... ..... ..... ..... ..... ......, ... and ... and ..... .....-...... [ALUA state:active/optimized] | | O-disk3 ..... ..... ..... ..... ..... ................-.....-........ [/dev/mapper/vg_storage-lv_lun3 (1.0GiB) write-thru activated] | | | O-alua ..... ..... ..... ..... .......................... ..... ..... ..... ..... ..... .............. .......... [ALUA groups:1] | | | O-default_tg_pt_gp ... .... ... .... ... ... ... .... ... .... ... .... ... .... ..... ..... ..... ..... ..... ......, ... and ... and ..... .....-...... [ALUA state:active/optimized] | | O-disk4 ..... ..... ..... ..... ..... .......................... [/dev/mapper/vg_storage-lv_lun4 (40.0GiB) write-thru activated] | | | O-alua ..... ..... ..... ..... .......................... ..... ..... ..... ..... ..... .............. .......... [ALUA groups:1] | | | O-default_tg_pt_gp ... .... ... .... ... ... ... .... ... .... ... .... ... .... ..... ..... ..... ..... ..... ......, ... and ... and ..... .....-...... [ALUA state:active/optimized] | | O-disk5 ..................................................... [/dev/mapper/vg_storage-lv_lun5 (10.0GiB) write-thru activated] | | | O-alua ..... ..... ..... ..... .......................... ..... ..... ..... ..... ..... .............. .......... [ALUA groups:1] | | | O-default_tg_pt_gp ... .... ... .... ... ... ... .... ... .... ... .... ... .... ..... ..... ..... ..... ..... ......, ... and ... and ..... .....-...... [ALUA state:active/optimized] | | O-disk6 ..... ..... ..... ..... ..... .......................... [/dev/mapper/vg_storage-lv_lun6 (10.0GiB) write-thru activated] | | | O-alua ..... ..... ..... ..... .......................... ..... ..... ..... ..... ..... .............. .......... [ALUA groups:1] | | | O-default_tg_pt_gp ... .... ... .... ... ... ... .... ... .... ... .... ... .... ..... ..... ..... ..... ..... ......, ... and ... and ..... .....-...... [ALUA state:active/optimized] | | O-disk7 ..... ..... ..... ..... ..... .......................... [/dev/mapper/vg_storage-lv_lun7 (10.0GiB) write-thru activated] | | | O-alua ........ ...................... ....................... ........................... [ALUA groups:1] | | | O-default_tg_pt_gp ... .... ... .... ... ... ... .... ... .... ... .... ... .... ..... ..... ..... ..... ..... ......, ... and ... and ..... .....-...... [ALUA state:active/optimized] | | O-disk8 ..... ..... ..... ..... ..... .......................... [/dev/mapper/vg_storage-lv_lun8 (16.0GiB) write-thru activated] | | O-alua ..... ..... ..... ..... .......................... ..... ..... ..... ..... ..... .............. .......... [ALUA groups:1] | | O-default_tg_pt_gp ... .... ... .... ... ... ... .... ... .... ... .... ... .... ..... ..... ..... ..... ..... ......, ... and ... and ..... .....-...... [ALUA state:active/optimized] | O-fileio ..... ..... .... ..... ......................... ..... ..... ..... ..... ..... ............. .......... [Storage objects:0] | O-pscsi ..... ..... .... ..... ......................... ..... ..... ..... ..... ..... .............. .......... [Storage objects:0] | O-ramdisk ..... ..... ..... ........................... ..... ..... ..... ..... ..... ............. .......... [Storage objects:0] o-iscsi ......... ........................................................................................... [Targets:1] | o-iqn.2003-01.org.linux-iscsi.storage-c.x8664:sn.bc3a6511567c ....................................................... [Tpgs:1] | O-tpg1 ..... ..... ..... ........................... ..... ..... ..... ..... .............. ........... [No-gen-acls, No-auth] | O-acls .......................................................................................................... [Acls:1] | | O-iqn.2003-01.org.linux-iscsi.storage-c.x8664:sn.bc3a6511567c:client ........ ................... [Mapped Luns:8] | | O-mapped_lun0 ........ ....................... ....................... ........ [Lun0 block/disk1 (rw)] | | O-mapped_lun1 ........ ....................... ....................... ........ [Lun1 block/disk2 (rw)] | | O-mapped_lun2 ........ ....................... ....................... ........ [Lun2 bLOCK/DISK3 (rw)] | | O-mapped_lun3 ........ ....................... ....................... ........ [Lun3 BLOCK/DISK4 (rw)] | | O-mapped_lun4 ........ ....................... ....................... ........ [Lun4 block/disk5 (rw)] | | O-mapped_lun5 ........ ....................... ....................... ........ [Lun5 block/disk6 (rw)] | | O-mapped_lun6 ........ ....................... ....................... ........ [Lun6 block/disk7 (rw)] | | O-mapped_lun7 ........ ....................... ....................... ........ [Lun7 block/disk8 (rw)] | O-luns .......................................................................................................... [Luns:8] | | O-lun0 ..... ..... ..... ........................... [Block/disk1 (/DEV/MAPPER/VG_STORAGE-LV_LUN1) (DEFAULT_TG_PT_GP)] | | O-lun1 ........ .............................. [Block/disk2 (/DEV/MAPPER/VG_STORAGE-LV_LUN2) (DEFAULT_TG_PT_GP)] | | O-lun2 ..... ..... ..... ........................... [Block/disk3 (/DEV/MAPPER/VG_STORAGE-LV_LUN3) (DEFAULT_TG_PT_GP)] | | O-lun3 ..... ..... ..... ........................... [Block/disk4 (/DEV/MAPPER/VG_STORAGE-LV_LUN4) (DEFAULT_TG_PT_GP)] | | O-lun4 ..... ..... ..... ........................... [Block/disk5 (/DEV/MAPPER/VG_STORAGE-LV_LUN5) (DEFAULT_TG_PT_GP)] | | O-lun5 ..... ..... ..... ........................... [Block/disk6 (/DEV/MAPPER/VG_STORAGE-LV_LUN6) (DEFAULT_TG_PT_GP)] | | O-lun6 ..... ..... ..... ........................... [Block/disk7 (/DEV/MAPPER/VG_STORAGE-LV_LUN7) (DEFAULT_TG_PT_GP)] | | O-lun7 ..... ..... ..... ........................... [Block/disk8 (/DEV/MAPPER/VG_STORAGE-LV_LUN8) (DEFAULT_TG_PT_GP)] | O-portals ..... ..... ..... ..... .......................... ..... ..... ..... ..... ..... ............... ......... [Portals:1] | o-0.0.0.0:3260 ..................................................................................................... [OK] O-loopback ......................................................................................................... [targets:0]/>
The relevant knowledge points in this section can refer to the previous article:
- Multipath Multi-Path Experiment 01-building an iSCSI simulation environment
- Multipath Multi-Path Experiment 02-Configuring Multipathing Software
- RHEL7 Configuring the iSCSI Simulation Environment
The simplest configuration for Udev + multipath (can be done after subsequent user creation):
# vi /etc/udev/rules.d/12-dm-permissions.rulesENV{DM_UUID}=="mpath-?*", OWNER:="grid", GROUP:="asmadmin", MODE:="660"# udevadm control --reload# udevadm trigger
1.4 Network Specification Assignment
Public networks and private networks.
Public network: Here the experimental environment is the ENP0S3 is publicly ip,enp0s8 is private ip,enp0s9 and ENP0S10 is used to simulate the ipsan of two networks. The actual production needs to adjust the planning according to the actual situation.
Second, pre-installation preparation work 2.1 Each node system time proofreading
System time proofreading for each node:
--检验时间和时区确认正确date --关闭chrony服务,移除chrony配置文件(后续使用ctss)systemctl list-unit-files|grep chronydsystemctl status chronydsystemctl disable chronydsystemctl stop chronydmv /etc/chrony.conf /etc/chrony.conf_bak
Here, the lab environment chooses not to use NTP and chrony, so that Oracle automatically uses its own CTSS service.
2.2 Each node shuts down the firewall and selinux each node shuts down the firewall:
systemctl list-unit-files|grep firewalldsystemctl status firewalldsystemctl disable firewalldsystemctl stop firewalld
Each node shuts down SELinux:
getenforcecat /etc/selinux/config手工修改/etc/selinux/config SELINUX=disabled,或使用下面命令:sed -i ‘/^SELINUX=.*/ s//SELINUX=disabled/‘ /etc/selinux/configsetenforce 0
Finally verify that each node has been turned off SELinux.
2.3 Each node check the system dependency package installation situation
yum install -y oracle-database-server-12cR2-preinstall.x86_64
In the OEL7.5 or 12cr2-preinstall name, and does not correspond to 18c, but the actual test, in the dependency on the package is basically no difference.
If you are using other Linux, such as Common Rhel, you will need yum to install the required dependencies for the official documentation.
2.4 Each node configuration/etc/hosts edit/etc/hosts file:
#public ip192.168.1.40 db40192.168.1.42 db42#virtual ip192.168.1.41 db40-vip192.168.1.43 db42-vip#scan ip192.168.1.44 db18c-scan#private ip10.10.1.40 db40-priv10.10.1.42 db42-priv
2.5 Create required users and groups for each node
Create group & user to set the password for Oracle and grid:
groupadd -g 54321 oinstall groupadd -g 54322 dba groupadd -g 54323 oper groupadd -g 54324 backupdba groupadd -g 54325 dgdba groupadd -g 54326 kmdba groupadd -g 54327 asmdba groupadd -g 54328 asmoper groupadd -g 54329 asmadmin groupadd -g 54330 racdba useradd -u 54321 -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba,racdba,oper oracle useradd -u 54322 -g oinstall -G asmadmin,asmdba,asmoper,dba grid echo oracle | passwd --stdin oracleecho oracle | passwd --stdin grid
I'm here. The test environment setting password is Oracle, and the actual production environment recommends setting a complex password that conforms to the specification.
2.6 Each node creates an installation directory each node creates the installation directory (root user):
mkdir -p /u01/app/18.3.0/gridmkdir -p /u01/app/gridmkdir -p /u01/app/oraclechown -R grid:oinstall /u01chown oracle:oinstall /u01/app/oraclechmod -R 775 /u01/
2.7 System configuration file modification for each node
Kernel parameter modification: vi/etc/sysctl.conf
In fact, OEL also modifies these values when installing the dependent packages, the following parameters are mainly for checking or for the Rhel version as a reference:
# vi /etc/sysctl.conf 增加如下内容:vm.swappiness = 1vm.dirty_background_ratio = 3vm.dirty_ratio = 80vm.dirty_expire_centisecs = 500vm.dirty_writeback_centisecs = 100kernel.shmmni = 4096 kernel.shmall = 1073741824 kernel.shmmax = 4398046511104kernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048576 fs.aio-max-nr = 1048576fs.file-max = 6815744kernel.panic_on_oops = 1net.ipv4.conf.enp0s8.rp_filter = 2net.ipv4.conf.enp0s9.rp_filter = 2net.ipv4.conf.enp0s10.rp_filter = 2
Changes to take effect:
#sysctl -p /etc/sysctl.conf
Note: Enp0s9 and ENP0S10 are Ipsan dedicated network cards, the same as the private network settings loose mode.
#sysctl -p /etc/sysctl.d/98-oracle.confnet.ipv4.conf.enp0s8.rp_filter = 2net.ipv4.conf.enp0s9.rp_filter = 2net.ipv4.conf.enp0s10.rp_filter = 2
User Shell restrictions: vi/etc/security/limits.d/99-grid-oracle-limits.conf
oracle soft nproc 16384oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536oracle soft stack 10240oracle hard stack 32768grid soft nproc 16384grid hard nproc 16384grid soft nofile 1024grid hard nofile 65536grid soft stack 10240grid hard stack 32768
It is important to note that the OEL auto-configured/etc/security/limits.d/oracle-database-server-12cr2-preinstall.conf does not contain grid users and can be manually added.
vi/etc/profile.d/oracle-grid.sh
#Setting the appropriate ulimits for oracle and grid userif [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -u 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fifiif [ $USER = "grid" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -u 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fifi
There is no automatic configuration in this oel, which requires manual configuration.
2.8 Setting user environment variables for each node
1th node Grid User:
export ORACLE_SID=+ASM1;export ORACLE_BASE=/u01/app/grid;export ORACLE_HOME=/u01/app/18.3.0/grid;export PATH=$ORACLE_HOME/bin:$PATH;export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
2nd node Grid User:
export ORACLE_SID=+ASM2;export ORACLE_BASE=/u01/app/grid;export ORACLE_HOME=/u01/app/18.3.0/grid;export PATH=$ORACLE_HOME/bin:$PATH;export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
1th Node Oracle User:
export ORACLE_SID=cdb1;export ORACLE_BASE=/u01/app/oracle;export ORACLE_HOME=/u01/app/oracle/product/18.3.0/db_1;export PATH=$ORACLE_HOME/bin:$PATH;export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
2nd node Oracle User:
export ORACLE_SID=cdb2;export ORACLE_BASE=/u01/app/oracle;export ORACLE_HOME=/u01/app/oracle/product/18.3.0/db_1;export PATH=$ORACLE_HOME/bin:$PATH;export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
Linux platform Oracle 18c RAC installation Part1: Ready to work