生產環境oracle rac集群打造前期準備之NTP服務打造

電腦雜談  發布時間:2019-11-07 22:03:43  來源:網絡整理

oracle rac集群搭建_oracle rac集群搭建_啟動oracle rac集群

大家好我是sean,因用戶需求,首次在制造環境打造ntp服務

硬件環境狀況

準備2臺獨立服務器,分別為:

10.3.3.62/192.168.36.230 ntpd服務器oracle rac集群搭建oracle rac集群搭建,用于與內部公共ntpd同步標準時間

10.3.3.64/192.168.36.85 ntpd客戶端,用于與ntpd同步時間

系統環境

Oracle linux7.3 x86_64

Oracle rac 集群版本 11.2.0.3

檢測2臺機器是否調試

[[email protected] ~]# rpm -q ntp

ntp-4.2.6p5-28.0.1.el7.x86_64

如果尚未安裝則略過此步,否則使用yum進行調試,并修改平臺開機自動開啟并開展服務

yum -y install ntp

systemctl enable ntpd(如果修改了這一步還是開難以推進,那么執行systemctl disable chronyd.service )

systemctl start ntpd

設置ntp服務器10.3.3.62

配置前先使用命令:ntpdate -u cn.pool.ntp.org,同步服務器

修改/etc/ntp.conf文件,紅標是設置的內容

# For more information about this file, see the man pages

# ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5).

driftfile /var/lib/ntp/drift

# Permit time synchronization with our time source, but do not

# permit the source to query or modify the service on this system.

restrict default nomodify notrap nopeer noquery

# Permit all access over the loopback interface. This could

# be tightened as well, but to do so would effect some of

# the administrative functions.

restrict 127.0.0.1

restrict ::1

# Hosts on local network are less restricted.

#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap

oracle rac集群搭建_啟動oracle rac集群_oracle rac集群搭建

restrict 192.168.36.0 mask 255.255.255.0 nomodify notrap

# Use public servers from the pool.ntp.org project.

# Please consider joining the pool ().

#server 0.rhel.pool.ntp.org iburst

#server 1.rhel.pool.ntp.org iburst

#server 2.rhel.pool.ntp.org iburst

#server 3.rhel.pool.ntp.org iburst

#server 2.cn.pool.ntp.org

#server 1.asia.pool.ntp.org

#server 2.asia.pool.ntp.org

#server 127.127.1.0

#broadcast 192.168.1.255 autokey # broadcast server

#broadcastclient # broadcast client

#broadcast 224.0.1.1 autokey # multicast server

#multicastclient 224.0.1.1 # multicast client

#manycastserver 239.255.254.254 # manycast server

#manycastclient 239.255.254.254 autokey # manycast client

#restrict 2.cn.pool.ntp.org nomodify notrap noquery

#restrict 1.asia.pool.ntp.org nomodify notrap noquery

restrict 127.127.1.0 nomodify notrap noquery

server 127.0.0.1 # local clock

fudge 127.0.0.1 stratum 10

# Enable public key cryptography.

#crypto

includefile /etc/ntp/crypto/pw

# Key file containing the keys and key identifiers used when operating

# with symmetric key cryptography.

keys /etc/ntp/keys

# Specify the key identifiers which are trusted.

#trustedkey 4 8 42

# Specify the key identifier to use with the ntpdc utility.

oracle rac集群搭建_啟動oracle rac集群_oracle rac集群搭建

#requestkey 8

# Specify the key identifier to use with the ntpq utility.

#controlkey 8

# Enable writing of statistics records.

#statistics clockstats cryptostats loopstats peerstats

# Disable the monitoring facility to prevent amplification attacks using ntpdc

# monlist command when default restrict does not include the noquery flag. See

# CVE-2013-5211 for more details.

# Note: Monitoring will not be disabled with the limited restriction flag.

disable monitor

修改完成后重啟ntpd服務systemctl restart ntpd

使用ntpq -p 查看網絡中的NTP服務器,同時顯示客戶端和每個服務器的關系

使用ntpstat 命令查看時間同步狀況,這個大概應該5-10分鐘后就能順利連接和同步。所以,服務器啟動后必須稍等下:

剛開啟的之后,一般是:

# ntpstat

unsynchronised

time server re-starting

polling server every 64 s

連接并同步后:

# ntpstat

synchronised to NTP server (202.112.10.36) at stratum 3

time correct to within 275 ms

polling server every 256 s

設置客戶端:10.3.3.64

安裝ntp服務并修改為手動開啟,和上面的設定方法同樣。然后編輯/etc/ntp.conf文件,紅標為變化的內容。

# For more information about this file, see the man pages

# ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5).

driftfile /var/lib/ntp/drift

# Permit time synchronization with our time source, but do not

# permit the source to query or modify the service on this system.

restrict default nomodify notrap nopeer noquery

oracle rac集群搭建_oracle rac集群搭建_啟動oracle rac集群

# Permit all access over the loopback interface. This could

# be tightened as well, but to do so would effect some of

# the administrative functions.

restrict 127.0.0.1

restrict ::1

# Hosts on local network are less restricted.

#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap

# Use public servers from the pool.ntp.org project.

# Please consider joining the pool ().

#server 0.centos.pool.ntp.org iburst

server 192.168.36.230

restrict 192.168.36.230 nomodify notrap noquery

server 127.0.0.1

fudge 127.0.0.1 stratum 10

#broadcast 192.168.1.255 autokey # broadcast server

#broadcastclient # broadcast client

#broadcast 224.0.1.1 autokey # multicast server

#multicastclient 224.0.1.1 # multicast client

#manycastserver 239.255.254.254 # manycast server

#manycastclient 239.255.254.254 autokey # manycast client

# Enable public key cryptography.

#crypto

includefile /etc/ntp/crypto/pw

# Key file containing the keys and key identifiers used when operating

# with symmetric key cryptography.

keys /etc/ntp/keys

# Specify the key identifiers which are trusted.

#trustedkey 4 8 42

# Specify the key identifier to use with the ntpdc utility.

#requestkey 8

# Specify the key identifier to use with the ntpq utility.

oracle rac集群搭建_oracle rac集群搭建_啟動oracle rac集群

#controlkey 8

# Enable writing of statistics records.

#statistics clockstats cryptostats loopstats peerstats

# Disable the monitoring facility to prevent amplification attacks using ntpdc

# monlist command when default restrict does not include the noquery flag. See

# CVE-2013-5211 for more details.

# Note: Monitoring will not be disabled with the limited restriction flag.

disable monitor

ntpdate 192.168.36.230

Ntpdate -u 192.168.36.230

重啟ntpd服務

#systemctl restart ntpd

啟動后,查看同步狀況

# ntpq -p

# ntpstat

后期發現oraclerac集群ntp報錯

解決方法是必須填寫到下面內容文件(每臺機器都應該添加)

[[email protected] ~]# cat /etc/sysconfig/ntpd

# Command line options for ntpd

#OPTIONS="-g"

OPTIONS="-x -u ntp:ntp -p /var/run/ntpd.pid"

SYNC_HWCLOCK=no

NTPDATE_OPTIONS=""

[[email protected] ~]# cat /etc/sysconfig/ntpd

# Command line options for ntpd

#OPTIONS="-g"

OPTIONS="-x -u ntp:ntp -p /var/run/ntpd.pid"

SYNC_HWCLOCK=no

NTPDATE_OPTIONS=""

第一次在制造環境這么搞,不足之處請你們多多指點,自己折騰吧返回搜狐,查看更多


本文來自電腦雜談,轉載請注明本文網址:
http://www.rtcsln.tw/a/ruanjian/article-129209-1.html

    相關閱讀
    發表評論  請自覺遵守互聯網相關的政策法規,嚴禁發布、暴力、反動的言論

    • 趙童童
      趙童童

      薩達姆是民選合法總統

    • 麗麗
      麗麗

      不管是外在的軟實力還是內在的硬實力

    • 劉亞靜
      劉亞靜

      即使考不上大學念書不好的高中生寫起日記來

    熱點圖片
    拼命載入中...
    黑龙江快乐十分开奖直播