oracle 12c rac 詳細部署教程(二)
yum install oracle-database-server-12cR2-preinstall.x86_64 -y #兩個節點都進行安裝
資源限制引數配置:(兩個節點)
vi /etc/security/limits.d/oracle-database-server-12cR2-preinstall.conf
增加grid使用者的資源限制配置
重啟兩個節點作業系統
reboot
兩節點檢查
cat /sys/kernel/mm/transparent_hugepage/enabled
需要為never狀態
如果未被禁用,編輯/etc/default/grub,在GRUB_CMDLINE_LINUX末尾處加入選項transparent_hugepage=never",然後重啟啟動系統
使用者組新增(兩個節點執行)
groupadd -g 54327 asmdba
groupadd -g 54328 asmoper
groupadd -g 54329 asmadmin
新增使用者及設定密碼(兩個節點執行)
useradd -u 54322 -g oinstall -G dba,oinstall,asmadmin,asmdba,asmoper,racdba grid
echo "grid123" | passwd --stdin grid
修改oracle使用者所屬組及修改密碼(兩個節點執行)
usermod -G dba,asmdba,backupdba,dgdba,kmdba,racdba,oper oracle
echo "oracle123" | passwd --stdin oracle
檢查使用者
兩個節點執行
mkdir -p /u01/grid
mkdir -p /u01/grid12c
mkdir -p /u01/oracle/product/12c/db_home1
chown -R grid:oinstall /u01
chown -R oracle:oinstall /u01/oracle
兩個節點執行
su - grid #切換到grid使用者下執行
vi ~/.bash_profile
增加以下內容:
export ORACLE_BASE=/u01/grid
export ORACLE_HOME=/u01/grid12c
export ORACLE_SID=+ASM1 #節點2 SID +ASM2
PATH=$PATH:$HOME/.local/bin:$HOME/bin:$ORACLE_HOME/bin
source ~/.bash_profile #使配置生效
su - oracle #切換到oracle使用者下執行
vi ~/.bash_profile
增加以下內容:
export ORACLE_BASE=/u01/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12c/db_home1
export ORACLE_SID=db12c1 #節點2 SID db12c2
PATH=$PATH:$HOME/.local/bin:$HOME/bin:$ORACLE_HOME/bin
source ~/.bash_profile #使配置生效
兩個節點操作(root使用者)
yum install iscsi* -y
iscsiadm -m discovery -t st -p 43.98.49.146 #43.98.49.146 為openfile儲存系統地址
iscsiadm -m node -L all
systemctl enable iscsi.service
systemctl enable iscsid.service
檢查磁碟載入情況:
2.15使用udev繫結磁碟
生產環境中,儲存裝置一般與SAN交換機連線,oracle物理機與SAN交換的連線正常都是提供雙線路冗餘,所以一般還需要配置多路徑儲存軟體(如Multipath)。見文件《Oracle Linux 7.8 多路徑(Multipath)+Udev繫結磁碟》
此文件提供的環境,不需要配置多路徑。
建立並配置udev rules檔案
兩個節點執行以下指令碼:
for
i in c d e f g h i j k l m; do echo
"KERNEL==\"sd*\",ENV{DEVTYPE}==\"disk\",SUBSYSTEM==\"block\",PROGRAM==\"/usr/lib/udev/scsi_id
-g -u -d \$devnode\",RESULT==\"`/usr/lib/udev/scsi_id -g -u
/dev/sd$i`\",RUN+=\"/bin/sh -c 'mknod /dev/asm-disk$i b \$major \$minor;
chown grid:asmadmin /dev/asm-disk$i; chmod 0660 /dev/asm-disk$i'\""
>> /etc/udev/rules.d/99-oracle-asmdevices.rules; done
重啟服務
/sbin/udevadm trigger --type=devices --action=change
/sbin/udevadm control --reload
檢視磁碟
ll /dev/asm-disk*
說明:這一步,也可以在安裝grid和oracle軟體時,在UI介面上配置也可以
node1
手動配置
su - grid #切換到grid使用者
[grid@node1 ~]$ ssh-keygen #輸入命令後,一直按Enter鍵完成。
Generating public/private rsa key pair.
Enter file in which to save the key (/home/grid/.ssh/id_rsa):
Created directory '/home/grid/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/grid/.ssh/id_rsa.
Your public key has been saved in /home/grid/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:yyrK0XsgjLKDeLyitfZyZ4xrSUVr6g1supV46Exfddk grid@node1
The key's randomart image is:
+---[RSA 2048]----+
| |
| . |
| . . |
| + o |
| o . + S o E |
|o o+B. o o |
|+o**=B. o |
|****Bo*. |
|o=OO=*. |
+----[SHA256]-----+
[grid@node1 ~]$
[grid@node1 ~]$ ssh-copy-id -i ~/.ssh/id_rsa.pub node1 #copy 公鑰到node1
/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/grid/.ssh/id_rsa.pub"
The authenticity of host 'node1 (43.98.49.147)' can't be established.
ECDSA key fingerprint is SHA256:P+rVlB3D4Ze1gcV4brcuZCbqcmTVAT3Ab+RSniz+fG4.
ECDSA key fingerprint is MD5:e4:ce:00:89:fa:10:5c:6c:4e:85:71:51:8a:65:cf:09.
Are you sure you want to continue connecting (yes/no)? yes #輸入 yes
/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
grid@node1's password: #輸入grid使用者密碼
Number of key(s) added: 1
Now try logging into the machine, with: "ssh 'node1'"
and check to make sure that only the key(s) you wanted were added.
[grid@node1 ~]$
[grid@node1 ~]$ ssh-copy-id -i ~/.ssh/id_rsa.pub node2 #copy 公鑰到node2
/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/grid/.ssh/id_rsa.pub"
The authenticity of host 'node2 (43.98.49.148)' can't be established.
ECDSA key fingerprint is SHA256:Bu9YuKxM1dBmTzcxYMqYIYPyv2ilewzjolPVL6T90ho.
ECDSA key fingerprint is MD5:f4:5d:53:7a:28:dc:0d:13:f1:63:0c:a4:08:12:3d:f0.
Are you sure you want to continue connecting (yes/no)? yes #輸入 yes
/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
grid@node2's password: #輸入grid使用者密碼
Number of key(s) added: 1
Now try logging into the machine, with: "ssh 'node2'"
and check to make sure that only the key(s) you wanted were added.
[grid@node1 ~]$
驗證連線:
[grid@node1
~]$ ssh node1 date;ssh node1.baikedb.com date;ssh node1-priv date;ssh
node1-priv.baikedb.com date;ssh node2 date;ssh node2.baikedb.com
date;ssh node2-priv date;ssh node2-priv.baikedb.com date;
#輸入命令後,因為是第一次連線,會提示yes/no 都輸入yes
Mon Aug 31 08:25:59 CST 2020
The authenticity of host 'node1.baikedb.com (43.98.49.147)' can't be established.
ECDSA key fingerprint is SHA256:P+rVlB3D4Ze1gcV4brcuZCbqcmTVAT3Ab+RSniz+fG4.
ECDSA key fingerprint is MD5:e4:ce:00:89:fa:10:5c:6c:4e:85:71:51:8a:65:cf:09.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'node1.baikedb.com' (ECDSA) to the list of known hosts.
Mon Aug 31 08:26:01 CST 2020
The authenticity of host 'node1-priv (172.250.10.10)' can't be established.
ECDSA key fingerprint is SHA256:P+rVlB3D4Ze1gcV4brcuZCbqcmTVAT3Ab+RSniz+fG4.
ECDSA key fingerprint is MD5:e4:ce:00:89:fa:10:5c:6c:4e:85:71:51:8a:65:cf:09.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'node1-priv,172.250.10.10' (ECDSA) to the list of known hosts.
Mon Aug 31 08:26:02 CST 2020
The authenticity of host 'node1-priv.baikedb.com (172.250.10.10)' can't be established.
ECDSA key fingerprint is SHA256:P+rVlB3D4Ze1gcV4brcuZCbqcmTVAT3Ab+RSniz+fG4.
ECDSA key fingerprint is MD5:e4:ce:00:89:fa:10:5c:6c:4e:85:71:51:8a:65:cf:09.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'node1-priv.baikedb.com' (ECDSA) to the list of known hosts.
Mon Aug 31 08:26:03 CST 2020
Mon Aug 31 08:28:52 CST 2020
The authenticity of host 'node2.baikedb.com (43.98.49.148)' can't be established.
ECDSA key fingerprint is SHA256:Bu9YuKxM1dBmTzcxYMqYIYPyv2ilewzjolPVL6T90ho.
ECDSA key fingerprint is MD5:f4:5d:53:7a:28:dc:0d:13:f1:63:0c:a4:08:12:3d:f0.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'node2.baikedb.com' (ECDSA) to the list of known hosts.
Mon Aug 31 08:28:53 CST 2020
The authenticity of host 'node2-priv (172.250.10.11)' can't be established.
ECDSA key fingerprint is SHA256:Bu9YuKxM1dBmTzcxYMqYIYPyv2ilewzjolPVL6T90ho.
ECDSA key fingerprint is MD5:f4:5d:53:7a:28:dc:0d:13:f1:63:0c:a4:08:12:3d:f0.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'node2-priv,172.250.10.11' (ECDSA) to the list of known hosts.
Mon Aug 31 08:28:54 CST 2020
The authenticity of host 'node2-priv.baikedb.com (172.250.10.11)' can't be established.
ECDSA key fingerprint is SHA256:Bu9YuKxM1dBmTzcxYMqYIYPyv2ilewzjolPVL6T90ho.
ECDSA key fingerprint is MD5:f4:5d:53:7a:28:dc:0d:13:f1:63:0c:a4:08:12:3d:f0.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'node2-priv.baikedb.com' (ECDSA) to the list of known hosts.
Mon Aug 31 08:28:55 CST 2020
[grid@node1 ~]$
第二次連線看是否正常:
[grid@node1
~]$ ssh node1 date;ssh node1.baikedb.com date;ssh node1-priv date;ssh
node1-priv.baikedb.com date;ssh node2 date;ssh node2.baikedb.com
date;ssh node2-priv date;ssh node2-priv.baikedb.com date;
Mon Aug 31 08:30:11 CST 2020
Mon Aug 31 08:30:11 CST 2020
Mon Aug 31 08:30:11 CST 2020
Mon Aug 31 08:30:11 CST 2020
Mon Aug 31 08:30:11 CST 2020
Mon Aug 31 08:30:11 CST 2020
Mon Aug 31 08:30:11 CST 2020
Mon Aug 31 08:30:11 CST 2020
[grid@node1 ~]$
切換到oracle使用者操作
su - oracle #切換到oracle使用者
[oracle@node1 ~]$ ssh-keygen #輸入命令後,一直按Enter鍵
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_rsa):
Created directory '/home/oracle/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_rsa.
Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:OBC/rzYgHZTug2oRMVJjVKyRIWG81wqi1ScpwlOTOEU oracle@node1
The key's randomart image is:
+---[RSA 2048]----+
|+=XE+. |
|oOo=+o |
|o **+.. |
|o*+.*o.o |
|oo==.++ S |
|..o.= o |
| ... o . |
|.. o. |
|. ... |
+----[SHA256]-----+
[oracle@node1 ~]$
[oracle@node1 ~]$ ssh-copy-id -i ~/.ssh/id_rsa.pub node1 #copy 公鑰到node1
/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/oracle/.ssh/id_rsa.pub"
The authenticity of host 'node1 (43.98.49.147)' can't be established.
ECDSA key fingerprint is SHA256:P+rVlB3D4Ze1gcV4brcuZCbqcmTVAT3Ab+RSniz+fG4.
ECDSA key fingerprint is MD5:e4:ce:00:89:fa:10:5c:6c:4e:85:71:51:8a:65:cf:09.
Are you sure you want to continue connecting (yes/no)? yes #輸入 yes
/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
oracle@node1's password: #輸入oracle使用者密碼
Number of key(s) added: 1
Now try logging into the machine, with: "ssh 'node1'"
and check to make sure that only the key(s) you wanted were added.
[oracle@node1 ~]$
[oracle@node1 ~]$ ssh-copy-id -i ~/.ssh/id_rsa.pub node2 #copy 公鑰到node2
/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/oracle/.ssh/id_rsa.pub"
The authenticity of host 'node2 (43.98.49.148)' can't be established.
ECDSA key fingerprint is SHA256:Bu9YuKxM1dBmTzcxYMqYIYPyv2ilewzjolPVL6T90ho.
ECDSA key fingerprint is MD5:f4:5d:53:7a:28:dc:0d:13:f1:63:0c:a4:08:12:3d:f0.
Are you sure you want to continue connecting (yes/no)? yes #輸入yes
/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
oracle@node2's password: #輸入oracle 使用者密碼
Number of key(s) added: 1
Now try logging into the machine, with: "ssh 'node2'"
and check to make sure that only the key(s) you wanted were added.
[oracle@node1 ~]$
驗證連線
[oracle@node1
~]$ ssh node1 date;ssh node1.baikedb.com date;ssh node1-priv date;ssh
node1-priv.baikedb.com date;ssh node2 date;ssh node2.baikedb.com
date;ssh node2-priv date;ssh node2-priv.baikedb.com date;
#輸入命令後,節點第一次連線,會要求輸入yes/no 輸入yes 回車
Mon Aug 31 08:36:09 CST 2020
The authenticity of host 'node1.baikedb.com (43.98.49.147)' can't be established.
ECDSA key fingerprint is SHA256:P+rVlB3D4Ze1gcV4brcuZCbqcmTVAT3Ab+RSniz+fG4.
ECDSA key fingerprint is MD5:e4:ce:00:89:fa:10:5c:6c:4e:85:71:51:8a:65:cf:09.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'node1.baikedb.com' (ECDSA) to the list of known hosts.
Mon Aug 31 08:36:11 CST 2020
The authenticity of host 'node1-priv (172.250.10.10)' can't be established.
ECDSA key fingerprint is SHA256:P+rVlB3D4Ze1gcV4brcuZCbqcmTVAT3Ab+RSniz+fG4.
ECDSA key fingerprint is MD5:e4:ce:00:89:fa:10:5c:6c:4e:85:71:51:8a:65:cf:09.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'node1-priv,172.250.10.10' (ECDSA) to the list of known hosts.
Mon Aug 31 08:36:12 CST 2020
The authenticity of host 'node1-priv.baikedb.com (172.250.10.10)' can't be established.
ECDSA key fingerprint is SHA256:P+rVlB3D4Ze1gcV4brcuZCbqcmTVAT3Ab+RSniz+fG4.
ECDSA key fingerprint is MD5:e4:ce:00:89:fa:10:5c:6c:4e:85:71:51:8a:65:cf:09.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'node1-priv.baikedb.com' (ECDSA) to the list of known hosts.
Mon Aug 31 08:36:13 CST 2020
Mon Aug 31 08:36:13 CST 2020
The authenticity of host 'node2.baikedb.com (43.98.49.148)' can't be established.
ECDSA key fingerprint is SHA256:Bu9YuKxM1dBmTzcxYMqYIYPyv2ilewzjolPVL6T90ho.
ECDSA key fingerprint is MD5:f4:5d:53:7a:28:dc:0d:13:f1:63:0c:a4:08:12:3d:f0.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'node2.baikedb.com' (ECDSA) to the list of known hosts.
Mon Aug 31 08:36:14 CST 2020
The authenticity of host 'node2-priv (172.250.10.11)' can't be established.
ECDSA key fingerprint is SHA256:Bu9YuKxM1dBmTzcxYMqYIYPyv2ilewzjolPVL6T90ho.
ECDSA key fingerprint is MD5:f4:5d:53:7a:28:dc:0d:13:f1:63:0c:a4:08:12:3d:f0.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'node2-priv,172.250.10.11' (ECDSA) to the list of known hosts.
Mon Aug 31 08:36:15 CST 2020
The authenticity of host 'node2-priv.baikedb.com (172.250.10.11)' can't be established.
ECDSA key fingerprint is SHA256:Bu9YuKxM1dBmTzcxYMqYIYPyv2ilewzjolPVL6T90ho.
ECDSA key fingerprint is MD5:f4:5d:53:7a:28:dc:0d:13:f1:63:0c:a4:08:12:3d:f0.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'node2-priv.baikedb.com' (ECDSA) to the list of known hosts.
Mon Aug 31 08:36:16 CST 2020
[oracle@node1 ~]$
第二次連線測試:
[oracle@node1
~]$ ssh node1 date;ssh node1.baikedb.com date;ssh node1-priv date;ssh
node1-priv.baikedb.com date;ssh node2 date;ssh node2.baikedb.com
date;ssh node2-priv date;ssh node2-priv.baikedb.com date;
Mon Aug 31 08:37:26 CST 2020
Mon Aug 31 08:37:26 CST 2020
Mon Aug 31 08:37:26 CST 2020
Mon Aug 31 08:37:26 CST 2020
Mon Aug 31 08:37:26 CST 2020
Mon Aug 31 08:37:26 CST 2020
Mon Aug 31 08:37:26 CST 2020
Mon Aug 31 08:37:27 CST 2020
[oracle@node1 ~]$
node2
手動配置
按配置node1一樣配置一遍即可
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/70000068/viewspace-2776810/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle 12c rac 詳細部署教程(一)Oracle
- Oracle 12C RAC CDB資料庫部署Oracle資料庫
- ORACLE 12C RAC 部署應用包準備Oracle
- 【BUILD_ORACLE】Oracle RAC配置ASM Filter Driver(ASMFD)(二)詳細配置步驟UIOracleASMFilter
- Oracle 12c RAC構築之二:共享磁碟配置Oracle
- IIS部署WCF詳細教程
- oracle rac監控oswatch詳細使用教學Oracle
- 京東雲環境搭建oracle rac詳細部署梳理(可信的結果輸出)Oracle
- 【ASK_ORACLE】Relink RAC叢集詳細步驟Oracle
- Oracle 12c rac ocr和votedisk管理Oracle
- Oracle 12c 使用RMAN搭建物理備庫(RAC to RAC)Oracle
- Tomcat 部署及最佳化詳細教程!Tomcat
- ORACLE 12C RAC資料庫的啟停Oracle資料庫
- Oracle RAC一鍵部署大綱Oracle
- Oracle RAC一鍵部署004(RAC引數校驗)Oracle
- ORACLE 12C RAC 生產環境搭建介紹Oracle
- Docker安裝Oracle 19c 詳細教程DockerOracle
- Oracle 12C Sharding部署和測試Oracle
- Oracle RAC Cache Fusion 系列九:Oracle RAC 分散式資源管理(二)Oracle分散式
- oracle rac 核心引數詳解Oracle
- Oracle 12C ORA-12545 While Connecting to RAC through SCAN NameOracleWhile
- 在青雲上部署oracle rac全過程Oracle
- Oracle 12c RAC CSSD程式無法啟動real time模式OracleCSS模式
- Oracle 12C RAC的單機Standby returning error ORA-16191OracleError
- oracle 12C RAC 12.1.0.2 叢集日誌(cluster log)目錄Oracle
- Docker從瞭解到部署應用的詳細教程Docker
- CentOS下寶塔部署Django專案的詳細教程CentOSDjango
- ORACLE 12C Cloud Control(二)介紹OracleCloud
- Oracle 12c系列(二)|PDB的建立Oracle
- Oracle 19C RAC實施方案詳細說明-常見問題07Oracle
- OGG 12c mysql複製到oracle部署方案MySqlOracle
- Oracle RAC一鍵部署002(引數檢查)Oracle
- Vagrant詳細教程
- Vuex詳細教程Vue
- Nginx 詳細教程Nginx
- Emacs詳細教程Mac
- Oracle Database 12c RAC損壞ocr和votedisk恢復實驗OracleDatabase
- 如何輕鬆建站?站點一鍵部署搭建(詳細教程)