您好,登錄后才能下訂單哦!
NTP 配置
兩個(gè)節(jié)點(diǎn)檢查是否安裝ntp
rpm -q ntp
///如果沒安裝就yum -y install ntp 進(jìn)行安裝///
systemctl enable ntpd systemctl enable ntpd.service 設(shè)置開機(jī)啟動(dòng)ntp
systemctl start ntpd 啟動(dòng)ntp
systemctl status ntpd 查看ntp狀態(tài)
-----racdb1 作為NTP服務(wù)端和客戶端配置---------
vi /etc/ntp.conf
# 外部時(shí)間服務(wù)器不可用時(shí),以本地時(shí)間作為時(shí)間服務(wù)
server 127.127.1.0
fudge 127.127.1.0 stratum 10
#允許內(nèi)網(wǎng)其他機(jī)器同步時(shí)間,如果不添加該約束默認(rèn)允許所有IP訪問本機(jī)同步服務(wù)
restrict 192.168.61.0 mask 255.255.255.0 nomodify notrap
# 配置和上游標(biāo)準(zhǔn)時(shí)間同步
server 101.201.72.121 # 中國國家授時(shí)中心
server 133.100.11.8 #日本[福岡大學(xué)]
server 3.cn.pool.ntp.org
server 1.asia.pool.ntp.org
server 3.asia.pool.ntp.org
# 允許上層時(shí)間服務(wù)器主動(dòng)修改本機(jī)時(shí)間
restrict 101.201.72.121 nomodify notrap noquery
restrict 133.100.11.8 nomodify notrap noquery
restrict 3.cn.pool.ntp.org nomodify notrap noquery
restrict 1.asia.pool.ntp.org nomodify notrap noquery
restrict 3.asia.pool.ntp.org nomodify notrap noquery
vi /etc/sysconfig/ntpd
#此選項(xiàng)用于自動(dòng)校準(zhǔn)系統(tǒng)時(shí)鐘與硬件時(shí)鐘
SYNC_HWCLOCK=yes
OPTIONS="-x -u ntp:ntp -p /var/run/ntpd.pid"
完后重啟 systemctl restart ntpd
ntpq -p查看網(wǎng)絡(luò)中的NTP服務(wù)器
ntpstat 同步有個(gè)過程,幾分鐘后在執(zhí)行,出現(xiàn)下圖才算同步成功
------racdb2 作為NTP客戶端配置------
vi /etc/ntp.conf
添加:
#允許racdb1 ntp 服務(wù)器主動(dòng)修改本機(jī)的時(shí)間
restrict 192.168.61.219 nomodify notrap noquery
#設(shè)置 racdb1作為ntp服務(wù)器
server 192.168.61.219
vi /etc/sysconfig/ntpd
#此選項(xiàng)用于自動(dòng)校準(zhǔn)系統(tǒng)時(shí)鐘與硬件時(shí)鐘
SYNC_HWCLOCK=yes
OPTIONS="-x -u ntp:ntp -p /var/run/ntpd.pid"
systemctl restart ntpd 重啟ntp服務(wù)
ntpq –p 查看網(wǎng)絡(luò)中的NTP服務(wù)器為racdb1
systemctl enable ntpd
systemctl enable ntpd.service 設(shè)置開機(jī)啟動(dòng)ntp
設(shè)置 SSH 信任關(guān)系,保證兩個(gè)節(jié)點(diǎn)的互通性
在grid Infrastructure安裝過程中,oracle universal installer(oui)必須能夠以grid的身份自動(dòng)將然間復(fù)制到所有rac節(jié)點(diǎn),這里我們各個(gè)節(jié)點(diǎn)配置ssh信任關(guān)系,讓oracle、grid用戶可以有訪問各個(gè)節(jié)點(diǎn)不輸入密碼的能力。
---配置 oracle用戶ssh信任關(guān)系
-------racdb1配置oracle用戶 ssh信任關(guān)系------
su - oracle
mkdir ~/.ssh
chmod 755 ~/.ssh
/usr/bin/ssh-keygen -t rsa
/usr/bin/ssh-keygen -t dsa
配置key文件同步,racdb1把認(rèn)證文件id_rsa.pub、id_dsa.pub文件匯總成一個(gè)總的認(rèn)證文件authorized_keys,authorized_keys遠(yuǎn)程復(fù)制到racdb2
cd ~/.ssh
cat ~/.ssh/id_rsa.pub >> authorized_keys
cat ~/.ssh/id_dsa.pub >> authorized_keys
先去 oracledb2切換到oracle用戶創(chuàng)建目錄,racdb1再進(jìn)行復(fù)制
[root@racdb2 rules.d]# su – oracle
[oracle@racdb2 ~]$ mkdir ~/.ssh
[oracle@racdb2 ~]$ chmod 755 ~/.ssh
racdb1復(fù)制文件到racdb2
scp authorized_keys racdb2:~/.ssh/
-------racdb2配置oracle用戶 ssh信任關(guān)系-------
查看到 racdb1復(fù)制過來的authorized_keys
/usr/bin/ssh-keygen -t rsa
/usr/bin/ssh-keygen -t dsa
配置key文件同步,racdb2把認(rèn)證文件id_rsa.pub、id_dsa.pub文件匯總成一個(gè)總的認(rèn)證文件authorized_keys,authorized_keys,遠(yuǎn)程復(fù)制到racdb1
cd ~/.ssh
cat ~/.ssh/id_rsa.pub >> authorized_keys
cat ~/.ssh/id_dsa.pub >> authorized_keys
scp authorized_keys racdb1:~/.ssh/
racdb1上測(cè)試,不用輸入密碼即為成功
ssh racdb1 date
ssh racdb2 date
ssh racdb1-priv date
ssh racdb2-priv date
racdb2上測(cè)試,不用輸入密碼即為成功
ssh racdb1 date
ssh racdb2 date
ssh racdb1-priv date
ssh racdb2-priv date
---配置 grid用戶ssh信任關(guān)系---
-------racdb1配置grid用戶 ssh信任關(guān)系-------
su – grid
mkdir ~/.ssh
chmod 755 ~/.ssh
/usr/bin/ssh-keygen -t rsa
/usr/bin/ssh-keygen -t dsa
配置key文件同步,racdb1把認(rèn)證文件id_rsa.pub、id_dsa.pub文件匯總成一個(gè)總的認(rèn)證文件authorized_keys,authorized_keys,遠(yuǎn)程復(fù)制到racdb2
cd ~/.ssh
cat ~/.ssh/id_rsa.pub >> authorized_keys
cat ~/.ssh/id_dsa.pub >> authorized_keys
racdb1復(fù)制文件到racdb2
scp authorized_keys racdb2:~/.ssh/
--------racdb2配置grid用戶 ssh信任關(guān)系---------
查看到 racdb1復(fù)制過來的authorized_keys
/usr/bin/ssh-keygen -t rsa
/usr/bin/ssh-keygen -t dsa
配置key文件同步,racdb2把認(rèn)證文件id_rsa.pub、id_dsa.pub文件匯總成一個(gè)總的認(rèn)證文件authorized_keys,authorized_keys,遠(yuǎn)程復(fù)制到racdb1
cd ~/.ssh/
cat ~/.ssh/id_rsa.pub >> authorized_keys
cat ~/.ssh/id_dsa.pub >> authorized_keys
scp authorized_keys racdb1:~/.ssh/
racdb1上測(cè)試,不用輸入密碼即為成功
ssh racdb1 date
ssh racdb2 date
ssh racdb1-priv date
ssh racdb2-priv date
racdb2上測(cè)試,不用輸入密碼即為成功
ssh racdb1 date
ssh racdb2 date
ssh racdb1-priv date
ssh racdb2-priv date
后續(xù)會(huì)更新
學(xué)習(xí)交流QQ群76552012,本文原創(chuàng),如需轉(zhuǎn)載,請(qǐng)聯(lián)系QQ群
本文的CSDN博客https://blog.csdn.net/ai74le/article/details/89437178
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。