当前位置: 首页 > news >正文

RHEL7+Oracle11.2 RAC集群-多路径(multipath+udev)安装步骤

RHEL7+Oracle11.2RAC集群-多路径(multipath+udev)安装

配置虚拟存储

使用StarWind Management Console软件,配置存储

dggrid1: 1g*3

Dggrid2: 1g*3

Dgsystem: 5g*1 系统表空间,临时表空间,UNDO,参数文件,控制文件,重做日志文件

Dgrecovery:2g=2G*1 归档日志,一周归档量

Dgdata01: 4g=2G*2 生产数据空间

环境说明:
#public ip
172.30.21.171 hferp71
172.30.21.172 hferp72
#priv ip
10.10.10.71 hferp71prv
10.10.10.72 fgerp72prv
#vip ip
172.30.21.173 hferp71vip
172.30.21.174 hferp72vip
#scan ip
172.30.21.175 hferpdbscandb name:hferpdb
instance name:hferpdb1、hferpdb2

image-20241126084830973

image-20241126084904055

image-20241126084913910

image-20241126084920765

image-20241126084930323

image-20241126085002687

image-20241126085014344

配置iscsi连接存储

配置虚拟机参数

disk.EnableUUID = “TRUE”

cat /etc/inittab 设置不使用图形化界面

systemctl set-default multi-user.target

挂载光驱

mount /dev/cdrom /mnt

安装iscsi软件

rpm -ivh /mnt/Packages/iscsi-initiator-utils-6.2.0.874-10.el7.x86_64.rpm

cat /etc/iscsi/initiatorname.iscsi

echo “options=–whitelisted --replace-whitespace” > /etc/scsi_id.config

启动iscsi–开机启动

systemctl enable iscsi

systemctl start iscsi

iscsiadm -m discovery -t st -p 172.30.21.176

iscsiadm -m discovery -t st -p 172.30.21.177

iscsiadm -m discovery -t st -p 172.30.21.178

iscsiadm -m discovery -t st -p 172.30.21.154

image-20241126085917273

iscsiadm -m node -T iqn.2008-08.com.starwindsoftware:172.30.21.154-hferpdb -p 172.30.21.176:3260 -l

iscsiadm -m node -T iqn.2008-08.com.starwindsoftware:172.30.21.154-hferpdb -p 172.30.21.177:3260 -l

iscsiadm -m node -T iqn.2008-08.com.starwindsoftware:172.30.21.154-hferpdb -p 172.30.21.178:3260 -l

iscsiadm -m node -T iqn.2008-08.com.starwindsoftware:172.30.21.154-hferpdb -p 172.30.21.154:3260 -l

image-20241126090005979

image-20241126090010816

检查磁盘:

[root@hferp71 ~]# fdisk -l |grep "Disk /dev"
Disk /dev/sda: 85.9 GB, 85899345920 bytes, 167772160 sectors
Disk /dev/sdb: 107.4 GB, 107374182400 bytes, 209715200 sectors
Disk /dev/sdc: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/sdd: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/sde: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/sdf: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/sdg: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/sdi: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/sdj: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/sdk: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/sdh: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/sdl: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/sdo: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/sdp: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/sdr: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/sdq: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/sdm: 5368 MB, 5368709120 bytes, 10485760 sectors
Disk /dev/sdn: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/sds: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/sdu: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/sdw: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/sdx: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/sdt: 2147 MB, 2147483648 bytes, 4194304 sectors
Disk /dev/sdz: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/sdaa: 5368 MB, 5368709120 bytes, 10485760 sectors
Disk /dev/sdy: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/sdab: 2147 MB, 2147483648 bytes, 4194304 sectors
Disk /dev/sdae: 2147 MB, 2147483648 bytes, 4194304 sectors
Disk /dev/sdv: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/sdac: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/sdag: 5368 MB, 5368709120 bytes, 10485760 sectors
Disk /dev/sdai: 2147 MB, 2147483648 bytes, 4194304 sectors
Disk /dev/sdad: 2147 MB, 2147483648 bytes, 4194304 sectors
Disk /dev/sdaf: 2147 MB, 2147483648 bytes, 4194304 sectors
Disk /dev/sdaj: 2147 MB, 2147483648 bytes, 4194304 sectors
Disk /dev/sdak: 2147 MB, 2147483648 bytes, 4194304 sectors
Disk /dev/sdam: 2147 MB, 2147483648 bytes, 4194304 sectors
Disk /dev/sdal: 5368 MB, 5368709120 bytes, 10485760 sectors
Disk /dev/sdah: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/sdan: 2147 MB, 2147483648 bytes, 4194304 sectors
Disk /dev/sdao: 2147 MB, 2147483648 bytes, 4194304 sectors
Disk /dev/sdap: 2147 MB, 2147483648 bytes, 4194304 sectors
Disk /dev/sdaq: 3221 MB, 3221225472 bytes, 6291456 sectors
Disk /dev/sdar: 3221 MB, 3221225472 bytes, 6291456 sectors
Disk /dev/sdat: 3221 MB, 3221225472 bytes, 6291456 sectors
Disk /dev/sdas: 3221 MB, 3221225472 bytes, 6291456 sectors
Disk /dev/sdau: 3221 MB, 3221225472 bytes, 6291456 sectors
Disk /dev/sdav: 3221 MB, 3221225472 bytes, 6291456 sectors
Disk /dev/sdax: 3221 MB, 3221225472 bytes, 6291456 sectors
Disk /dev/sday: 3221 MB, 3221225472 bytes, 6291456 sectors
Disk /dev/sdaw: 3221 MB, 3221225472 bytes, 6291456 sectors
Disk /dev/sdba: 3221 MB, 3221225472 bytes, 6291456 sectors
Disk /dev/mapper/asm-dggrid2: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/sdaz: 3221 MB, 3221225472 bytes, 6291456 sectors
Disk /dev/sdbb: 3221 MB, 3221225472 bytes, 6291456 sectors
Disk /dev/mapper/asm-dggrid1: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/mapper/asm-dggrid3: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/mapper/asm-dggrid5: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/mapper/asm-dggrid4: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/mapper/asm-dggrid6: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/mapper/asm-dgrecovery01: 2147 MB, 2147483648 bytes, 4194304 sectors
Disk /dev/mapper/asm-dgsystem01: 5368 MB, 5368709120 bytes, 10485760 sectors
Disk /dev/mapper/asm-data01: 2147 MB, 2147483648 bytes, 4194304 sectors
Disk /dev/mapper/asm-data02: 2147 MB, 2147483648 bytes, 4194304 sectors
Disk /dev/mapper/fs-backup02: 3221 MB, 3221225472 bytes, 6291456 sectors
Disk /dev/mapper/fs-backup01: 3221 MB, 3221225472 bytes, 6291456 sectors
Disk /dev/mapper/fs-backup03: 3221 MB, 3221225472 bytes, 6291456 sectors
Disk /dev/mapper/backupvg-backuplv: 9437 MB, 9437184000 bytes, 18432000 sectors

重启服务器 reboot

检查配置:fdisk -l |grep “Disk /dev”

配置多路径及ASM磁盘

多路径软件安装:

rpm -qa |grep multipath

image-20241126090300799

配置生效,多路径开机启动

modprobe dm-multipath

modprobe dm-round-robin

lsmod |grep dm_multipath

systemctl enable multipathd

systemctl start multipathd

multipath -v2

报错:/etc/multipath.conf does not exist, blacklisting all devices

cp /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf /etc/multipath.conf

image-20241126090513028

multipath -ll |grep mpath

image-20241126090537109

image-20241126090542413

for i in `cat /proc/partitions | awk '{print$4}' |grep sd | grep [a-z]$`; do echo "### $i: `/lib/udev/scsi_id --whitelisted --device=/dev/$i`"; done
[root@hferp71 ~]# for i in `cat /proc/partitions | awk '{print$4}' |grep sd | grep [a-z]$`; do echo "### $i: `/lib/udev/scsi_id --whitelisted --device=/dev/$i`"; done
### sda: 36000c29b5effc0b462f8133744caf8c4
### sdb: 36000c297b9b69ad821ba52dd7a8103a1
### sdc: 269e599b56d920cd3
### sdd: 2c8dacd7143254b70
### sde: 266fc7bc69e23e94a
### sdf: 24b93ac5567327f2f
### sdg: 2fe5799e30982c881
### sdi: 269e599b56d920cd3
### sdj: 2c8dacd7143254b70
### sdk: 266fc7bc69e23e94a
### sdh: 205e8a87f943a383e
### sdl: 24b93ac5567327f2f
### sdo: 269e599b56d920cd3
### sdp: 2c8dacd7143254b70
### sdr: 269e599b56d920cd3
### sdq: 266fc7bc69e23e94a
### sdm: 259e04342c730046d
### sdn: 2fe5799e30982c881
### sds: 2c8dacd7143254b70
### sdu: 24b93ac5567327f2f
### sdw: 2fe5799e30982c881
### sdx: 266fc7bc69e23e94a
### sdt: 21f356012394a74f0
### sdz: 24b93ac5567327f2f
### sdaa: 259e04342c730046d
### sdy: 205e8a87f943a383e
### sdab: 21241b7334e5274d2
### sdae: 21f356012394a74f0
### sdv: 205e8a87f943a383e
### sdac: 2fe5799e30982c881
### sdag: 259e04342c730046d
### sdai: 2d0bc8bb5f18458cf
### sdad: 2d0bc8bb5f18458cf
### sdaf: 21241b7334e5274d2
### sdaj: 21f356012394a74f0
### sdak: 21241b7334e5274d2
### sdam: 2d0bc8bb5f18458cf
### sdal: 259e04342c730046d
### sdah: 205e8a87f943a383e
### sdan: 21f356012394a74f0
### sdao: 21241b7334e5274d2
### sdap: 2d0bc8bb5f18458cf
### sdaq: 2a6f8ecb92c2c7506
### sdar: 233bef421cb87759d
### sdat: 2a6f8ecb92c2c7506
### sdas: 23b4a22bf4954f0c6
### sdau: 233bef421cb87759d
### sdav: 2a6f8ecb92c2c7506
### sdax: 2a6f8ecb92c2c7506
### sday: 233bef421cb87759d
### sdaw: 23b4a22bf4954f0c6
### sdba: 23b4a22bf4954f0c6
### sdaz: 233bef421cb87759d
### sdbb: 23b4a22bf4954f0c6
[root@hferp72 ~]# for i in `cat /proc/partitions | awk '{print$4}' |grep sd | grep [a-z]$`; do echo "### $i: `/lib/udev/scsi_id --whitelisted --device=/dev/$i`"; done
### sda: 36000c29583d9ab34838ce7207521dd40
### sdb: 36000c29e988fcd7db059225b8e7c2813
### sdc: 269e599b56d920cd3
### sdd: 2c8dacd7143254b70
### sde: 266fc7bc69e23e94a
### sdf: 269e599b56d920cd3
### sdg: 2c8dacd7143254b70
### sdi: 24b93ac5567327f2f
### sdj: 24b93ac5567327f2f
### sdk: 2fe5799e30982c881
### sdm: 205e8a87f943a383e
### sdh: 266fc7bc69e23e94a
### sdn: 205e8a87f943a383e
### sdo: 259e04342c730046d
### sdp: 21f356012394a74f0
### sds: 269e599b56d920cd3
### sdu: 2d0bc8bb5f18458cf
### sdr: 21241b7334e5274d2
### sdt: 269e599b56d920cd3
### sdl: 2fe5799e30982c881
### sdq: 259e04342c730046d
### sdw: 21f356012394a74f0
### sdx: 2c8dacd7143254b70
### sdy: 21241b7334e5274d2
### sdaa: 2d0bc8bb5f18458cf
### sdz: 266fc7bc69e23e94a
### sdv: 2c8dacd7143254b70
### sdab: 266fc7bc69e23e94a
### sdac: 24b93ac5567327f2f
### sdae: 2fe5799e30982c881
### sdag: 205e8a87f943a383e
### sdad: 24b93ac5567327f2f
### sdaf: 2fe5799e30982c881
### sdaj: 2a6f8ecb92c2c7506
### sdai: 205e8a87f943a383e
### sdal: 233bef421cb87759d
### sdam: 23b4a22bf4954f0c6
### sdak: 259e04342c730046d
### sdan: 2a6f8ecb92c2c7506
### sdap: 21f356012394a74f0
### sdao: 233bef421cb87759d
### sdah: 259e04342c730046d
### sdar: 21f356012394a74f0
### sdat: 21241b7334e5274d2
### sdas: 23b4a22bf4954f0c6
### sdau: 2d0bc8bb5f18458cf
### sdav: 2a6f8ecb92c2c7506
### sdaw: 233bef421cb87759d
### sdaq: 21241b7334e5274d2
### sdax: 23b4a22bf4954f0c6
### sday: 2d0bc8bb5f18458cf
### sdaz: 2a6f8ecb92c2c7506
### sdba: 233bef421cb87759d
### sdbb: 23b4a22bf4954f0c6
[root@hferp71 ~]# more /etc/multipath.conf   --blacklist 黑名单 ,排查下面的UUID ,是系统盘,不做多路径
blacklist {
wwid 36000c297b9b69ad821ba52dd7a8103a1
wwid 36000c29b5effc0b462f8133744caf8c4
# devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
# devnode "^hd[a-z]"
# devnode "^sd[a-b]"
}defaults {
path_selector "round-robin 0"
path_grouping_policy group_by_prio
rr_min_io 100
max_fds 8192
rr_weight uniform
failback immediate
user_friendly_names yes
find_multipaths yes
}multipaths {
multipath {
wwid 269e599b56d920cd3
alias asm-dggrid1
}
multipath {
wwid 2c8dacd7143254b70
alias asm-dggrid2
}
multipath {
wwid 266fc7bc69e23e94a
alias asm-dggrid3
}
multipath {
wwid 24b93ac5567327f2f
alias asm-dggrid4
}
multipath {
wwid 2fe5799e30982c881
alias asm-dggrid5
}
multipath {
wwid 205e8a87f943a383e
alias asm-dggrid6
}
multipath {
wwid 259e04342c730046d
alias asm-dgsystem01
}
multipath {
wwid 21f356012394a74f0
alias asm-dgrecovery01
}
multipath {
wwid 21241b7334e5274d2
alias asm-data01
}
multipath {
wwid 2d0bc8bb5f18458cf
alias asm-data02
}
multipath {
wwid 2a6f8ecb92c2c7506
alias fs-backup01
}
multipath {
wwid 233bef421cb87759d
alias fs-backup02
}
multipath {
wwid 23b4a22bf4954f0c6
alias fs-backup03
}
}
[root@hferp72 ~]# more /etc/multipath.conf     --blacklist 黑名单 ,排查下面的UUID ,是系统盘,不做多路径
blacklist {
wwid 36000c29583d9ab34838ce7207521dd40
wwid 36000c29e988fcd7db059225b8e7c2813
# devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
# devnode "^hd[a-z]"
# devnode "^sd[a-b]"
}defaults {
path_selector "round-robin 0"
path_grouping_policy group_by_prio
rr_min_io 100
max_fds 8192
rr_weight uniform
failback immediate
user_friendly_names yes
find_multipaths yes
}multipaths {
multipath {
wwid 269e599b56d920cd3
alias asm-dggrid1
}
multipath {
wwid 2c8dacd7143254b70
alias asm-dggrid2
}
multipath {
wwid 266fc7bc69e23e94a
alias asm-dggrid3
}
multipath {
wwid 24b93ac5567327f2f
alias asm-dggrid4
}
multipath {
wwid 2fe5799e30982c881
alias asm-dggrid5
}
multipath {
wwid 205e8a87f943a383e
alias asm-dggrid6
}
multipath {
wwid 259e04342c730046d
alias asm-dgsystem01
}
multipath {
wwid 21f356012394a74f0
alias asm-dgrecovery01
}
multipath {
wwid 21241b7334e5274d2
alias asm-data01
}
multipath {
wwid 2d0bc8bb5f18458cf
alias asm-data02
}
multipath {
wwid 2a6f8ecb92c2c7506
alias fs-backup01
}
multipath {
wwid 233bef421cb87759d
alias fs-backup02
}
multipath {
wwid 23b4a22bf4954f0c6
alias fs-backup03
}
}

检查路径 multipath -ll

[root@hferp71 ~]#  multipath -ll
asm-dgrecovery01 (21f356012394a74f0) dm-6 ROCKET  ,IMAGEFILE
size=2.0G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active|- 33:0:0:7 sdt  65:48  active ready running|- 34:0:0:7 sdaj 66:48  active ready running|- 35:0:0:7 sdae 65:224 active ready running`- 36:0:0:7 sdan 66:112 active ready running
asm-dgsystem01 (259e04342c730046d) dm-7 ROCKET  ,IMAGEFILE
size=5.0G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active|- 33:0:0:6 sdm  8:192  active ready running|- 35:0:0:6 sdaa 65:160 active ready running|- 34:0:0:6 sdag 66:0   active ready running`- 36:0:0:6 sdal 66:80  active ready running
asm-data02 (2d0bc8bb5f18458cf) dm-9 ROCKET  ,IMAGEFILE
size=2.0G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active|- 33:0:0:9 sdad 65:208 active ready running|- 34:0:0:9 sdam 66:96  active ready running|- 35:0:0:9 sdai 66:32  active ready running`- 36:0:0:9 sdap 66:144 active ready running
fs-backup03 (23b4a22bf4954f0c6) dm-12 ROCKET  ,IMAGEFILE
size=3.0G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active|- 37:0:0:2 sdas 66:192 active ready running|- 38:0:0:2 sdaw 67:0   active ready running|- 40:0:0:2 sdbb 67:80  active ready running`- 39:0:0:2 sdba 67:64  active ready running
asm-data01 (21241b7334e5274d2) dm-8 ROCKET  ,IMAGEFILE
size=2.0G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active|- 33:0:0:8 sdab 65:176 active ready running|- 34:0:0:8 sdak 66:64  active ready running|- 36:0:0:8 sdao 66:128 active ready running`- 35:0:0:8 sdaf 65:240 active ready running
fs-backup02 (233bef421cb87759d) dm-10 ROCKET  ,IMAGEFILE
size=3.0G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active|- 37:0:0:1 sdar 66:176 active ready running|- 38:0:0:1 sdau 66:224 active ready running|- 39:0:0:1 sday 67:32  active ready running`- 40:0:0:1 sdaz 67:48  active ready running
fs-backup01 (2a6f8ecb92c2c7506) dm-11 ROCKET  ,IMAGEFILE
size=3.0G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active|- 37:0:0:0 sdaq 66:160 active ready running|- 38:0:0:0 sdat 66:208 active ready running|- 39:0:0:0 sdav 66:240 active ready running`- 40:0:0:0 sdax 67:16  active ready running
asm-dggrid6 (205e8a87f943a383e) dm-5 ROCKET  ,IMAGEFILE
size=1.0G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active|- 33:0:0:5 sdh  8:112  active ready running|- 35:0:0:5 sdy  65:128 active ready running|- 34:0:0:5 sdv  65:80  active ready running`- 36:0:0:5 sdah 66:16  active ready running
asm-dggrid5 (2fe5799e30982c881) dm-3 ROCKET  ,IMAGEFILE
size=1.0G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active|- 33:0:0:4 sdg  8:96   active ready running|- 34:0:0:4 sdn  8:208  active ready running|- 35:0:0:4 sdw  65:96  active ready running`- 36:0:0:4 sdac 65:192 active ready running
asm-dggrid4 (24b93ac5567327f2f) dm-4 ROCKET  ,IMAGEFILE
size=1.0G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active|- 33:0:0:3 sdf  8:80   active ready running|- 34:0:0:3 sdl  8:176  active ready running|- 35:0:0:3 sdu  65:64  active ready running`- 36:0:0:3 sdz  65:144 active ready running
asm-dggrid3 (266fc7bc69e23e94a) dm-2 ROCKET  ,IMAGEFILE
size=1.0G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active|- 33:0:0:2 sde  8:64   active ready running|- 34:0:0:2 sdk  8:160  active ready running|- 35:0:0:2 sdq  65:0   active ready running`- 36:0:0:2 sdx  65:112 active ready running
asm-dggrid2 (2c8dacd7143254b70) dm-0 ROCKET  ,IMAGEFILE
size=1.0G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active|- 33:0:0:1 sdd  8:48   active ready running|- 34:0:0:1 sdj  8:144  active ready running|- 35:0:0:1 sdp  8:240  active ready running`- 36:0:0:1 sds  65:32  active ready running
asm-dggrid1 (269e599b56d920cd3) dm-1 ROCKET  ,IMAGEFILE
size=1.0G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active|- 33:0:0:0 sdc  8:32   active ready running|- 34:0:0:0 sdi  8:128  active ready running|- 35:0:0:0 sdo  8:224  active ready running`- 36:0:0:0 sdr  65:16  active ready running
[root@hferp72 ~]# multipath -ll
asm-dgrecovery01 (21f356012394a74f0) dm-6 ROCKET  ,IMAGEFILE
size=2.0G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active|- 33:0:0:7 sdp  8:240  active ready running|- 34:0:0:7 sdw  65:96  active ready running|- 36:0:0:7 sdar 66:176 active ready running`- 35:0:0:7 sdap 66:144 active ready running
asm-dgsystem01 (259e04342c730046d) dm-7 ROCKET  ,IMAGEFILE
size=5.0G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active|- 34:0:0:6 sdq  65:0   active ready running|- 33:0:0:6 sdo  8:224  active ready running|- 36:0:0:6 sdah 66:16  active ready running`- 35:0:0:6 sdak 66:64  active ready running
asm-data02 (2d0bc8bb5f18458cf) dm-8 ROCKET  ,IMAGEFILE
size=2.0G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active|- 33:0:0:9 sdu  65:64  active ready running|- 34:0:0:9 sdaa 65:160 active ready running|- 36:0:0:9 sdau 66:224 active ready running`- 35:0:0:9 sday 67:32  active ready running
fs-backup03 (23b4a22bf4954f0c6) dm-12 ROCKET  ,IMAGEFILE
size=3.0G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active|- 37:0:0:2 sdam 66:96  active ready running|- 38:0:0:2 sdas 66:192 active ready running|- 40:0:0:2 sdbb 67:80  active ready running`- 39:0:0:2 sdax 67:16  active ready running
asm-data01 (21241b7334e5274d2) dm-9 ROCKET  ,IMAGEFILE
size=2.0G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active|- 34:0:0:8 sdy  65:128 active ready running|- 33:0:0:8 sdr  65:16  active ready running|- 36:0:0:8 sdat 66:208 active ready running`- 35:0:0:8 sdaq 66:160 active ready running
fs-backup02 (233bef421cb87759d) dm-11 ROCKET  ,IMAGEFILE
size=3.0G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active|- 37:0:0:1 sdal 66:80  active ready running|- 38:0:0:1 sdao 66:128 active ready running|- 40:0:0:1 sdba 67:64  active ready running`- 39:0:0:1 sdaw 67:0   active ready running
fs-backup01 (2a6f8ecb92c2c7506) dm-10 ROCKET  ,IMAGEFILE
size=3.0G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active|- 37:0:0:0 sdaj 66:48  active ready running|- 38:0:0:0 sdan 66:112 active ready running|- 39:0:0:0 sdav 66:240 active ready running`- 40:0:0:0 sdaz 67:48  active ready running
asm-dggrid6 (205e8a87f943a383e) dm-3 ROCKET  ,IMAGEFILE
size=1.0G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active|- 34:0:0:5 sdn  8:208  active ready running|- 33:0:0:5 sdm  8:192  active ready running|- 36:0:0:5 sdag 66:0   active ready running`- 35:0:0:5 sdai 66:32  active ready running
asm-dggrid5 (2fe5799e30982c881) dm-5 ROCKET  ,IMAGEFILE
size=1.0G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active|- 34:0:0:4 sdl  8:176  active ready running|- 33:0:0:4 sdk  8:160  active ready running|- 36:0:0:4 sdae 65:224 active ready running`- 35:0:0:4 sdaf 65:240 active ready running
asm-dggrid4 (24b93ac5567327f2f) dm-2 ROCKET  ,IMAGEFILE
size=1.0G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active|- 34:0:0:3 sdj  8:144  active ready running|- 33:0:0:3 sdi  8:128  active ready running|- 36:0:0:3 sdac 65:192 active ready running`- 35:0:0:3 sdad 65:208 active ready running
asm-dggrid3 (266fc7bc69e23e94a) dm-4 ROCKET  ,IMAGEFILE
size=1.0G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active|- 34:0:0:2 sdh  8:112  active ready running|- 33:0:0:2 sde  8:64   active ready running|- 36:0:0:2 sdz  65:144 active ready running`- 35:0:0:2 sdab 65:176 active ready running
asm-dggrid2 (2c8dacd7143254b70) dm-0 ROCKET  ,IMAGEFILE
size=1.0G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active|- 33:0:0:1 sdd  8:48   active ready running|- 34:0:0:1 sdg  8:96   active ready running|- 36:0:0:1 sdx  65:112 active ready running`- 35:0:0:1 sdv  65:80  active ready running
asm-dggrid1 (269e599b56d920cd3) dm-1 ROCKET  ,IMAGEFILE
size=1.0G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active|- 34:0:0:0 sdf  8:80   active ready running|- 33:0:0:0 sdc  8:32   active ready running|- 36:0:0:0 sds  65:32  active ready running`- 35:0:0:0 sdt  65:48  active ready running

AMS磁盘配置

创建用户和组/usr/sbin/groupadd -g 5001 oinstall
/usr/sbin/groupadd -g 5002 dba
/usr/sbin/groupadd -g 5003 oper
/usr/sbin/groupadd -g 5004 asmadmin
/usr/sbin/groupadd -g 5005 asmoper
/usr/sbin/groupadd -g 5006 asmdba
/usr/sbin/useradd -u 6001 -g oinstall -G dba,asmdba,oper oracle
/usr/sbin/useradd -u 6002 -g oinstall -G asmadmin,asmdba,asmoper,oper,dba grid
mkdir -p /oracle/app/grid
mkdir -p /oracle/app/12.1/grid
chown -R grid:oinstall /oracle
mkdir -p /oracle/app/oraInventory
chown -R grid:oinstall /oracle/app/oraInventory
mkdir -p /oracle/app/oracle
chown -R oracle:oinstall /oracle/app/oracle
chmod -R 775 /oracle

第一种:6.X和7.X:/etc/udev/rules.d/99-oracle.rules

KERNEL==“dm-*”, OWNER=“grid”, GROUP=“asmadmin”, MODE=“0660”

第二种6.X和7.X:vi /etc/udev/rules.d/99-oracle-asmdevices.rules

KERNEL==“dm-*”, NAME=“asm-dgrecovery01”,OWNER=“grid”, GROUP=“asmadmin”,MODE=“0660”

KERNEL==“dm-*”, NAME=“asm-dgsystem01”,OWNER=“grid”, GROUP=“asmadmin”,MODE=“0660”

第三种:7.X推荐

dmsetup ls |grep asm

[root@hferp71 ~]# dmsetup ls |grep asm
asm-dgrecovery01        (253:6)
asm-dgsystem01  (253:7)
asm-data02      (253:9)
asm-data01      (253:8)
asm-dggrid6     (253:5)
asm-dggrid5     (253:3)
asm-dggrid4     (253:4)
asm-dggrid3     (253:2)
asm-dggrid2     (253:0)
asm-dggrid1     (253:1)
[root@hferp71 ~]# for i in asm-dggrid1 asm-dggrid2 asm-dggrid3 asm-dggrid4 asm-dggrid5 asm-dggrid6 asm-dgsystem01 asm-dgrecovery01 asm-data01 asm-data02;
> do
> printf "%s %s\n" "$i" "$(udevadm info --query=all --name=/dev/mapper/$i |grep -i dm_uuid)";
> done
asm-dggrid1 E: DM_UUID=mpath-269e599b56d920cd3
asm-dggrid2 E: DM_UUID=mpath-2c8dacd7143254b70
asm-dggrid3 E: DM_UUID=mpath-266fc7bc69e23e94a
asm-dggrid4 E: DM_UUID=mpath-24b93ac5567327f2f
asm-dggrid5 E: DM_UUID=mpath-2fe5799e30982c881
asm-dggrid6 E: DM_UUID=mpath-205e8a87f943a383e
asm-dgsystem01 E: DM_UUID=mpath-259e04342c730046d
asm-dgrecovery01 E: DM_UUID=mpath-21f356012394a74f0
asm-data01 E: DM_UUID=mpath-21241b7334e5274d2
asm-data02 E: DM_UUID=mpath-2d0bc8bb5f18458cf
[root@hferp71 ~]# more  /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-269e599b56d920cd3",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-2c8dacd7143254b70",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-266fc7bc69e23e94a",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-24b93ac5567327f2f",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-2fe5799e30982c881",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-205e8a87f943a383e",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-259e04342c730046d",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-21f356012394a74f0",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-21241b7334e5274d2",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-2d0bc8bb5f18458cf",OWNER="grid",GROUP="asmadmin",MODE="0660"
[root@hferp72 ~]# more  /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-269e599b56d920cd3",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-2c8dacd7143254b70",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-266fc7bc69e23e94a",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-24b93ac5567327f2f",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-2fe5799e30982c881",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-205e8a87f943a383e",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-259e04342c730046d",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-21f356012394a74f0",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-21241b7334e5274d2",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-2d0bc8bb5f18458cf",OWNER="grid",GROUP="asmadmin",MODE="0660"

重新加载策略:/sbin/udevadm control --reload-rules

激活更改:sbin/udevadm trigger --type=devices --action=change

查看磁盘ls -lsa /dev/dm*

[root@hferp71 ~]# ls -lsa /dev/dm*
0 brw-rw---- 1 grid asmadmin 253,  0 Nov 26 09:16 /dev/dm-0
0 brw-rw---- 1 grid asmadmin 253,  1 Nov 26 09:16 /dev/dm-1
0 brw-rw---- 1 root disk     253, 10 Nov 26 09:16 /dev/dm-10
0 brw-rw---- 1 root disk     253, 11 Nov 26 09:16 /dev/dm-11
0 brw-rw---- 1 root disk     253, 12 Nov 26 09:16 /dev/dm-12
0 brw-rw---- 1 root disk     253, 13 Nov 26 09:16 /dev/dm-13
0 brw-rw---- 1 grid asmadmin 253,  2 Nov 26 09:17 /dev/dm-2
0 brw-rw---- 1 grid asmadmin 253,  3 Nov 26 09:17 /dev/dm-3
0 brw-rw---- 1 grid asmadmin 253,  4 Nov 26 09:17 /dev/dm-4
0 brw-rw---- 1 grid asmadmin 253,  5 Nov 26 09:16 /dev/dm-5
0 brw-rw---- 1 grid asmadmin 253,  6 Nov 26 09:17 /dev/dm-6
0 brw-rw---- 1 grid asmadmin 253,  7 Nov 26 09:17 /dev/dm-7
0 brw-rw---- 1 grid asmadmin 253,  8 Nov 26 09:17 /dev/dm-8
0 brw-rw---- 1 grid asmadmin 253,  9 Nov 26 09:17 /dev/dm-9
0 crw-rw---- 1 root audio     14,  9 Nov 26 09:16 /dev/dmmidi

系统参数设置

主机名不要使用大写字母,且主机名不能有-和_
vi /etc/hosts
#public ip
172.30.21.171 hferp71
172.30.21.172 hferp72
#priv ip
10.10.10.71 hferp71prv
10.10.10.72 fgerp72prv
#vip ip
172.30.21.173 hferp71vip
172.30.21.174 hferp72vip
#scan ip
172.30.21.175 hferpdbscan--配置环境变量
echo "export LANG=en_US" >> ~/.bash_profile
cat ~/.bash_profile
--创建用户、组、目录
/usr/sbin/groupadd -g 5001 oinstall
/usr/sbin/groupadd -g 5002 dba
/usr/sbin/groupadd -g 5003 oper
/usr/sbin/groupadd -g 5004 asmadmin
/usr/sbin/groupadd -g 5005 asmoper
/usr/sbin/groupadd -g 5006 asmdba
/usr/sbin/useradd -u 6001 -g oinstall -G dba,asmdba,oper oracle
/usr/sbin/useradd -u 6002 -g oinstall -Gasmadmin,asmdba,asmoper,oper,dba grid
--改密码
passwd grid
passwd oraclemkdir -p /oracle/app/grid
mkdir -p /oracle/app/11.2.0/grid
chown -R grid:oinstall /oraclemkdir -p /oracle/app/oraInventory
chown -R grid:oinstall /oracle/app/oraInventorymkdir -p /oracle/app/oracle
chown -R oracle:oinstall /oracle/app/oracle
chmod -R 775 /oracle
配置yum
mount /dev/cdrom /mnt
cd /etc/yum.repos.d
mkdir bk
mv *.repo bk/
echo "[EL]" >> /etc/yum.repos.d/itpux.repo
echo "name =Linux 7.x DVD" >> /etc/yum.repos.d/itpux.repo
echo "baseurl=file:///mnt" >> /etc/yum.repos.d/itpux.repo
echo "gpgcheck=0" >> /etc/yum.repos.d/itpux.repo
echo "enabled=1" >> /etc/yum.repos.d/itpux.repo
cat /etc/yum.repos.d/itpux.repo
yum -y install autoconf
yum -y install automake
yum -y install binutils
yum -y install binutils-devel
yum -y install bison
yum -y install cpp
yum -y install dos2unix
yum -y install ftp
yum -y install gcc
yum -y install gcc-c++
yum -y install lrzsz
yum -y install python-devel
yum -y install compat-db*
yum -y install compat-gcc-34
yum -y install compat-gcc-34-c++
yum -y install compat-libcap1
yum -y install compat-libstdc++-33
yum -y install compat-libstdc++-33.i686
yum -y install glibc-*
yum -y install glibc-*.i686
yum -y install libXpm-*.i686
yum -y install libXp.so.6
yum -y install libXt.so.6
yum -y install libXtst.so.6
yum -y install libXext
yum -y install libXext.i686
yum -y install libXtst
yum -y install libXtst.i686
yum -y install libX11
yum -y install libX11.i686
yum -y install libXau
yum -y install libXau.i686
yum -y install libxcb
yum -y install libxcb.i686
yum -y install libXi
yum -y install libXi.i686
yum -y install libgcc_s.so.1
yum -y install libstdc++.i686
yum -y install libstdc++-devel
yum -y install libstdc++-devel.i686
yum -y install libaio
yum -y install libaio.i686
yum -y install libaio-devel
yum -y install libaio-devel.i686
yum -y install ksh
yum -y install libXp
yum -y install libaio-devel
yum -y install numactl
yum -y install numactl-devel
yum -y install make -y
yum -y install sysstat -y
yum -y install unixODBC
yum -y install unixODBC-devel
yum -y install elfutils-libelf-devel-0.97
yum -y install elfutils-libelf-devel
yum -y install redhat-lsb-core
yum -y install unzip

修改系统相关参数

修改资源限制参数
vi /etc/security/limits.conf
#ORACLE SETTING
grid soft nproc 16384
grid hard nproc 16384
grid soft nofile 65536
grid hard nofile 65536
grid soft stack 32768
grid hard stack 32768
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft nofile 65536
oracle hard nofile 65536
oracle soft stack 32768
oracle hard stack 32768
oracle hard memlock 2000000
oracle soft memlock 2000000  #-- 单位是KB,大于SGA,小于物理内存ulimit -a

修改nproc参数

#Amend the "/etc/security/limits.d/20-nproc.conf" file as described below.
See MOS Note [ID 1487773.1]
控制给用户分配的资源
echo "* - nproc 16384" > /etc/security/limits.d/20-nproc.conf

控制给用户分配的资源(使上面生效)

echo "session required pam_limits.so" >> /etc/pam.d/login
cat /etc/pam.d/login

修改内核参数

vi /etc/sysctl.conf#ORACLE SETTING
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
kernel.panic_on_oops = 1
vm.nr_hugepages = 1000 --2500
kernel.shmmax = 1610612736   --5033164800
kernel.shmall = 393216  --1228800
kernel.shmmni = 4096sysctl -p

关闭透明页

cat /sys/kernel/mm/transparent_hugepage/defrag[always] madvise never
cat /sys/kernel/mm/transparent_hugepage/enabled
[always] madvise nevervi /etc/rc.d/rc.localif test -f /sys/kernel/mm/transparent_hugepage/enabled; then
echo never > /sys/kernel/mm/transparent_hugepage/enabled
fi
if test -f /sys/kernel/mm/transparent_hugepage/defrag; then
echo never > /sys/kernel/mm/transparent_hugepage/defrag
fichmod +x /etc/rc.d/rc.local

关闭numa功能

numactl --hardware

vi /etc/default/grub

numa=off

image-20241126095303503

重新编译grub2-mkconfig -o /etc/grub2.cfg

图形界面启动级别从5到3

systemctl set-default multi-user.target

共享内存段

echo “none /dev/shm tmpfs defaults,size=3072m 0 0” >>/etc/fstab 6144
mount -o remount /dev/shm

修改时区

ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
Hwclock

禁用SELINUX

echo “SELINUX=disabled” > /etc/selinux/config
echo "#SELINUXTYPE=targeted " >> /etc/selinux/config
setenforce 0

关闭防火墙

systemctl stop firewalld.service
systemctl disable firewalld.service
systemctl status firewalld.service

配置NOZEROCONF

echo “NOZEROCONF=yes” >> /etc/sysconfig/network

修改nsswitch.conf 保存的是域名检索顺序

vi /etc/nsswitch.conf
hosts: files dns myhostname nis

avahi-daemon

avahi-daemon守护进程配合缓存用户程序的答复,以帮助减少因答复而产生的网络流量;根据官方文档列出来的BUG,建议关闭这个进程。
Linux7中:
systemctl stop avahi-daemon.socket avahi-daemon.service
systemctl disable avahi-daemon.socket avahi-daemon.service

两台机时间要一样,禁止NTP

date -s “Wed Jan 23 23:06:03 CST 2019”

systemctl stop ntpd
systemctl disabled ntpd
systemctl status ntpd

配置环境变量

第一台:

su – grid
vi ~/.bash_profilePS1="[`whoami`@`hostname`:"'$PWD]$'
export PS1
umask 022
#alias sqlplus="rlwrap sqlplus"
export TMP=/tmp
export LANG=en_US
export TMPDIR=$TMP
ORACLE_SID=+ASM1; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
ORACLE_BASE=/oracle/app/grid; export ORACLE_BASE
ORACLE_HOME=/oracle/app/11.2.0/grid; export ORACLE_HOME
NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMAT
PATH=.:$PATH:$HOME/bin:$ORACLE_HOME/bin; export PATH
THREADS_FLAG=native; export THREADS_FLAG
if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
su – oracle
vi ~/.bash_profilePS1="[`whoami`@`hostname`:"'$PWD]$'
#alias sqlplus="rlwrap sqlplus"
#alias rman="rlwrap rman"
export PS1
export TMP=/tmp
export LANG=en_US
export TMPDIR=$TMP
export ORACLE_UNQNAME=hferpdb
ORACLE_BASE=/oracle/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
ORACLE_SID=hferpdb1; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMAT
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export NLS_LANG
PATH=.:$PATH:$HOME/bin:$ORACLE_BASE/product/11.2.0/db_1/bin:$ORACLE_HOME/b
in; export PATH
THREADS_FLAG=native; export THREADS_FLAG
if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi

第二台:

su - grid
vi ~/.bash_profilePS1="[`whoami`@`hostname`:"'$PWD]$'
export PS1
umask 022
#alias sqlplus="rlwrap sqlplus"
export TMP=/tmp
export LANG=en_US
export TMPDIR=$TMP
ORACLE_SID=+ASM2; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
ORACLE_BASE=/oracle/app/grid; export ORACLE_BASE
ORACLE_HOME=/oracle/app/11.2.0/grid; export ORACLE_HOME
NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMAT
PATH=.:$PATH:$HOME/bin:$ORACLE_HOME/bin; export PATH
THREADS_FLAG=native; export THREADS_FLAG
if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
su - oracle
PS1="[`whoami`@`hostname`:"'$PWD]$'
#alias sqlplus="rlwrap sqlplus"
#alias rman="rlwrap rman"
export PS1
export TMP=/tmp
export LANG=en_US
export TMPDIR=$TMP
export ORACLE_UNQNAME=hferpdb
ORACLE_BASE=/oracle/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
ORACLE_SID=hferpdb2; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMAT
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export NLS_LANG
PATH=.:$PATH:$HOME/bin:$ORACLE_BASE/product/ll.2.0/db_1/bin:$ORACLE_HOME/b
in; export PATH
THREADS_FLAG=native; export THREADS_FLAG
if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi

配置SSH信任关系-在第一台机

./sshUserSetup.sh -user grid -hosts "hferp71 hferp72" -advanced -exverify –confirm
./sshUserSetup.sh -user oracle -hosts "hferp71 hferp72" -advanced -exverify -confirm

Grid集群安装

查看系统参数

查看内存: free -m 或 cat /proc/meninfo

查看cpu:cat /proc/cpuinfo

查看硬件:deidecode |more

修改权限(chown -R grid:oinstall /backup chmod -R 777 /backup/)

进入grid用户的backup:su - grid

解压软件包:[grid@hferp71:/backup]$unzip p13390677_112040_Linux-x86-64_3of7.zip

解压软件包:[grid@hferp71:/backup]$unzip p19404309_112040_Linux-x86-64.zip

复制文件(解决验证问题):[grid@hferp71:/backup]$cp b19404309/grid/cvu_prereq.xml grid/stage/cvu/

在root下安装(解决磁盘验证问题)[root@hferp71 rpm]# rpm -ivh cvuqdisk-1.0.9-1.rpm

安装vnc:[root@hferp71 rpm]# mount /dev/cdrom /mnt/

安装grid:[grid@hferp71 grid]$ ./runInstaller -jreLoc /etc/alternatives/jre_1.8.0

image-20241126100042963

image-20241126100050602

image-20241126100058544

image-20241126100108841

image-20241126100116736

image-20241126100130982

image-20241126100137549

image-20241126100207724

image-20241126100214321

第二条在执行会报错 --【Rhel7安装RAC 11gR2时运行root.sh报错找不到ohas服务妙招_redhat7安装oracle 11g rac root.sh-CSDN博客】

解决:

--[grid@hferp71:/backup]$unzip p18370031_112040_Linux-x86-64.zip
--[grid@hferp71:/backup/18370031]$/oracle/app/11.2.0/grid/OPatch/opatch apply
--两个节点一起在71上面打了,没必要在拷贝了
--[grid@hferp72:/oracle/app/11.2.0]$unzip p18370031_112040_Linux-x86-64.zip
--[grid@hferp72:/home/grid]$scp hferp71:/backup/p183*zip /oracle/app/11.2.0/

查看补丁有没有打上去

[grid@hferp71:/backup/18370031]$/oracle/app/11.2.0/grid/OPatch/opatch lsinventory

image-20241126100401109

Asm磁盘组安装

在grid下:asmca

[grid@hferp71 grid]$ asmca

image-20241126100948078

image-20241126100953520

image-20241126100959323

image-20241126101005952

image-20241126101010940

image-20241126101017286

image-20241126101022630

image-20241126101030332

image-20241126101037865

设置root环境变量两台机

[root@hferp71 ~]# vi ~/.bash_profile

[root@hferp72 ~]# vi ~/.bash_profile

PATH= P A T H : / o r a c l e / a p p / 11.2.0 / g r i d / b i n : PATH:/oracle/app/11.2.0/grid/bin: PATH:/oracle/app/11.2.0/grid/bin:HOME/bin

/oracle/app/11.2.0/grid/bin:

image-20241126101107926

用grid用户进去,检查下磁盘组

crs_stat –t

image-20241126101144153

用root用户:crsctl check crs

image-20241126101200043

查看监听:[grid@hferp71:/home/grid]$lsnrctl status

image-20241126101215497

数据库软件安装

用oracle用户登录,解压数据包

[oracle@hferp71:/backup]$unzip p13390677_112040_Linux-x86-64_1of7.zip

[oracle@hferp71:/backup]$unzip p13390677_112040_Linux-x86-64_2of7.zip

[oracle@hferp71:/backup]$vncserver

[oracle@hferp71 database]$ ./runInstaller -jreLoc /etc/alternatives/jre_1.8.0

image-20241126100523278

image-20241126100531834

image-20241126100538601

image-20241126100551327

image-20241126100605807

报错:Error in invoking target ‘agent nmhs’ of makefile ……

Oracle用户进入:ORACLE_HOME;/oracle/app/oracle/product/11.2.0/db_1 ;cd sysman/lib

cp ins_emagent.mk ins_emagent.mk.bak –将文件备份

vi ins_emagent.mk 搜索NMECTL 在后面加上-lnnz11

image-20241126100631843

image-20241126100721805

image-20241126100730985

image-20241126101310237

image-20241126101315953

安装数据库集群

[oracle@hferp71 database]$ dbca

image-20241126101337720

image-20241126101342882

image-20241126101347516

image-20241126101355222

image-20241126101418679

image-20241126101426219

image-20241126101636429

Oracle11gR2 RAC 数据库补丁安装

补丁上传解压

停止应用和服务

生产环境一定要备份(停止数据库与集群,备份安装代码,备份数据库)

安装补丁工具Opatch

建议重启下两台主机

在线打补丁(数据库停止,dbconsole服务停掉,但集群一定打开)

验证补丁

启动应用测试

需要虚拟机安装环境的,文章后留言或私信,发网盘链接,另外博主有公网的高性能服务器可对外出租,可以用xshell工具直接连接,用于学习测试,有需要的可以私信。

相关文章:

RHEL7+Oracle11.2 RAC集群-多路径(multipath+udev)安装步骤

RHEL7Oracle11.2RAC集群-多路径(multipathudev)安装 配置虚拟存储 使用StarWind Management Console软件,配置存储 dggrid1: 1g*3 Dggrid2: 1g*3 Dgsystem: 5g*1 系统表空间,临时表空间,UNDO,参数文件…...

每日速记10道java面试题03

其他资料 每日速记10道java面试题01-CSDN博客 每日速记10道java面试题02-CSDN博客 目录 一、你使用过java的反射机制吗?如何应用反射? 二、什么是泛型?泛型的作用是什么? 三、java的泛型擦除是什么? 四、Java 中…...

Vue 3 的双向绑定原理

Vue 3 的双向绑定原理是基于 响应式系统 和 数据劫持 技术来实现的。在 Vue 3 中,双向绑定通常是通过 v-model 指令来完成的,它本质上是数据的双向同步:当数据改变时,视图自动更新,反之,视图的修改也会更新…...

如何使用 Chrome 无痕浏览模式访问网站?

无痕浏览(Incognito Mode)是 Google Chrome 浏览器提供的一种隐私保护功能,它允许用户在一个独立的会话中浏览网页,而不会记录用户的浏览历史、下载历史、表单数据等。这对于希望保护个人隐私或进行临时性匿名浏览的用户来说非常有…...

Idea 2024.3 突然出现点击run 运行没有反应,且没有任何提示。

写这篇文章的目的是为了提供一个新的解决思路,因为存在同病不同原因。 如果你进行了1. 检查运行配置 (Run Configuration) 2. 清理和重建项目 3. 清除缓存并重启 IDEA 4.排除kotlin 5.重装idea等等操作之后仍然没有解决,可以试着按一下步骤进行解决。 检…...

【小白学机器学习36】关于独立概率,联合概率,交叉概率,交叉概率和,总概率等 概念辨析的例子

目录 1 先说结论 2 联合概率 3 边缘概率 4 (行/列)边缘概率的和 总概率1 5 条件概率 5.1 条件概率的除法公式 5.2 条件概率和联合概率区别 1 先说结论 关于独立概率,联合概率,交叉概率,交叉概率和,总概率 类型含义 …...

Spring Boot 项目——分层架构

在创建一个 Spring Boot 项目时,为了提高代码的可维护性、可扩展性和清晰度,通常会按照一定的分层架构进行设计。常见的分层架构包括以下几层: 1. Controller 层(Web 层) 作用:接收用户请求,并…...

wordpress网站首页底部栏显示网站备案信息

一、页脚文件footer.php 例如,wordpress主题使用的是simple-life主题,服务器IP为192.168.68.89,在wordpress主题文件中有个页脚文件footer.php,这是一个包含网站页脚代码的文件。 footer.php 路径如下: /www/wwwroot/192.168.68…...

python面向对象编程练习

学生成绩管理系统 定义一个Student类,包括属性(姓名、成绩)和方法(设置成绩、获取成绩、计算平均成绩)。 实例化多个学生对象并调用方法。 功能说明: Student 类: init(self, name):…...

OpenCV_Code_LOG

孔洞填充 void fillHole(const Mat srcBw, Mat &dstBw) {Size m_Size srcBw.size();Mat TempMat::zeros(m_Size.height2,m_Size.width2,srcBw.type());//延展图像srcBw.copyTo(Temp(Range(1, m_Size.height 1), Range(1, m_Size.width 1)));cv::floodFill(Temp, Point(…...

力扣第 74 题是 搜索二维矩阵

题目描述 给定一个 m x n 的矩阵 matrix 和一个目标值 target,请你编写一个函数来判断目标值 target 是否在矩阵中。 每行的元素按升序排列。每列的元素按升序排列。 示例 1 输入: matrix [[1, 4, 7, 11],[2, 5, 8, 12],[3, 6, 9, 16],[10, 13, 14…...

[极客大挑战 2019]BabySQL--详细解析

信息搜集 进入界面: 输入用户名为admin,密码随便输一个: 发现是GET传参,有username和password两个传参点。 我们测试一下password点位能不能注入: 单引号闭合报错,根据报错信息,我们可以判断…...

实现Linux平台自定义协议族

一 简介 我们常常在Linux系统中编写socket接收TCP/UDP协议数据,大家有没有想过它怎么实现的,如果我们要实现socket接收自定义的协议数据又该怎么做呢?带着这个疑问,我们一起往下看吧~~ 二 Linux内核函数简介 在Linux系统中要想…...

RL78/G15 Fast Prototyping Board Arduino IDE 平台开发过程

这是一篇基于RL78/G15 Fast Prototyping Board的Arduino IDE开发记录 RL78/G15 Fast Prototyping Board硬件简介(背景)基础测试(方法说明/操作说明)开发环境搭建(方法说明/操作说明代码结果)Arduino IDE RL…...

YOLOv11 NCNN安卓部署

YOLOv11 NCNN安卓部署 前言 yolov11 NCNN安卓部署 目前的帧率可以稳定在20帧左右,下面是这个项目的github地址:https://github.com/gaoxumustwin/ncnn-android-yolov11 上面的检测精度很低时因为这个模型只训练了5个epoch,使用3090训练一个…...

对载入的3dtiles进行旋转、平移和缩放变换。

使用 params: {tx: 129.75845, //模型中心X轴坐标(经度,单位:十进制度)//小左ty: 46.6839, //模型中心Y轴坐标(纬度,单位:十进制度)//小下tz: 28, //模型中心Z轴坐标(高…...

Rust个人认为将抢占C和C++市场,逐渐成为主流的开发语言

本人使用C开发8年、C#开发15年、中间使用JAVA开发过项目、后期在学习过程中发现了Rust语言说它是最安全的语言,能够解决C、C的痛点、于是抽出一部分时间网上买书,看网上资料进行学习,这一学习起来发现和其它语言比较起来,在编码的…...

在openEuler中使用top命令

在openEuler中使用top命令 概述 top 命令是Linux系统中最常用的实时性能监控工具之一,允许用户查看系统的整体状态,包括CPU使用率、内存使用情况、运行中的进程等。本文档将详细介绍如何在openEuler操作系统中有效利用top命令进行系统监控。 启动top命令 打开终端并输入t…...

探索文件系统,Python os库是你的瑞士军刀

文章目录 探索文件系统,Python os库是你的瑞士军刀第一部分:背景介绍第二部分:os库是什么?第三部分:如何安装os库?第四部分:简单库函数使用方法1. 获取当前工作目录2. 改变当前工作目录3. 列出目…...

【小白学机器学习41】如何从正态分布的总体中去抽样? 获得指定正态分布的样本的2种方法

目录 1 目标:使用2种方法,去从正态分布的总体中去抽样,获得样本 1.1 step1: 首先,逻辑上需要先有符合正态分布的总体population 1.2 从总体中取得样本,模拟抽样的过程 2 从正态分布抽样的方法1 3 从正态分布抽样…...

将VSCode设置成中文语言环境

目录 VSCode默认是英文语言环境,这对于像我这种英语比较菜的人来说不是那么友好 另外也习惯了用中文,所以接下来介绍下如何将VSCode设置成中文语言环境。 1、打开VSCode软件,按快捷键【CtrlShiftP】 2、在弹出的搜索框中输入【configure l…...

Applied Intelligence投稿

一、关于手稿格式: 1、该期刊是一个二区的,模板使用Springer nature格式, 期刊投稿要求,详细期刊投稿指南,大部分按Soringernature模板即可,图片表格声明参考文献命名要求需注意。 2、参考文献&#xff…...

AI-agent矩阵营销:让品牌传播无处不在

矩阵营销是一种通过多平台联动构建品牌影响力的策略,而 AI-agent 技术让这一策略变得更加智能化。AI社媒引流王凭借其矩阵管理功能,帮助品牌在多个平台上实现深度覆盖与精准传播。 1. 矩阵营销的优势 品牌触达更广:多平台联动可以覆盖不同用…...

【0346】Postgres内核 Startup Process 通过 signal 与 postmaster 交互实现 (5)

1. Startup Process 进程 postmaster 初始化过程中, 在进入 ServerLoop() 函数之前,会先通过调用 StartChildProcess() 函数来开启辅助进程,这些进程的目的主要用来完成数据库的 XLOG 相关处理。 如: 核实 pg_wal 和 pg_wal/archive_status 文件是否存在Postgres先前是否发…...

NSSCTF-做题笔记

[羊城杯 2020]easyre 查壳,无壳,64位,ida打开 encode_one encode_tow encode_three 那么我们开始一步一步解密,从最外层开始 def decode_three(encrypted_str):decrypted_str ""for char in encrypted_str:char_code …...

【小白学机器学习35】数据表:整洁数据表,交叉表/列联表,以及两者转化pd.pivot_table()

目录 1 虽然这是个很基础的知识,但是我觉得有必要记录下 2 整洁数据表 3 交叉数据表的2种形式 3.0 交叉表的名字 3.1 2维的交叉表 3.2 用2维表现3维的 3.3 上述内容,具体的markdown文本 4 交叉数据表 4.1 交叉数据表并不整洁 4.2 但是交叉表也…...

springboot旅游管理系统的设计与实现

springboot旅游管理系统的设计与实现 如需源码pc端👉👉👉资源 手机端👉👉👉资源 摘 要 信息化社会内需要与之针对性的信息获取途径,但是途径的扩展基本上为人们所努力的方向,由于…...

k8s 1.28 聚合层部署信息记录

–requestheader-client-ca-file –requestheader-allowed-namesfront-proxy-client –requestheader-extra-headers-prefixX-Remote-Extra- –requestheader-group-headersX-Remote-Group –requestheader-username-headersX-Remote-User –proxy-client-cert-file –proxy-cl…...

自由学习记录(25)

只要有修改,子表就不用元表的参数了,用自己的参数(只不过和元表里的那个同名) 子表用__index“继承”了父表的值,此时子表仍然是空表 一定是创建这样一个同名的变量在原本空空的子表里, 传参要传具体的变…...

关于函数式接口和编程的解析和案例实战

文章目录 匿名内部类“匿名”在哪里 函数式编程lambda表达式的条件Supplier使用示例 ConsumeracceptandThen使用场景 FunctionalBiFunctionalTriFunctional 匿名内部类 匿名内部类的学习和使用是实现lambda表达式和函数式编程的基础。是想一下,我们在使用接口中的方…...

贵州省城市建设厅网站/关键词排名推广方法

大家好, 为提升上传图片的用户体验,我们已经把上传图片后再将图片插入文章的流程做了改进。自此,图片上传完毕后,直接点击后面的“插入”按钮,就可以直接把该图片插入编辑器内光标所在的位置了。如图: 另一…...

web旅游网站开发/网络策划是做什么的

【芝麻代理】请添加链接描述做新媒体运营经常遇到的问题是,我的网站每天都发布新文章,被百度收录的文章却很少,不知道是什么原因,如何让我发布的文章被百度收录?就此问题,个人总结了如下十一条经验&#xf…...

共青团智慧团建登录网站/苏州网站排名推广

极市平台(微信公众号ID:extrememart):专注计算机视觉前沿资讯和技术干货。本文由极市平台首发,转载需获授权。极市导读:今天给大家推荐一篇CVPR2020上对通道注意力进行改进的文章---ECANet,ECAN…...

网站开发的测试/爱廷玖达泊西汀

今天,看到一篇文章,蛮有趣的,文章的作者也是我一直有关注的,目前主要从事算法视频制作。他看到一个贪吃蛇游戏,当然也不仅仅是简单的贪吃蛇游戏,重点是这个贪吃蛇把食物吃完后,刚好布满了全屏。…...

绵阳建设工程信息网站/淘宝关键词指数查询

大家好,今天小尼比继续来给大家讲解和MATLAB有关的知识,在《新手必看MATLAB基础知识1:MATLAB操作界面与MATLAB设置》中,有人评论留言,提出了“有点看不懂这些操作”的问题,或许今天我们能把这个问题解决。如…...

wordpress 图片 说明 居中/电子商务网站

本文讲的是记一例“特殊”的运营商流量劫持强弹广告案例诊断,由于没有上HTTPS,国内最大的政府网站疑似遭遇流量劫持,被恶意弹窗涉嫌色情的广告。 一份网上传播的文档截图中记录了整个事件经过。在这份《关于xx院app中h5页面弹出广告的专题会议…...