Linux7 安装oracle11g rac过程
网卡配置
ssh连接过慢处理
vi /etc/ssh/sshd_config
UseDNS no
修改hosts、主机名
[root@rh7 software]# vi /etc/hostname
[root@rh7 software]# cat /etc/hostname
rac1
[root@rh7 software]# vi /etc/hosts
[root@rh7 software]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
# public IP
192.168.159.101 rac1
192.168.159.102 rac2
# virtual IP
192.168.159.103 rac1-vip
192.168.159.104 rac2-vip
# rac scan IP
192.168.159.106 11grac-scan
# private IP
10.0.0.101 rac1-priv
10.0.0.102 rac2-priv
[root@rh7 software]# cd /etc
[root@rh7 etc]# scp hosts 192.168.159.102:/etc/
The authenticity of host '192.168.159.102 (192.168.159.102)' can't be established.
ECDSA key fingerprint is SHA256:5u6/9nWBNhQps2GyM3euPKMF4YbRfNXaXWxcykT5ztY.
ECDSA key fingerprint is MD5:f1:a5:20:02:ce:35:81:b8:e3:83:13:ae:dd:89:70:5c.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.159.102' (ECDSA) to the list of known hosts.
root@192.168.159.102's password:
hosts 100% 401 944.0KB/s 00:00
二节点修改
[root@rh7 software]# vi /etc/hostname
[root@rh7 software]# cat /etc/hostname
rac2
[root@rh7 software]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
# public IP
192.168.159.101 rac1
192.168.159.102 rac2
# virtual IP
192.168.159.103 rac1-vip
192.168.159.104 rac2-vip
# rac scan IP
192.168.159.106 11grac-scan
# private IP
10.0.0.101 rac1-priv
10.0.0.102 rac2-priv
确认网卡配置
[root@rh7 ~]# ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.159.101 netmask 255.255.255.0 broadcast 192.168.159.255
inet6 fe80::e60a:4338:f000:54bd prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:5f:5d:0b txqueuelen 1000 (Ethernet)
RX packets 802 bytes 72749 (71.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 653 bytes 84689 (82.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ens34: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 00:0c:29:5f:5d:15 txqueuelen 1000 (Ethernet)
RX packets 6 bytes 552 (552.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@rh7 ~]# cd /etc/sysconfig/network-scripts/
[root@rh7 network-scripts]# ls
ifcfg-ens33 ifdown-ippp ifdown-Team ifup-ib ifup-ppp init.ipv6-global
ifcfg-ens34 ifdown-ipv6 ifdown-TeamPort ifup-ippp ifup-routes network-functions
ifcfg-lo ifdown-isdn ifdown-tunnel ifup-ipv6 ifup-sit network-functions-ipv6
ifdown ifdown-post ifup ifup-isdn ifup-Team
ifdown-bnep ifdown-ppp ifup-aliases ifup-plip ifup-TeamPort
ifdown-eth ifdown-routes ifup-bnep ifup-plusb ifup-tunnel
ifdown-ib ifdown-sit ifup-eth ifup-post ifup-wireless
[root@rh7 network-scripts]# vi ifcfg-ens34
[root@rh7 network-scripts]# cat ifcfg-ens34
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens34
UUID=946d9fab-6e3f-4862-ae97-0bf5c664130b
DEVICE=ens34
ONBOOT=yes
IPADDR=10.0.0.101
PREFIX=24
GATEWAY=10.0.0.1
IPV6_PRIVACY=no
[root@rh7 network-scripts]# systemctl restart network
[root@rh7 network-scripts]# ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.159.101 netmask 255.255.255.0 broadcast 192.168.159.255
inet6 fe80::e60a:4338:f000:54bd prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:5f:5d:0b txqueuelen 1000 (Ethernet)
RX packets 1185 bytes 102887 (100.4 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 927 bytes 120776 (117.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ens34: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.0.101 netmask 255.255.255.0 broadcast 10.0.0.255
inet6 fe80::a3a6:bb97:7c96:5ad5 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:5f:5d:15 txqueuelen 1000 (Ethernet)
RX packets 8 bytes 672 (672.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 36 bytes 4691 (4.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
禁用selinux
vi /etc/selinux/config
[root@rhel7-11g-1 ~]# cat /etc/selinux/config
# This file controls the state of 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 three values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
关闭防火墙[root@rh7 network-scripts]# systemctl stop firewalld.service
[root@rh7 network-scripts]# systemctl diable firewalld.service
Unknown operation 'diable'.
[root@rh7 network-scripts]# systemctl disable firewalld.service
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@rh7 network-scripts]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:firewalld(1)
Aug 14 13:49:09 rh7.11grac1 systemd[1]: Starting firewalld - dynamic firewall daemon...
Aug 14 13:49:09 rh7.11grac1 systemd[1]: Started firewalld - dynamic firewall daemon.
Aug 14 15:35:47 rh7.11grac1 systemd[1]: Stopping firewalld - dynamic firewall daemon...
Aug 14 15:35:48 rh7.11grac1 systemd[1]: Stopped firewalld - dynamic firewall daemon.
禁用透明大页及相关服务
[root@rh7 network-scripts]# systemctl stop chronyd > /dev/null
[root@rh7 network-scripts]# systemctl disable chronyd
[root@rh7 network-scripts]# systemctl status chronyd
● chronyd.service - NTP client/server
Loaded: loaded (/usr/lib/systemd/system/chronyd.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:chronyd(8)
man:chrony.conf(5)
[root@rh7 network-scripts]# cp /etc/chrony.conf /etc/chrony.conf.bak
[root@rh7 network-scripts]# rm -rf /etc/chrony.conf
[root@rh7 network-scripts]# systemctl stop avahi-daemon
Warning: Stopping avahi-daemon.service, but it can still be activated by:
avahi-daemon.socket
[root@rh7 network-scripts]# systemctl disable avahi-daemon
Removed symlink /etc/systemd/system/multi-user.target.wants/avahi-daemon.service.
Removed symlink /etc/systemd/system/sockets.target.wants/avahi-daemon.socket.
Removed symlink /etc/systemd/system/dbus-org.freedesktop.Avahi.service.
[root@rh7 network-scripts]# systemctl disable avahi-dnsconfd
Failed to execute operation: No such file or directory
[root@rh7 network-scripts]# cat /sys/kernel/mm/transparent_hugepage/enabled
[always] madvise never
[root@rh7 network-scripts]# cp /etc/default/grub /etc/default/grub.bak
[root@rh7 network-scripts]# vi /etc/default/grub
[root@rh7 network-scripts]# cat /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet transparent_hugepage=never"
GRUB_DISABLE_RECOVERY="true"
[root@rh7 network-scripts]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-1062.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-1062.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-648d39b7440f4d92b0de98fba2c92974
Found initrd image: /boot/initramfs-0-rescue-648d39b7440f4d92b0de98fba2c92974.img
done
用户组创建
groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54333 oper
groupadd -g 54334 backupdba
groupadd -g 54325 asmdba
groupadd -g 54336 dgdba
groupadd -g 54327 kmdba
groupadd -g 54328 asmadmin
groupadd -g 54329 asmoper
useradd -u 54322 -g oinstall -G asmadmin,asmdba,asmoper grid
useradd -u 54321 -g oinstall -G dba,backupdba,dgdba,kmdba,asmdba,asmoper,oper,asmadmin oracle
id grid
uid=54322(grid) gid=54321(oinstall) groups=54321(oinstall),54325(asmdba),54328(asmadmin),54329(asmoper)
id oracle
uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54333(oper),54334(backupdba),54325(asmdba),54336(dgdba),54327(kmdba),54328(asmadmin),54329(asmoper)
配置本地yum源(我挂载的是oraclelinux7.7的镜像红帽镜像有很多包没有所有直接用oraclelinux版本)
[root@rh7 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 7.8G 0 7.8G 0% /dev
tmpfs 7.8G 0 7.8G 0% /dev/shm
tmpfs 7.8G 13M 7.8G 1% /run
tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
/dev/mapper/rhel-root 102G 3.8G 93G 4% /
/dev/sda1 477M 151M 297M 34% /boot
tmpfs 1.6G 8.0K 1.6G 1% /run/user/42
tmpfs 1.6G 24K 1.6G 1% /run/user/0
/dev/sr0 4.5G 4.5G 0 100% /run/media/root/OL-7.7 Server.x86_64
[root@rh7 ~]# mount /dev/sr0 /mnt
mount: /dev/sr0 is write-protected, mounting read-only
[root@rh7 ~]#
[root@rh7 yum.repos.d]# ls
redhat.repo
[root@rh7 yum.repos.d]# vi redhat.repo
[root@rh7 yum.repos.d]# cat redhat.repo
#
# Certificate-Based Repositories
# Managed by (rhsm) subscription-manager
#
# *** This file is auto-generated. Changes made here will be over-written. ***
# *** Use "subscription-manager repo-override --help" if you wish to make changes. ***
#
# If this file is empty and this system is subscribed consider
# a "yum repolist" to refresh available repos
#
[rhel7.7]
name = redhat linux 7.7
baseurl=file:///mnt/
gpgcheck=0
enable=1
[root@rh7 yum.repos.d]# yum clean all
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Cleaning repos: rhel7.7
[root@rh7 yum.repos.d]# yum group list
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
There is no installed groups file.
Maybe run: yum groups mark convert (see man yum)
rhel7.7 | 3.6 kB 00:00:00
(1/2): rhel7.7/group_gz | 141 kB 00:00:00
(2/2): rhel7.7/primary_db | 5.0 MB 00:00:00
Available Environment Groups:
Minimal Install
Infrastructure Server
File and Print Server
Basic Web Server
Virtualization Host
Server with GUI
Available Groups:
Compatibility Libraries
Console Internet Tools
Development Tools
Graphical Administration Tools
Legacy UNIX Compatibility
Scientific Support
Security Tools
Smart Card Support
System Administration Tools
System Management
Done
安装依赖包
yum install -y binutils*
yum install -y libXau*
yum install -y libxcb*686*
yum install -y libxcb*
yum install -y libXi*
yum install -y libXi*686*
yum install -y make*
yum install -y net-tools*
yum install -y nfs-utils*
yum install -y sysstat*
yum install -y smartmontools*
yum install -y unixODBC*
yum install -y unixODBC-devel*
yum install -y unixODBC*686*
yum install -y unixODBC-devel*686*
yum install -y gcc-*
yum install -y gcc-c++*
yum install -y elfutils-libelf-devel*
检查发现没有的包手动安装
[root@rh7 yum.repos.d]# rpm -q binutils compat-libcap1 compat-libstdc++-33 e2fsprogs e2fsprogs-libs glibc glibc glibc-devel glibc-devel ksh libgcc libgcc libs libstdc++ libstdc++ libstdc++-devel libstdc++ libaio libaio libaio-devel libaio-devel libXtst libXtst libX11 libX11 libXau libXau libxcb libxcb libXi libXi make net-tools nfs-utils sysstat smartmontools unixODBC unixODBC-devel unixODBC unixODBC-devel gcc gcc-c++ elfutils-libelf-devel
binutils-2.27-41.base.0.1.el7.x86_64
package compat-libcap1 is not installed
package compat-libstdc++-33 is not installed
e2fsprogs-1.42.9-16.el7.x86_64
e2fsprogs-libs-1.42.9-16.el7.x86_64
glibc-2.17-292.0.1.el7.x86_64
glibc-2.17-292.0.1.el7.i686
glibc-2.17-292.0.1.el7.x86_64
glibc-2.17-292.0.1.el7.i686
glibc-devel-2.17-292.0.1.el7.x86_64
glibc-devel-2.17-292.0.1.el7.x86_64
package ksh is not installed
libgcc-4.8.5-39.0.1.el7.x86_64
libgcc-4.8.5-39.0.1.el7.i686
libgcc-4.8.5-39.0.1.el7.x86_64
libgcc-4.8.5-39.0.1.el7.i686
package libs is not installed
libstdc++-4.8.5-39.0.1.el7.i686
libstdc++-4.8.5-39.0.1.el7.x86_64
libstdc++-4.8.5-39.0.1.el7.i686
libstdc++-4.8.5-39.0.1.el7.x86_64
libstdc++-devel-4.8.5-39.0.1.el7.x86_64
libstdc++-4.8.5-39.0.1.el7.i686
libstdc++-4.8.5-39.0.1.el7.x86_64
libaio-0.3.109-13.el7.x86_64
libaio-0.3.109-13.el7.x86_64
package libaio-devel is not installed
package libaio-devel is not installed
libXtst-1.2.3-1.el7.x86_64
libXtst-1.2.3-1.el7.x86_64
libX11-1.6.7-2.el7.x86_64
libX11-1.6.7-2.el7.i686
libX11-1.6.7-2.el7.x86_64
libX11-1.6.7-2.el7.i686
libXau-1.0.8-2.1.el7.x86_64
libXau-1.0.8-2.1.el7.i686
libXau-1.0.8-2.1.el7.x86_64
libXau-1.0.8-2.1.el7.i686
libxcb-1.13-1.el7.x86_64
libxcb-1.13-1.el7.i686
libxcb-1.13-1.el7.x86_64
libxcb-1.13-1.el7.i686
libXi-1.7.9-1.el7.x86_64
libXi-1.7.9-1.el7.i686
libXi-1.7.9-1.el7.x86_64
libXi-1.7.9-1.el7.i686
make-3.82-24.el7.x86_64
net-tools-2.0-0.25.20131004git.el7.x86_64
nfs-utils-1.3.0-0.65.0.1.el7.x86_64
sysstat-10.1.5-18.el7.x86_64
smartmontools-7.0-1.el7.x86_64
unixODBC-2.3.1-14.0.1.el7.x86_64
unixODBC-2.3.1-14.0.1.el7.i686
unixODBC-devel-2.3.1-14.0.1.el7.x86_64
unixODBC-devel-2.3.1-14.0.1.el7.i686
unixODBC-2.3.1-14.0.1.el7.x86_64
unixODBC-2.3.1-14.0.1.el7.i686
unixODBC-devel-2.3.1-14.0.1.el7.x86_64
unixODBC-devel-2.3.1-14.0.1.el7.i686
gcc-4.8.5-39.0.1.el7.x86_64
gcc-c++-4.8.5-39.0.1.el7.x86_64
elfutils-libelf-devel-0.176-2.el7.x86_64
[root@rh7 yum.repos.d]# yum install libaio-devel*
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Resolving Dependencies
--> Running transaction check
---> Package libaio-devel.x86_64 0:0.3.109-13.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===========================================================================================================
Package Arch Version Repository Size
===========================================================================================================
Installing:
libaio-devel x86_64 0.3.109-13.el7 rhel7.7 12 k
Transaction Summary
===========================================================================================================
Install 1 Package
Total download size: 12 k
Installed size: 7.8 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : libaio-devel-0.3.109-13.el7.x86_64 1/1
Verifying : libaio-devel-0.3.109-13.el7.x86_64 1/1
Installed:
libaio-devel.x86_64 0:0.3.109-13.el7
Complete!
[root@rh7 yum.repos.d]# yum install compat-libcap1*
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Resolving Dependencies
--> Running transaction check
---> Package compat-libcap1.x86_64 0:1.10-7.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===========================================================================================================
Package Arch Version Repository Size
===========================================================================================================
Installing:
compat-libcap1 x86_64 1.10-7.el7 rhel7.7 17 k
Transaction Summary
===========================================================================================================
Install 1 Package
Total download size: 17 k
Installed size: 29 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : compat-libcap1-1.10-7.el7.x86_64 1/1
Verifying : compat-libcap1-1.10-7.el7.x86_64 1/1
Installed:
compat-libcap1.x86_64 0:1.10-7.el7
Complete!
[root@rh7 yum.repos.d]# yum install compat-libstdc++-33*
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Resolving Dependencies
--> Running transaction check
---> Package compat-libstdc++-33.x86_64 0:3.2.3-72.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===========================================================================================================
Package Arch Version Repository Size
===========================================================================================================
Installing:
compat-libstdc++-33 x86_64 3.2.3-72.el7 rhel7.7 190 k
Transaction Summary
===========================================================================================================
Install 1 Package
Total download size: 190 k
Installed size: 811 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : compat-libstdc++-33-3.2.3-72.el7.x86_64 1/1
Verifying : compat-libstdc++-33-3.2.3-72.el7.x86_64 1/1
Installed:
compat-libstdc++-33.x86_64 0:3.2.3-72.el7
Complete!
[root@rh7 yum.repos.d]# rpm -q binutils compat-libcap1 compat-libstdc++-33 e2fsprogs e2fsprogs-libs glibc glibc glibc-devel glibc-devel ksh libgcc libgcc libs libstdc++ libstdc++ libstdc++-devel libstdc++ libaio libaio libaio-devel libaio-devel libXtst libXtst libX11 libX11 libXau libXau libxcb libxcb libXi libXi make net-tools nfs-utils sysstat smartmontools unixODBC unixODBC-devel unixODBC unixODBC-devel gcc gcc-c++ elfutils-libelf-devel
binutils-2.27-41.base.0.1.el7.x86_64
compat-libcap1-1.10-7.el7.x86_64
compat-libstdc++-33-3.2.3-72.el7.x86_64
e2fsprogs-1.42.9-16.el7.x86_64
e2fsprogs-libs-1.42.9-16.el7.x86_64
glibc-2.17-292.0.1.el7.x86_64
glibc-2.17-292.0.1.el7.i686
glibc-2.17-292.0.1.el7.x86_64
glibc-2.17-292.0.1.el7.i686
glibc-devel-2.17-292.0.1.el7.x86_64
glibc-devel-2.17-292.0.1.el7.x86_64
package ksh is not installed
libgcc-4.8.5-39.0.1.el7.x86_64
libgcc-4.8.5-39.0.1.el7.i686
libgcc-4.8.5-39.0.1.el7.x86_64
libgcc-4.8.5-39.0.1.el7.i686
package libs is not installed
libstdc++-4.8.5-39.0.1.el7.i686
libstdc++-4.8.5-39.0.1.el7.x86_64
libstdc++-4.8.5-39.0.1.el7.i686
libstdc++-4.8.5-39.0.1.el7.x86_64
libstdc++-devel-4.8.5-39.0.1.el7.x86_64
libstdc++-4.8.5-39.0.1.el7.i686
libstdc++-4.8.5-39.0.1.el7.x86_64
libaio-0.3.109-13.el7.x86_64
libaio-0.3.109-13.el7.x86_64
libaio-devel-0.3.109-13.el7.x86_64
libaio-devel-0.3.109-13.el7.x86_64
libXtst-1.2.3-1.el7.x86_64
libXtst-1.2.3-1.el7.x86_64
libX11-1.6.7-2.el7.x86_64
libX11-1.6.7-2.el7.i686
libX11-1.6.7-2.el7.x86_64
libX11-1.6.7-2.el7.i686
libXau-1.0.8-2.1.el7.x86_64
libXau-1.0.8-2.1.el7.i686
libXau-1.0.8-2.1.el7.x86_64
libXau-1.0.8-2.1.el7.i686
libxcb-1.13-1.el7.x86_64
libxcb-1.13-1.el7.i686
libxcb-1.13-1.el7.x86_64
libxcb-1.13-1.el7.i686
libXi-1.7.9-1.el7.x86_64
libXi-1.7.9-1.el7.i686
libXi-1.7.9-1.el7.x86_64
libXi-1.7.9-1.el7.i686
make-3.82-24.el7.x86_64
net-tools-2.0-0.25.20131004git.el7.x86_64
nfs-utils-1.3.0-0.65.0.1.el7.x86_64
sysstat-10.1.5-18.el7.x86_64
smartmontools-7.0-1.el7.x86_64
unixODBC-2.3.1-14.0.1.el7.x86_64
unixODBC-2.3.1-14.0.1.el7.i686
unixODBC-devel-2.3.1-14.0.1.el7.x86_64
unixODBC-devel-2.3.1-14.0.1.el7.i686
unixODBC-2.3.1-14.0.1.el7.x86_64
unixODBC-2.3.1-14.0.1.el7.i686
unixODBC-devel-2.3.1-14.0.1.el7.x86_64
unixODBC-devel-2.3.1-14.0.1.el7.i686
gcc-4.8.5-39.0.1.el7.x86_64
gcc-c++-4.8.5-39.0.1.el7.x86_64
elfutils-libelf-devel-0.176-2.el7.x86_64
创建目录并赋权
mkdir -p /u01/app/11.2.0/grid
mkdir -p /u01/app/oracle/product/11.2.0/db_1
mkdir -p /u01/app/grid
chown -R grid:oinstall /u01
chown oracle:oinstall /u01/app/oracle/
chown oracle:oinstall /u01/app/oracle/product/11.2.0/db_1/
chmod -R 775 /u01/
[root@rac1 app]# ls -ld /u01/app/grid/
drwxrwxr-x 2 grid oinstall 4096 Aug 14 19:27 /u01/app/grid/
[root@rac1 app]# ls -ld /u01/app/11.2.0/grid/
drwxrwxr-x 2 grid oinstall 4096 Aug 14 19:27 /u01/app/11.2.0/grid/
[root@rac1 app]# ls -ld /u01/app/oracle/
drwxrwxr-x 3 oracle oinstall 4096 Aug 14 19:27 /u01/app/oracle/
[root@rac1 app]# ls -ld /u01/app/oracle/product/11.2.0/db_1/
drwxrwxr-x 2 oracle oinstall 4096 Aug 14 19:27 /u01/app/oracle/product/11.2.0/db_1/
配置环境变量
[grid@rac1 ~]$ vi .bash_profile
[grid@rac1 ~]$ . .bash_profile
[grid@rac1 ~]$ cat .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/11.2.0/grid
export ORACLE_SID=+ASM1
export PATH=$ORACLE_HOME/bin:$PATH
[grid@rac1 ~]$ env|grep grid
USER=grid
ORACLE_BASE=/u01/app/grid
MAIL=/var/spool/mail/grid
PATH=/u01/app/11.2.0/grid/bin:/u01/app/11.2.0/grid_1/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/grid/.local/bin:/home/grid/bin:/home/grid/.local/bin:/home/grid/bin
PWD=/home/grid
HOME=/home/grid
LOGNAME=grid
XDG_DATA_DIRS=/home/grid/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
ORACLE_HOME=/u01/app/11.2.0/grid
[root@rac1 ~]# su - oracle
[oracle@rac1 ~]$ vi .bash_profile
[oracle@rac1 ~]$ . .bash_profile
[oracle@rac1 ~]$ cat .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1/
export ORACLE_SID=orcl1
export PATH=$ORACLE_HOME/bin:$PATH
[oracle@rac1 ~]$ env|grep ORA
ORACLE_SID=orcl1
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1/
上传软件数据库及包
[root@rh7 yum.repos.d]# cd /u01
[root@rh7 u01]# ls
app
[root@rh7 u01]# mkdir -p software
注:3是grid 1、2是database
给数据库安装包进行赋权
[root@rhel7-11g-1 ~]# cd /u01/software/
[root@rhel7-11g-1 software]# ls
18370031 grid p13390677_112040_Linux-x86-64_2of7.zip p18370031_112040_Linux-x86-64.zip pdksh-5.2.14-30.x86_64.rpm README.txt
bundle.xml p13390677_112040_Linux-x86-64_1of7.zip p13390677_112040_Linux-x86-64_3of7.zip p6880880_112000_Linux-x86-64.zip README.html
[root@rhel7-11g-1 software]# chown oracle:oinstall p13390677_112040_Linux-x86-64_1of7.zip p13390677_112040_Linux-x86-64_2of7.zip
[root@rhel7-11g-1 software]# ls -ll
total 3957268
drwxrwxr-x 5 grid oinstall 4096 Aug 16 2014 18370031
-rwxrwxr-x 1 grid oinstall 267 Aug 16 2014 bundle.xml
drwxrwxr-x 7 grid oinstall 4096 Aug 27 2013 grid
-rwxrwxr-x 1 oracle oinstall 1395582860 Aug 13 01:00 p13390677_112040_Linux-x86-64_1of7.zip
-rwxrwxr-x 1 oracle oinstall 1151304589 Aug 13 01:00 p13390677_112040_Linux-x86-64_2of7.zip
-rwxrwxr-x 1 grid oinstall 1205251894 Aug 13 01:00 p13390677_112040_Linux-x86-64_3of7.zip
-rwxrwxr-x 1 grid oinstall 174911877 Aug 13 01:02 p18370031_112040_Linux-x86-64.zip
-rwxrwxr-x 1 grid oinstall 124800133 Aug 13 01:02 p6880880_112000_Linux-x86-64.zip
-rw-r--r-- 1 root root 207399 Aug 13 06:33 pdksh-5.2.14-30.x86_64.rpm
-rwxrwxr-x 1 grid oinstall 91340 Aug 16 2014 README.html
-rwxrwxr-x 1 grid oinstall 50396 Aug 16 2014 README.txt
修过内核参数
[root@rh7 u01]# vi /etc/sysctl.conf
[root@rh7 u01]# cd /etc/sysctl.d/
[root@rh7 sysctl.d]# ls
99-sysctl.conf
[root@rh7 sysctl.d]# vi 98-oracle.conf
[root@rh7 sysctl.d]# cat 98-oracle.conf
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 858993459200
net.core.rmem_default = 262144
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
[root@rh7 sysctl.d]# sysctl --system
* Applying /usr/lib/sysctl.d/00-system.conf ...
* Applying /usr/lib/sysctl.d/10-default-yama-scope.conf ...
kernel.yama.ptrace_scope = 0
* Applying /usr/lib/sysctl.d/50-default.conf ...
kernel.sysrq = 16
kernel.core_uses_pid = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.default.promote_secondaries = 1
net.ipv4.conf.all.promote_secondaries = 1
fs.protected_hardlinks = 1
fs.protected_symlinks = 1
* Applying /usr/lib/sysctl.d/60-libvirtd.conf ...
fs.aio-max-nr = 1048576
* Applying /etc/sysctl.d/98-oracle.conf ...
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 858993459200
net.core.rmem_default = 262144
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
* Applying /etc/sysctl.d/99-sysctl.conf ...
* Applying /etc/sysctl.conf ...
修过limits文件
[root@rh7 sysctl.d]# cd /etc/security/limits.d/
[root@rh7 limits.d]# ls
20-nproc.conf
[root@rh7 limits.d]# vi 30-oracle.conf
[root@rh7 limits.d]# cat 30-oracle.conf
grid soft nofile 1024
grid soft nofile 1024
grid hard nofile 65536
grid soft nproc 4096
grid hard nproc 16384
grid soft stack 10240
grid hard stack 32768
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 4096
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
grid soft memlock -1
grid hard memlock -1
oracle soft memlock -1
oracle hard memlock -1
虚拟化环境直接克隆生成二节点
物理机同步一节点的配置
二节点网络配置
[root@rh7 ~]# vi /etc/hostname
[root@rh7 ~]# cat /etc/hostname
rh7.11grac2
[root@rh7 ~]# cd /etc/sysconfig/network-scripts/
[root@rh7 network-scripts]# ls
ifcfg-ens33 ifdown-post ifup-eth ifup-sit
ifcfg-ens34 ifdown-ppp ifup-ib ifup-Team
ifcfg-lo ifdown-routes ifup-ippp ifup-TeamPort
ifdown ifdown-sit ifup-ipv6 ifup-tunnel
ifdown-bnep ifdown-Team ifup-isdn ifup-wireless
ifdown-eth ifdown-TeamPort ifup-plip init.ipv6-global
ifdown-ib ifdown-tunnel ifup-plusb network-functions
ifdown-ippp ifup ifup-post network-functions-ipv6
ifdown-ipv6 ifup-aliases ifup-ppp
ifdown-isdn ifup-bnep ifup-routes
[root@rh7 network-scripts]# vi ifcfg-ens33
[root@rh7 network-scripts]# cat ifcfg-ens33
TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="static"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="yes"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="ens33"
DEVICE="ens33"
ONBOOT="yes"
IPADDR="192.168.159.102"
PREFIX="24"
GATEWAY="192.168.159.1"
IPV6_PRIVACY="no"
[root@rh7 network-scripts]# vi ifcfg-ens34
[root@rh7 network-scripts]# cat ifcfg-ens34
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens34
DEVICE=ens34
ONBOOT=yes
IPADDR=10.0.0.102
PREFIX=24
GATEWAY=10.0.0.1
IPV6_PRIVACY=no
[root@rh7 network-scripts]# systemctl restart network
[root@rh7 network-scripts]# ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.159.102 netmask 255.255.255.0 broadcast 192.168.159.255
inet6 fe80::bf32:d836:7221:4734 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:21:7e:69 txqueuelen 1000 (Ethernet)
RX packets 9 bytes 828 (828.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 25 bytes 2259 (2.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ens34: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.0.102 netmask 255.255.255.0 broadcast 10.0.0.255
inet6 fe80::ca24:c868:59e4:be48 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:21:7e:73 txqueuelen 1000 (Ethernet)
RX packets 11 bytes 948 (948.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 52 bytes 4387 (4.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 132 bytes 11220 (10.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 132 bytes 11220 (10.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:99:d0:de txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Reboot后查看配置是否生效
虚拟机需要对虚拟机配置文件添加如下参数
disk.locking ="FALSE"
diskLib.dataCacheMaxSize="0"
diskLib.dataCacheMaxReadAheadSize="0"
diskLib.DataCacheMinReadAheadSize="0"
diskLib.dataCachePageSize="4096"
diskLib.maxUnsyncedWrites="0"
disk.EnableUUID="TRUE"
查看共享磁盘
[root@rh7 ~]# fdisk -l
Disk /dev/sda: 128.8 GB, 128849018880 bytes, 251658240 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x0009290f
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 251658239 125316096 8e Linux LVM
Disk /dev/sdf: 107.4 GB, 107374182400 bytes, 209715200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sde: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sdd: 10.7 GB, 10737418240 bytes, 20971520 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sdc: 10.7 GB, 10737418240 bytes, 20971520 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sdb: 10.7 GB, 10737418240 bytes, 20971520 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/rhel-root: 111.1 GB, 111140667392 bytes, 217071616 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/rhel-swap: 17.2 GB, 17179869184 bytes, 33554432 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
检查磁盘uuid
[root@rh7 ~]# /usr/lib/udev/scsi_id -g -u /dev/sdb
36000c29662fcaa29f5e0364a82d24fa5
[root@rh7 ~]# /usr/lib/udev/scsi_id -g -u /dev/sde
36000c29b904aaa90ff7366dac077cb4b
[root@rh7 ~]# /usr/lib/udev/scsi_id -g -u /dev/sdc
36000c2968ad39cbe0d930a1a8bb79c57
[root@rh7 ~]# /usr/lib/udev/scsi_id -g -u /dev/sdd
36000c29c63a63c1afefd9a0baeeb7c8b
[root@rh7 ~]# /usr/lib/udev/scsi_id -g -u /dev/sdf
36000c2973c53e496b0d08dc2bdab34cc
绑定磁盘
[root@rh7 ~]# cd /etc/udev/rules.d/
[root@rh7 rules.d]# ls
70-persistent-ipoib.rules
[root@rh7 rules.d]# vi 99-admindevices,rules
[root@rh7 rules.d]# vi 99-admindevices,rules
[root@rh7 rules.d]# cat 99-admindevices,rules
ENV{DEVTYPE}=="disk", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode", RESULT=="36000c29662fcaa29f5e0364a82d24fa5", SYMLINK+="asmdisk001", OWNER="grid", GROUP="asmadmin", MODE="0660"
ENV{DEVTYPE}=="disk", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode", RESULT=="36000c2968ad39cbe0d930a1a8bb79c57", SYMLINK+="asmdisk002", OWNER="grid", GROUP="asmadmin", MODE="0660"
ENV{DEVTYPE}=="disk", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode", RESULT=="36000c29c63a63c1afefd9a0baeeb7c8b", SYMLINK+="asmdisk003", OWNER="grid", GROUP="asmadmin", MODE="0660"
ENV{DEVTYPE}=="disk", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode", RESULT=="36000c29b904aaa90ff7366dac077cb4b", SYMLINK+="asmdisk004", OWNER="grid", GROUP="asmadmin", MODE="0660"
ENV{DEVTYPE}=="disk", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode", RESULT=="36000c2973c53e496b0d08dc2bdab34cc", SYMLINK+="asmdisk005", OWNER="grid", GROUP="asmadmin", MODE="0660"
重新载入udev查看磁盘绑定 grid asmadmin为正常权限
[root@rh7 rules.d]# udevadm trigger --type=devices --action=change
[root@rh7 rules.d]# udevadm control --reload-rules
[root@rh7 rules.d]# ll -al /dev/sd*
brw-rw---- 1 root disk 8, 0 Aug 14 17:01 /dev/sda
brw-rw---- 1 root disk 8, 1 Aug 14 17:01 /dev/sda1
brw-rw---- 1 root disk 8, 2 Aug 14 17:01 /dev/sda2
brw-rw---- 1 grid asmadmin 8, 16 Aug 14 17:01 /dev/sdb
brw-rw---- 1 grid asmadmin 8, 32 Aug 14 17:01 /dev/sdc
brw-rw---- 1 grid asmadmin 8, 48 Aug 14 17:01 /dev/sdd
brw-rw---- 1 grid asmadmin 8, 64 Aug 14 17:01 /dev/sde
brw-rw---- 1 grid asmadmin 8, 80 Aug 14 17:01 /dev/sdf
查看共享磁盘别名
[root@rh7 rules.d]# ll -al /dev/asmdisk*
lrwxrwxrwx 1 root root 3 Aug 14 17:01 /dev/asmdisk001 -> sdb
lrwxrwxrwx 1 root root 3 Aug 14 17:01 /dev/asmdisk002 -> sdc
lrwxrwxrwx 1 root root 3 Aug 14 17:01 /dev/asmdisk003 -> sdd
lrwxrwxrwx 1 root root 3 Aug 14 17:01 /dev/asmdisk004 -> sde
lrwxrwxrwx 1 root root 3 Aug 14 17:01 /dev/asmdisk005 -> sdf
规则文件传送至另一节点
[root@rh7 rules.d]# ls
70-persistent-ipoib.rules 99-admindevices.rules
[root@rh7 rules.d]# scp 99-admindevices.rules 192.168.159.101:/etc/udev/rules.d
The authenticity of host '192.168.159.101 (192.168.159.101)' can't be established.
ECDSA key fingerprint is SHA256:5u6/9nWBNhQps2GyM3euPKMF4YbRfNXaXWxcykT5ztY.
ECDSA key fingerprint is MD5:f1:a5:20:02:ce:35:81:b8:e3:83:13:ae:dd:89:70:5c.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.159.101' (ECDSA) to the list of known hosts.
root@192.168.159.101's password:
- admindevices.rules 100% 1045 4.4MB/s 00:00
查看共享磁盘绑定情况
[root@rh7 ~]# udevadm trigger --type=devices --action=change
[root@rh7 ~]# udevadm control --reload-rules
[root@rh7 ~]# ll -al /dev/sd*
brw-rw---- 1 root disk 8, 0 Aug 14 17:04 /dev/sda
brw-rw---- 1 root disk 8, 1 Aug 14 17:04 /dev/sda1
brw-rw---- 1 root disk 8, 2 Aug 14 17:04 /dev/sda2
brw-rw---- 1 grid asmadmin 8, 16 Aug 14 17:04 /dev/sdb
brw-rw---- 1 grid asmadmin 8, 32 Aug 14 17:04 /dev/sdc
brw-rw---- 1 grid asmadmin 8, 48 Aug 14 17:04 /dev/sdd
brw-rw---- 1 grid asmadmin 8, 64 Aug 14 17:04 /dev/sde
brw-rw---- 1 grid asmadmin 8, 80 Aug 14 17:04 /dev/sdf
[root@rh7 ~]# ll -al /dev/asmdisk*
lrwxrwxrwx 1 root root 3 Aug 14 17:04 /dev/asmdisk001 -> sdb
lrwxrwxrwx 1 root root 3 Aug 14 17:04 /dev/asmdisk002 -> sdc
lrwxrwxrwx 1 root root 3 Aug 14 17:04 /dev/asmdisk003 -> sdd
lrwxrwxrwx 1 root root 3 Aug 14 17:04 /dev/asmdisk004 -> sde
lrwxrwxrwx 1 root root 3 Aug 14 17:04 /dev/asmdisk005 -> sdf
对软件安装包进行赋权
[root@rh7 ~]# cd /u01/software/
[root@rh7 software]# ls
p13390677_112040_Linux-x86-64_1of7.zip p18370031_112040_Linux-x86-64.zip
p13390677_112040_Linux-x86-64_2of7.zip p6880880_112000_Linux-x86-64.zip
p13390677_112040_Linux-x86-64_3of7.zip pdksh-5.2.14-30.x86_64.rpm
[root@rh7 software]# cd ..
[root@rh7 u01]# ls
app software
[root@rh7 u01]# chown -R grid:oinstall software/
[root@rh7 u01]# cd software/
[root@rh7 software]# ls -ld
drwxr-xr-x 2 grid oinstall 4096 Aug 14 16:16 .
[root@rh7 software]# ls -lll
total 3957112
-rw-r--r-- 1 grid oinstall 1395582860 Aug 14 16:15 p13390677_112040_Linux-x86-64_1of7.zip
-rw-r--r-- 1 grid oinstall 1151304589 Aug 14 16:15 p13390677_112040_Linux-x86-64_2of7.zip
-rw-r--r-- 1 grid oinstall 1205251894 Aug 14 16:15 p13390677_112040_Linux-x86-64_3of7.zip
-rw-r--r-- 1 grid oinstall 174911877 Aug 14 16:16 p18370031_112040_Linux-x86-64.zip
-rw-r--r-- 1 grid oinstall 124800133 Aug 14 16:16 p6880880_112000_Linux-x86-64.zip
-rw-r--r-- 1 grid oinstall 207399 Aug 14 16:15 pdksh-5.2.14-30.x86_64.rpm
[root@rh7 software]# chown oracle:oinstall p13390677_112040_Linux-x86-64_1of7.zip
[root@rh7 software]# chown oracle:oinstall p13390677_112040_Linux-x86-64_2of7.zip
一二节点强制安装此包
[root@rh7 software]# rpm -ivh pdksh-5.2.14-30.x86_64.rpm --force --nodeps
warning: pdksh-5.2.14-30.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 73307de6: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:pdksh-5.2.14-30 ################################# [100%]
GI安装
解压GI
[grid@rh7 software]$ unzip p13390677_112040_Linux-x86-64_3of7.zip
开始安装
安装步骤:
Skip software updates
安装配置集群GI
选择高级安装
语言类型默认
与hosts文件保持一致scan名称开头不能以数字开头否则监测不到
添加二节点(名称中间不要带.否则解析会有bug)
配置ssh
配置完成后测试
测试test
确认网卡属性
确认文件系统ASM
修过asm磁盘路径
创建OCR CRS磁盘组
输入密码
Next
Next
确认安装路径
确认产品目录
预检查
选择fix check again
运行修复脚本
[root@rac2 ~]# /tmp/CVU_11.2.0.4.0_grid/runfixup.sh
net.ipv4.ip_local_port_range = 9000 65500
The value for rmem_default in response file is not greater than value of rmem_default for current session. Hence not changing it.
The value for wmem_default in response file is not greater than value of wmem_default for current session. Hence not changing it.
The value for rmem_max in response file is not greater than value of rmem_max for current session. Hence not changing it.
The value for wmem_max in response file is not greater than value of wmem_max for current session. Hence not changing it.
The value for aio-max-nr in response file is not greater than value of aio-max-nr for current session. Hence not changing it.
Installing Package /tmp/CVU_11.2.0.4.0_grid//cvuqdisk-1.0.9-1.rpm
Preparing... ################################# [100%]
Updating / installing...
1:cvuqdisk-1.0.9-1 ################################# [100%]
[root@rac1 ~]# /tmp/CVU_11.2.0.4.0_grid/runfixup.sh
Response file being used is :/tmp/CVU_11.2.0.4.0_grid/fixup.response
Enable file being used is :/tmp/CVU_11.2.0.4.0_grid/fixup.enable
Log file location: /tmp/CVU_11.2.0.4.0_grid/orarun.log
Ignore all
Yes
Install
执行root脚本前需要打补丁
[grid@rhel7-11g-2 ~]$ cd $ORACLE_HOME
[grid@rhel7-11g-2 grid]$ mv OPatch OPatch.old
[grid@rhel7-11g-2 grid]$ cd /u01/software/
[grid@rhel7-11g-2 software]$ ls
18370031 p13390677_112040_Linux-x86-64_1of7.zip p13390677_112040_Linux-x86-64_3of7.zip p6880880_112000_Linux-x86-64.zip README.html
bundle.xml p13390677_112040_Linux-x86-64_2of7.zip p18370031_112040_Linux-x86-64.zip pdksh-5.2.14-30.x86_64.rpm README.txt
将最新OPatch解压至oracle_home目录
unzip -d $ORACLE_HOME p6880880_112000_Linux-x86-64.zip
检查补丁情况
[grid@rac1 18370031]$ $ORACLE_HOME/OPatch/opatch lsinv
Oracle Interim Patch Installer version 11.2.0.3.34
Copyright (c) 2022, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/11.2.0/grid_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/11.2.0/grid_1/oraInst.loc
OPatch version : 11.2.0.3.34
OUI version : 11.2.0.4.0
Log file location : /u01/app/11.2.0/grid_1/cfgtoollogs/opatch/opatch2022-08-14_18-16-20PM_1.log
Lsinventory Output file location : /u01/app/11.2.0/grid_1/cfgtoollogs/opatch/lsinv/lsinventory2022-08-14_18-16-20PM.txt
--------------------------------------------------------------------------------
Local Machine Information::
Hostname: rac1
ARU platform id: 226
ARU platform description:: Linux x86-64
Installed Top-level Products (1):
Oracle Grid Infrastructure 11g 11.2.0.4.0
There are 1 products installed in this Oracle Home.
There are no Interim patches installed in this Oracle Home.
安装补丁
[grid@rac1 software]$ cd 18370031/
[grid@rac1 18370031]$ $ORACLE_HOME/OPatch/opatch apply
Oracle Interim Patch Installer version 11.2.0.3.34
Copyright (c) 2022, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/11.2.0/grid_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/11.2.0/grid_1/oraInst.loc
OPatch version : 11.2.0.3.34
OUI version : 11.2.0.4.0
Log file location : /u01/app/11.2.0/grid_1/cfgtoollogs/opatch/opatch2022-08-14_18-16-49PM_1.log
Verifying environment and performing prerequisite checks...
--------------------------------------------------------------------------------
Start OOP by Prereq process.
Launch OOP...
Oracle Interim Patch Installer version 11.2.0.3.34
Copyright (c) 2022, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/11.2.0/grid_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/11.2.0/grid_1/oraInst.loc
OPatch version : 11.2.0.3.34
OUI version : 11.2.0.4.0
Log file location : /u01/app/11.2.0/grid_1/cfgtoollogs/opatch/opatch2022-08-14_18-16-54PM_1.log
Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 18370031
Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/11.2.0/grid_1')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '18370031' to OH '/u01/app/11.2.0/grid_1'
Patching component oracle.crs, 11.2.0.4.0...
Patch 18370031 successfully applied.
Log file location: /u01/app/11.2.0/grid_1/cfgtoollogs/opatch/opatch2022-08-14_18-16-54PM_1.log
OPatch succeeded.
检查安装情况
[grid@rac2 18370031]$ $ORACLE_HOME/OPatch/opatch lsinv
Oracle Interim Patch Installer version 11.2.0.3.34
Copyright (c) 2022, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/11.2.0/grid_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/11.2.0/grid_1/oraInst.loc
OPatch version : 11.2.0.3.34
OUI version : 11.2.0.4.0
Log file location : /u01/app/11.2.0/grid_1/cfgtoollogs/opatch/opatch2022-08-14_18-19-29PM_1.log
Lsinventory Output file location : /u01/app/11.2.0/grid_1/cfgtoollogs/opatch/lsinv/lsinventory2022-08-14_18-19-29PM.txt
--------------------------------------------------------------------------------
Local Machine Information::
Hostname: rac2
ARU platform id: 226
ARU platform description:: Linux x86-64
Installed Top-level Products (1):
Oracle Grid Infrastructure 11g 11.2.0.4.0
There are 1 products installed in this Oracle Home.
Interim patches (1) :
Patch 18370031 : applied on Sun Aug 14 18:19:24 CST 2022
Unique Patch ID: 17950825
Patch description: "Grid Infrastructure Patch Set Update : 11.2.0.4.x (gibugno)"
Created on 15 Aug 2014, 16:14:40 hrs PST8PDT
Bugs fixed:
18370031
一节点执行orainstRoot脚本
[root@rac1 ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
二节点执行orainstRoot脚本
[root@rac2 ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
一节点执行root脚本
[root@rac1 ~]# /u01/app/11.2.0/grid/root.sh
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/app/11.2.0/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
Installing Trace File Analyzer
OLR initialization - successful
root wallet
root wallet cert
root cert export
peer wallet
profile reader wallet
pa wallet
peer wallet keys
pa wallet keys
peer cert request
pa cert request
peer cert
pa cert
peer root cert TP
profile reader root cert TP
pa root cert TP
peer pa cert TP
pa peer cert TP
profile reader pa cert TP
profile reader peer cert TP
peer user cert
pa user cert
Adding Clusterware entries to oracle-ohasd.service
CRS-2672: Attempting to start 'ora.mdnsd' on 'rac1'
CRS-2676: Start of 'ora.mdnsd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'rac1'
CRS-2676: Start of 'ora.gpnpd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'rac1'
CRS-2672: Attempting to start 'ora.gipcd' on 'rac1'
CRS-2676: Start of 'ora.cssdmonitor' on 'rac1' succeeded
CRS-2676: Start of 'ora.gipcd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'rac1'
CRS-2672: Attempting to start 'ora.diskmon' on 'rac1'
CRS-2676: Start of 'ora.diskmon' on 'rac1' succeeded
CRS-2676: Start of 'ora.cssd' on 'rac1' succeeded
ASM created and started successfully.
Disk Group CRS created successfully.
clscfg: -install mode specified
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4256: Updating the profile
Successful addition of voting disk 78b030f449754fcdbf5f1597560cacb5.
Successful addition of voting disk 151385a1b5fc4f53bff060461584a996.
Successful addition of voting disk 3d89d2e6278e4fe9bfaec5f8011412b0.
Successfully replaced voting disk group with +CRS.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 78b030f449754fcdbf5f1597560cacb5 (/dev/sdb) [CRS]
2. ONLINE 151385a1b5fc4f53bff060461584a996 (/dev/sdc) [CRS]
3. ONLINE 3d89d2e6278e4fe9bfaec5f8011412b0 (/dev/sdd) [CRS]
Located 3 voting disk(s).
CRS-2672: Attempting to start 'ora.asm' on 'rac1'
CRS-2676: Start of 'ora.asm' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.CRS.dg' on 'rac1'
CRS-2676: Start of 'ora.CRS.dg' on 'rac1' succeeded
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
二节点执行root脚本
[root@rac2 ~]# /u01/app/11.2.0/grid/root.sh
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/app/11.2.0/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
Installing Trace File Analyzer
OLR initialization - successful
Adding Clusterware entries to oracle-ohasd.service
CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node rac1, number 1, and is terminating
An active cluster was found during exclusive startup, restarting to join the cluster
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
点击OK
点击OK
Next
Yes
安装数据库
[root@rac1 software]# chown oracle:oinstall p13390677_112040_Linux-x86-64_1of7.zip p13390677_112040_Linux-x86-64_2of7.zip
[root@rac1 software]# ls -ll
total 3957268
drwxrwxr-x 5 grid oinstall 4096 Aug 16 2014 18370031
-rwxrwxr-x 1 grid oinstall 267 Aug 16 2014 bundle.xml
drwxrwxr-x 7 grid oinstall 4096 Aug 27 2013 grid
-rwxrwxr-x 1 oracle oinstall 1395582860 Aug 14 16:15 p13390677_112040_Linux-x86-64_1of7.zip
-rwxrwxr-x 1 oracle oinstall 1151304589 Aug 14 16:15 p13390677_112040_Linux-x86-64_2of7.zip
-rwxrwxr-x 1 grid oinstall 1205251894 Aug 14 16:15 p13390677_112040_Linux-x86-64_3of7.zip
-rwxrwxr-x 1 grid oinstall 174911877 Aug 14 16:16 p18370031_112040_Linux-x86-64.zip
-rwxrwxr-x 1 grid oinstall 124800133 Aug 14 16:16 p6880880_112000_Linux-x86-64.zip
-rwxrwxr-x 1 grid oinstall 207399 Aug 14 16:15 pdksh-5.2.14-30.x86_64.rpm
-rwxrwxr-x 1 grid oinstall 91340 Aug 16 2014 README.html
-rwxrwxr-x 1 grid oinstall 50396 Aug 16 2014 README.txt
确保集群服务正常后进行安装
[root@rac1 software]# /u01/app/11.2.0/grid/bin/crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.CRS.dg
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.LISTENER.lsnr
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.asm
ONLINE ONLINE rac1 Started
ONLINE ONLINE rac2 Started
ora.gsd
OFFLINE OFFLINE rac1
OFFLINE OFFLINE rac2
ora.net1.network
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.ons
ONLINE ONLINE rac1
ONLINE ONLINE rac2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE rac1
ora.cvu
1 ONLINE ONLINE rac1
ora.oc4j
1 ONLINE ONLINE rac1
ora.rac1.vip
1 ONLINE ONLINE rac1
ora.rac2.vip
1 ONLINE ONLINE rac2
ora.scan1.vip
1 ONLINE ONLINE rac1
Setup配置ssh互信
等待...
失败手工配置ssh
[oracle@rac1 sshsetup]$ ./sshUserSetup.sh -user oracle -hosts "rac1 rac2" -advanced -noPromptPassphrase
The output of this script is also logged into /tmp/sshUserSetup_2022-08-14-21-22-16.log
Hosts are rac1 rac2
user is oracle
Platform:- Linux
Checking if the remote hosts are reachable
PING rac1 (192.168.159.101) 56(84) bytes of data.
64 bytes from rac1 (192.168.159.101): icmp_seq=1 ttl=64 time=0.019 ms
64 bytes from rac1 (192.168.159.101): icmp_seq=2 ttl=64 time=0.060 ms
64 bytes from rac1 (192.168.159.101): icmp_seq=3 ttl=64 time=0.064 ms
64 bytes from rac1 (192.168.159.101): icmp_seq=4 ttl=64 time=0.028 ms
64 bytes from rac1 (192.168.159.101): icmp_seq=5 ttl=64 time=0.069 ms
--- rac1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3999ms
rtt min/avg/max/mdev = 0.019/0.048/0.069/0.020 ms
PING rac2 (192.168.159.102) 56(84) bytes of data.
64 bytes from rac2 (192.168.159.102): icmp_seq=1 ttl=64 time=0.149 ms
64 bytes from rac2 (192.168.159.102): icmp_seq=2 ttl=64 time=0.158 ms
64 bytes from rac2 (192.168.159.102): icmp_seq=3 ttl=64 time=0.177 ms
64 bytes from rac2 (192.168.159.102): icmp_seq=4 ttl=64 time=0.147 ms
64 bytes from rac2 (192.168.159.102): icmp_seq=5 ttl=64 time=0.150 ms
--- rac2 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4000ms
rtt min/avg/max/mdev = 0.147/0.156/0.177/0.013 ms
Remote host reachability check succeeded.
The following hosts are reachable: rac1 rac2.
The following hosts are not reachable: .
All hosts are reachable. Proceeding further...
firsthost rac1
numhosts 2
The script will setup SSH connectivity from the host rac1 to all
the remote hosts. After the script is executed, the user can use SSH to run
commands on the remote hosts or copy files between this host rac1
and the remote hosts without being prompted for passwords or confirmations.
NOTE 1:
As part of the setup procedure, this script will use ssh and scp to copy
files between the local host and the remote hosts. Since the script does not
store passwords, you may be prompted for the passwords during the execution of
the script whenever ssh or scp is invoked.
NOTE 2:
AS PER SSH REQUIREMENTS, THIS SCRIPT WILL SECURE THE USER HOME DIRECTORY
AND THE .ssh DIRECTORY BY REVOKING GROUP AND WORLD WRITE PRIVILEDGES TO THESE
directories.
Do you want to continue and let the script make the above mentioned changes (yes/no)?
yes
The user chose yes
User chose to skip passphrase related questions.
Creating .ssh directory on local host, if not present already
Creating authorized_keys file on local host
Changing permissions on authorized_keys to 644 on local host
Creating known_hosts file on local host
Changing permissions on known_hosts to 644 on local host
Creating config file on local host
If a config file exists already at /home/oracle/.ssh/config, it would be backed up to /home/oracle/.ssh/config.backup.
Creating .ssh directory and setting permissions on remote host rac1
THE SCRIPT WOULD ALSO BE REVOKING WRITE PERMISSIONS FOR group AND others ON THE HOME DIRECTORY FOR oracle. THIS IS AN SSH REQUIREMENT.
The script would create ~oracle/.ssh/config file on remote host rac1. If a config file exists already at ~oracle/.ssh/config, it would be backed up to ~oracle/.ssh/config.backup.
The user may be prompted for a password here since the script would be running SSH on host rac1.
Warning: Permanently added 'rac1,192.168.159.101' (ECDSA) to the list of known hosts.
oracle@rac1's password:
Done with creating .ssh directory and setting permissions on remote host rac1.
Creating .ssh directory and setting permissions on remote host rac2
THE SCRIPT WOULD ALSO BE REVOKING WRITE PERMISSIONS FOR group AND others ON THE HOME DIRECTORY FOR oracle. THIS IS AN SSH REQUIREMENT.
The script would create ~oracle/.ssh/config file on remote host rac2. If a config file exists already at ~oracle/.ssh/config, it would be backed up to ~oracle/.ssh/config.backup.
The user may be prompted for a password here since the script would be running SSH on host rac2.
Warning: Permanently added 'rac2,192.168.159.102' (ECDSA) to the list of known hosts.
Done with creating .ssh directory and setting permissions on remote host rac2.
Copying local host public key to the remote host rac1
The user may be prompted for a password or passphrase here since the script would be using SCP for host rac1.
oracle@rac1's password:
Done copying local host public key to the remote host rac1
Copying local host public key to the remote host rac2
The user may be prompted for a password or passphrase here since the script would be using SCP for host rac2.
Done copying local host public key to the remote host rac2
Creating keys on remote host rac1 if they do not exist already. This is required to setup SSH on host rac1.
Creating keys on remote host rac2 if they do not exist already. This is required to setup SSH on host rac2.
Updating authorized_keys file on remote host rac1
Updating known_hosts file on remote host rac1
Updating authorized_keys file on remote host rac2
Updating known_hosts file on remote host rac2
cat: /home/oracle/.ssh/known_hosts.tmp: No such file or directory
cat: /home/oracle/.ssh/authorized_keys.tmp: No such file or directory
SSH setup is complete.
------------------------------------------------------------------------
Verifying SSH setup
===================
The script will now run the date command on the remote nodes using ssh
to verify if ssh is setup correctly. IF THE SETUP IS CORRECTLY SETUP,
THERE SHOULD BE NO OUTPUT OTHER THAN THE DATE AND SSH SHOULD NOT ASK FOR
PASSWORDS. If you see any output other than date or are prompted for the
password, ssh is not setup correctly and you will need to resolve the
issue and set up ssh again.
The possible causes for failure could be:
1. The server settings in /etc/ssh/sshd_config file do not allow ssh
for user oracle.
2. The server may have disabled public key based authentication.
3. The client public key on the server may be outdated.
4. ~oracle or ~oracle/.ssh on the remote host may not be owned by oracle.
5. User may not have passed -shared option for shared remote users or
may be passing the -shared option for non-shared remote users.
6. If there is output in addition to the date, but no password is asked,
it may be a security alert shown as part of company policy. Append the
additional text to the <OMS HOME>/sysman/prov/resources/ignoreMessages.txt file.
------------------------------------------------------------------------
--rac1:--
Running /usr/bin/ssh -x -l oracle rac1 date to verify SSH connectivity has been setup from local host to rac1.
IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. Please note that being prompted for a passphrase may be OK but being prompted for a password is ERROR.
Sun Aug 14 21:22:34 CST 2022
------------------------------------------------------------------------
--rac2:--
Running /usr/bin/ssh -x -l oracle rac2 date to verify SSH connectivity has been setup from local host to rac2.
IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. Please note that being prompted for a passphrase may be OK but being prompted for a password is ERROR.
Sun Aug 14 21:22:34 CST 2022
------------------------------------------------------------------------
------------------------------------------------------------------------
Verifying SSH connectivity has been setup from rac1 to rac1
IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL.
bash: -c: line 0: unexpected EOF while looking for matching `"'
bash: -c: line 1: syntax error: unexpected end of file
------------------------------------------------------------------------
------------------------------------------------------------------------
Verifying SSH connectivity has been setup from rac1 to rac2
IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL.
bash: -c: line 0: unexpected EOF while looking for matching `"'
bash: -c: line 1: syntax error: unexpected end of file
------------------------------------------------------------------------
-Verification from complete-
SSH verification complete.
一节点
[oracle@rac1 sshsetup]$ ssh rac1 date;ssh rac2 date;ssh rac1-priv date;ssh rac2-priv date
Sun Aug 14 21:23:53 CST 2022
Sun Aug 14 21:23:53 CST 2022
The authenticity of host 'rac1-priv (10.0.0.101)' can't be established.
ECDSA key fingerprint is SHA256:5u6/9nWBNhQps2GyM3euPKMF4YbRfNXaXWxcykT5ztY.
ECDSA key fingerprint is MD5:f1:a5:20:02:ce:35:81:b8:e3:83:13:ae:dd:89:70:5c.
Are you sure you want to continue connecting (yes/no)? yes\
Warning: Permanently added 'rac1-priv,10.0.0.101' (ECDSA) to the list of known hosts.
Sun Aug 14 21:23:55 CST 2022
The authenticity of host 'rac2-priv (10.0.0.102)' can't be established.
ECDSA key fingerprint is SHA256:5u6/9nWBNhQps2GyM3euPKMF4YbRfNXaXWxcykT5ztY.
ECDSA key fingerprint is MD5:f1:a5:20:02:ce:35:81:b8:e3:83:13:ae:dd:89:70:5c.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac2-priv,10.0.0.102' (ECDSA) to the list of known hosts.
Sun Aug 14 21:23:58 CST 2022
[oracle@rac1 sshsetup]$ ssh rac1 date;ssh rac2 date;ssh rac1-priv date;ssh rac2-priv date
Sun Aug 14 21:23:59 CST 2022
Sun Aug 14 21:23:59 CST 2022
Sun Aug 14 21:23:59 CST 2022
Sun Aug 14 21:24:00 CST 2022
二节点
[oracle@rac2 ~]$ ssh rac1 date;ssh rac2 date;ssh rac1-priv date;ssh rac2-priv date
Sun Aug 14 21:24:09 CST 2022
Sun Aug 14 21:24:10 CST 2022
The authenticity of host 'rac1-priv (10.0.0.101)' can't be established.
ECDSA key fingerprint is SHA256:5u6/9nWBNhQps2GyM3euPKMF4YbRfNXaXWxcykT5ztY.
ECDSA key fingerprint is MD5:f1:a5:20:02:ce:35:81:b8:e3:83:13:ae:dd:89:70:5c.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac1-priv,10.0.0.101' (ECDSA) to the list of known hosts.
Sun Aug 14 21:24:11 CST 2022
The authenticity of host 'rac2-priv (10.0.0.102)' can't be established.
ECDSA key fingerprint is SHA256:5u6/9nWBNhQps2GyM3euPKMF4YbRfNXaXWxcykT5ztY.
ECDSA key fingerprint is MD5:f1:a5:20:02:ce:35:81:b8:e3:83:13:ae:dd:89:70:5c.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac2-priv,10.0.0.102' (ECDSA) to the list of known hosts.
Sun Aug 14 21:24:13 CST 2022
[oracle@rac2 ~]$ ssh rac1 date;ssh rac2 date;ssh rac1-priv date;ssh rac2-priv date
Sun Aug 14 21:24:14 CST 2022
Sun Aug 14 21:24:14 CST 2022
Sun Aug 14 21:24:14 CST 2022
Sun Aug 14 21:24:14 CST 2022
验证test,成功。
Next
Next企业版
数据库安装路径
Next
忽略
忽略报错
开始安装
报错处理
报错处理:
[oracle@rac1 sshsetup]$ cd $ORACLE_HOME/sysman
[oracle@rac1 sysman]$ cd lib/
[oracle@rac1 lib]$ cp ins_emagent.mk ins_emagent.mk.bak
[oracle@rac1 lib]$ vi ins_emagent.mk
$(MK_EMAGENT_NMECTL) -lnnz11
添加内容--lnnz11(艾路嗯嗯Z妖妖)
Retry正常进行安装
拷贝数据库软件阶段
[oracle@rac2 db_1]$ du -sh $ORACLE_HOME
1.2G /u01/app/oracle/product/11.2.0/db_1/
[oracle@rac2 db_1]$ du -sh $ORACLE_HOME
1.2G /u01/app/oracle/product/11.2.0/db_1/
[oracle@rac2 db_1]$ du -sh $ORACLE_HOME
1.5G /u01/app/oracle/product/11.2.0/db_1/
[oracle@rac2 db_1]$ du -sh $ORACLE_HOME
1.5G /u01/app/oracle/product/11.2.0/db_1/
[oracle@rac2 db_1]$ du -sh $ORACLE_HOME
2.9G /u01/app/oracle/product/11.2.0/db_1/
[oracle@rac2 db_1]$ du -sh $ORACLE_HOME
2.9G /u01/app/oracle/product/11.2.0/db_1/
[oracle@rac2 db_1]$ du -sh $ORACLE_HOME
3.0G /u01/app/oracle/product/11.2.0/db_1/
[oracle@rac2 db_1]$ du -sh $ORACLE_HOME
3.0G /u01/app/oracle/product/11.2.0/db_1/
[oracle@rac2 db_1]$ du -sh $ORACLE_HOME
3.9G /u01/app/oracle/product/11.2.0/db_1/
[oracle@rac2 db_1]$ du -sh $ORACLE_HOME
4.0G /u01/app/oracle/product/11.2.0/db_1/
[oracle@rac2 db_1]$ du -sh $ORACLE_HOME
4.0G /u01/app/oracle/product/11.2.0/db_1/
[oracle@rac2 db_1]$ du -sh $ORACLE_HOME
4.0G /u01/app/oracle/product/11.2.0/db_1/
[oracle@rac2 db_1]$ du -sh $ORACLE_HOME
4.2G /u01/app/oracle/product/11.2.0/db_1/
[oracle@rac2 db_1]$ du -sh $ORACLE_HOME
4.2G /u01/app/oracle/product/11.2.0/db_1/
一节点
[root@rac1 software]# du -sh /u01/app/oracle/product/11.2.0/db_1/
4.2G /u01/app/oracle/product/11.2.0/db_1/
执行root脚本
二节点先执行
[root@rac2 ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
一节点执行
[root@rac1 ~]# /u01/app/oracle/product/11.2.0/db_1/root.sh
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.0/db_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
二节点执行
[root@rac2 ~]# /u01/app/oracle/product/11.2.0/db_1/root.sh
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.0/db_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
安装完成
创建ASM磁盘组
虚拟机bug重启个节点系统数据库服务
[root@rac1 ~]# /u01/app/11.2.0/grid/bin/crsctl stop crs -f
[root@rac2 ~]# /u01/app/11.2.0/grid/bin/crsctl stop crs -f
[root@rac1 ~]# /u01/app/11.2.0/grid/bin/crsctl disable crs
CRS-4621: Oracle High Availability Services autostart is disabled.
[root@rac2 ~]# /u01/app/11.2.0/grid/bin/crsctl disable crs
CRS-4621: Oracle High Availability Services autostart is disabled.
关闭一节点再关闭二节点 等待一节点启动以后再启动二节点
启动集群
[root@rac1 ~]# /u01/app/11.2.0/grid/bin/crsctl start crs
[root@rac2 ~]# /u01/app/11.2.0/grid/bin/crsctl start crs
[root@rac1 ~]# /u01/app/11.2.0/grid/bin/crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCH.dg
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.CRS.dg
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.DATA.dg
ONLINE ONLINE rac1
ONLINE ONLINE rac2
确认磁盘组状态
创建实例[oracle@rac1 ~]$ dbca
创建数据库
选择事务处理
注意同时勾选一二节点
不配置OEM
视情况而定选择
配置sys,system密码
数据盘
闪回区路径
直接默认不安装示例
视情况而定配置各个参数
OK
创建实例中
创建完成
检查oracle集群状态:
[root@rac1 ~]# /u01/app/11.2.0/grid/bin/crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCH.dg
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.CRS.dg
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.DATA.dg
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.LISTENER.lsnr
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.asm
ONLINE ONLINE rac1 Started
ONLINE ONLINE rac2 Started
ora.gsd
OFFLINE OFFLINE rac1
OFFLINE OFFLINE rac2
ora.net1.network
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.ons
ONLINE ONLINE rac1
ONLINE ONLINE rac2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE rac1
ora.cvu
1 ONLINE ONLINE rac1
ora.oc4j
1 ONLINE ONLINE rac1
ora.orcl.db
1 ONLINE ONLINE rac1 Open
2 ONLINE ONLINE rac2 Open
ora.rac1.vip
1 ONLINE ONLINE rac1
ora.rac2.vip
1 ONLINE ONLINE rac2
ora.scan1.vip
1 ONLINE ONLINE rac1
一节点查看监听状态
[root@rac1 ~]# su - oracle
Last login: Sun Aug 14 22:05:38 CST 2022 on :1
[oracle@rac1 ~]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 14-AUG-2022 22:21:53
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 14-AUG-2022 22:00:26
Uptime 0 days 0 hr. 21 min. 26 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File /u01/app/grid/diag/tnslsnr/rac1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.159.101)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.159.103)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
Instance "orcl1", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl1", status READY, has 1 handler(s) for this service...
The command completed successfully
二节点查看监听状态
[oracle@rac2 ~]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 14-AUG-2022 22:22:03
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 14-AUG-2022 22:02:02
Uptime 0 days 0 hr. 20 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File /u01/app/grid/diag/tnslsnr/rac2/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.159.102)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.159.104)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
Instance "orcl2", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl2", status READY, has 1 handler(s) for this service...
The command completed successfully
rac安装完成!!!
Linux7 安装oracle11g rac过程相关推荐
- 多种虚拟机环境下安装Oracle11g RAC
1.安全环境与网络规划 1.1.安装环境 RAC节点操作系统:Linux 6.4 x8664 Cluster software:Oracle Grid Infrastructure 11gr2(11. ...
- Linux下安装Oracle11G详细过程
需要安装oracle dataguard,所以先要安装单台oracle11g,下面是单台oracle11g的详细安装过程. 1,安装环境 硬件环境:2台linux虚拟机,Centos6.4 ,4G , ...
- 实战篇:Linux7 安装 Oracle 19C RAC 详细图文教程
前言 之前发过一篇Oracle 11G RAC手把手教程,有朋友留言评论:19C都出了,为什么还在教11G? 一步步教你Linux7安装Oracle RAC(11GR2版本) 既然如此,那就趁着周末边 ...
- 【安装篇】- 基于 VMWARE Oracle Linux7.9 安装 Oracle19c RAC 详细配置方案
作者 | yanwei 来源 | 墨天轮 https://www.modb.pro/db/95684 大家好,我是 JiekeXu,很高兴又和大家见面了,今天和大家一起来看看 Linux7.9 安装 ...
- ORACLE11G RAC 在 centeros5.5 的安装日志
服务器 DELL R410 2台 CPU INTER E5620 .4GHz 12M4C MEM 64G DISK 300G 存储器 DS3512 DISK 600G*12 RAID5 ...
- oracle linux 图形化,Linux7图形化安装Oracle11g教程,亲测实用有效!
linux图形化安装Oracle11g和静默安装Oracle11g前面步骤是一样的,可以参考Linux7静默安装Oracle11g教程,亲测实用有效!的前11步骤,接下来: 12.开始安装 切换到or ...
- Vmware+RHEL5+Oracle 10G RAC安装实验--详细过程(一)
实验环境: 普通PC一台(3GB内存,500GB硬盘) Vmware Server 1.0.6版 RedHat Linux Enterprise 5.1 Oracle 10g for linux(1 ...
- HP-UX静默安装oracle11g过程
HP-UX 安装oracle11g过程 规划: 安装文件存放在/tmp目录下,目录层次自拟 数据库安装在/orain目录下,目录层次自拟 数据库数据文件存放在/oracle目录下,目录层次自拟 # ...
- linux下Oracle11g RAC搭建(六)
linux下Oracle11g RAC搭建(六) 五.校验安装前的环境 root身份下完毕解压grid.database安装包 [grid@node1 soft]$ su - Password: [r ...
最新文章
- 倍增LCA NOIP2013 货车运输
- 2022年了,PyTorch和TensorFlow选哪个?
- 这种口令解决方案可替代多因子验证
- jquery选择器的一些处理
- 网站架构相关PPT、文章整理
- verilog中的综合与不可综合
- 社交评论插件简单对比
- gcn 图卷积神经网络_GCN图卷积网络入门详解
- mysqld_exporter报错Error 1146: Table 'my2.status' doesn't exist
- FirewallD常用命令及设置
- MySQL事务操作原理与用法详解
- IPVS使用的Netfilter Hook点
- newifi3刷机 php,newifi3breed解锁新路由3刷机免解锁刷breed详细方法老毛子Padavan固件...
- SAP ABAP ALV 布局 特定用户 及缺省设置控制
- wifidog认证php,ddwrt+wifidog搭建热点认证系统(无线路由器web认证)
- QT QtableView操作详解
- lodop设置html字体大小无效,LODOP设置纸张无效问题
- VS Code Server for WSL closed unexpectedly
- 由“最惨创业者”事件引起的“风险法则”与“生存法则”共生思考
- 多页大文件pdf转wrod
热门文章
- 【开发工具】Windows环境下 IDEA 开发工具安装配置(无错完整)
- 世界上最爱吃狗肉的国家,每年吃掉400万只狗,玉林人也甘拜下风
- 如何做好一个TeamLeader,欢迎留言探讨
- java 修饰符默认_Java中的默认访问修饰符是什么?
- 随机变量及其函数分布
- openGL+Python=PyopenGL模块
- 201771010110孔维滢面向对象程序设计(Java)第7周学习指导及要求
- 跑胡子胡牌算法(带赖子、基于回溯算法)
- 高德地图多点标记 marker JSAPI
- 论文记录_MobileNets Efficient Convolutional Neural Networks for Mobile Vision Application