暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

更改NTP服务器

胡飞 2024-06-13
124

更改NTP服务器

网络时间协议(NTP)服务器的配置设置在初始设置后可以更改。

所有的服务器和开关 甲骨文数据库 应该引用相同的NTP服务器,使服务器同步到同一时间。

下列主题包括设定 甲骨文数据库 服务器和切换到相同的NTP服务器地址。甲骨文建议每次更换一台服务器。

注:

  • 这些过程假设两个NTP服务器之间没有很大的时间差异。使用命令ntpq -p 在执行NTP服务器更新之前,先看看系统是否正常。

  • 最多可配置两个NTP服务器,用于 甲骨文数据库 .


 在数据库服务器上设置NTP服务器地址

您可以设置或更改数据库服务器上的网络时间协议(NTP)服务器地址。 甲骨文数据库 .

  1. 如果你在使用 甲骨文数据系统软件 20.1.0 或者以后用ipconf 设置或更改NTP服务器。
    1. 登录到数据库服务器作为root 用户。
    2. 检查以确保新设置没有配置问题。

      使用下列命令: IP_Addr_列表 为NTP服务器提供一个单独的IP地址逗号列表。如果您还在修改ilom的NTP服务器,那么包括-ilom-ntp 参数和替换 伊洛姆_Ntp_清单 带有一个最多2个为NTP服务器的IP地址的逗号独立列表。包括-dry 参数是指检查了设置,但没有应用。

      # ipconf -update -ntp IP_addr_list [-ilom-ntp ILOM_NTP_list] -dry


    3. 使用以下方法更新NTP设置ipconf 指挥:

      在下面的命令中, IP_Addr_列表 为NTP服务器提供一个单独的IP地址逗号列表。如果您还想更改Ilom的NTP服务器,那么包括-ilom-ntp 参数和替换 伊洛姆_Ntp_清单 拥有一个最多3个为NTP服务器的IP地址的逗号独立列表。包括-force 参数强制更新,绕过所有检查。

      # ipconf -update -ntp IP_addr_list [-ilom-ntp ILOM_NTP_list] [-force]


      如果从新NTP服务器获得的时间戳与系统已知的当前时间相差超过1秒( 时间步进 ),然后命令出错,不更新NTP设置。你可以用-force 选择命令行覆盖此检查。

      下面是一个命令及其输出的例子。

      [root@dbm03adm02 oracle.cellos]# ipconf -update -ntp 10.31.138.20,10.31.16.1 -ilom-ntp 10.31.138.20,10.31.16.1 [Info]: ipconf command line: ipconf -update -ntp 10.31.138.20,10.31.16.1 -ilom-ntp 10.31.138.20,10.31.16.1 Logging started to /var/log/cellos/ipconf.log [Info]: Updating dns/ntp [Warning]: ntpd service is not running [Info]: Backup existing cell configuration file /opt/oracle.cellos/cell.conf to /var/log/exadatatmp/cell.conf_2020_01_13-17_54_56 [Info]: Restart ntpd service Shutting down ntpd: [ OK ] Starting ntpd: [ OK ] [Done]: Update cell configuration file /opt/oracle.cellos/cell.conf OK


    4. 为每个数据库服务器重复这些步骤。
  2. 如果数据库服务器操作系统 甲骨文Linux 7但使用 甲骨文数据系统软件 19.3.X或更早,遵照这些指示:
    1. 停止数据库服务器上的时间同步服务。

      # systemctl stop chronyd


    2. 更新/etc/chrony.conf 将新的NTP服务器的IP地址归档。
    3. 在数据库服务器上启动时间同步服务。

      # systemctl start chronyd


    4. 重复步骤 2.a 穿过 2.c 每个数据库服务器。
  3. 如果数据库服务器操作系统 甲骨文Linux 5 or 6:
    1. 停止数据库服务器上的NTP服务。

      # service ntpd stop


    2. 更新ntp.conf 将新的NTP服务器的IP地址归档。
    3. 在数据库服务器上启动NTP服务。

      # service ntpd start


    4. 重复步骤 3.a 穿过 3.c 每个数据库服务器。


 更改NTP服务器 甲骨文数据存储服务器

您可以在每个服务器上设置或更改网络时间协议(NTP) 甲骨文数据存储服务器 .

  1. 登录到单元格作为root 用户。
  2. 使用ipconf 可用于更改NTP设置。

    注:

    甲骨文数据系统软件 第23.1.2和22.1.11号文件(2023年5月n发布)载有以下最新资料: ipconf 改进处理因改变NTP服务器而引起的时间变化。甲骨文建议使用此更新来避免以前NTP服务器更改的问题。

    1. 检查以确保新设置没有配置问题。

      使用下列命令: IP_Addr_列表 为NTP服务器提供一个单独的IP地址逗号列表。如果您还在修改ilom的NTP服务器,那么包括-ilom-ntp 参数和替换 伊洛姆_Ntp_清单 带有一个最多2个为NTP服务器的IP地址的逗号独立列表。包括-dry 参数是指检查了设置,但没有应用。

      注:

      如果使用NTP服务器的主机名而不是IP地址,那么当重新启动时,CelWal服务将失败。定义NTP和DNS服务器时只使用IP地址。

      # ipconf -update -ntp IP_addr_list [-ilom-ntp ILOM_NTP_list] -dry


    2. 使用ipconf 指挥:

      在下面的命令中, IP_Addr_列表 为NTP服务器提供一个单独的IP地址逗号列表。如果您还想更改Ilom的NTP服务器,那么包括-ilom-ntp 参数和替换 伊洛姆_Ntp_清单 拥有一个最多3个为NTP服务器的IP地址的逗号独立列表。包括-force 参数强制更新,绕过所有检查。

      # ipconf -update -ntp IP_addr_list [-ilom-ntp ILOM_NTP_list] [-force]


      如果从新NTP服务器获得的时间戳与系统已知的当前时间相差超过1秒( 时间步进 ),然后命令失败,不更新NTP设置。你可以用-force 选择命令行覆盖此检查。

      下面是一个命令及其输出的例子。

      [root@dbm03adm02 oracle.cellos]# ipconf -update -ntp 10.31.138.20,10.31.16.1 -ilom-ntp 10.31.138.20,10.31.16.1 [Info]: ipconf command line: ipconf -update -ntp 10.31.138.20,10.31.16.1 -ilom-ntp 10.31.138.20,10.31.16.1 Logging started to /var/log/cellos/ipconf.log [Info]: Updating dns/ntp [Warning]: ntpd service is not running [Info]: Backup existing cell configuration file /opt/oracle.cellos/cell.conf to /var/log/exadatatmp/cell.conf_2020_01_13-17_54_56 [Info]: Restart ntpd service Shutting down ntpd: [ OK ] Starting ntpd: [ OK ] [Done]: Update cell configuration file /opt/oracle.cellos/cell.conf OK



 在思科上设置NTP服务器地址 罗思网络织物 开关

这个过程描述了如何更改思科上的网络时间协议(NTP)服务器地址 罗思网络织物 开关。

  1. 使用SSH访问开关,然后登录为admin 拥有管理员密码的用户.

    注:

    如果SSH没有配置,那么使用远程网访问开关作为admin 用户。
  2. 回顾当前配置。

    Switch# show running-config


    该命令输出包括当前NTP服务器的条目。

    例如:

    ... ntp server 10.10.10.1 prefer use-vrf management ntp server 10.8.8.1 use-vrf management ...


  3. 删除当前的NTP服务器配置。

    Switch# configure terminal Enter configuration commands,one per line.End with CNTL/Z. Switch(config)# no ntp server 10.10.10.1 Switch(config)# no ntp server 10.8.8.1 Switch(config)# end Switch# copy running-config startup-config [########################################] 100% Copy complete, now saving to disk (please wait)... Copy complete.


    注:

    每个当前的NTPIP地址需要被删除。无效的IP地址也必须被删除.
  4. 配置两个NTP服务器。

    在本例中,新的NTP服务器IP地址为10.7.7.1和10.9.9.1。

    Switch# configure terminal Enter configuration commands,one per line.End with CNTL/Z. Switch(config)# feature ntp Switch(config)# ntp server 10.7.7.1 prefer use-vrf management Switch(config)# ntp server 10.9.9.1 use-vrf management Switch(config)# clock protocol ntp Switch(config)# end


  5. 验证更改。

    Switch# show running-config


    命令输出应该包括新的NTP服务器的条目。

    例如:

    ... ntp server 10.7.7.1 prefer use-vrf management ntp server 10.9.9.1 use-vrf management ...


  6. 保存配置。

    Switch# copy running-config startup-config [########################################] 100% Copy complete, now saving to disk (please wait)... Copy complete.


  7. 离开会议。

    Switch# exit


设置思科9300系列的NTP服务器地址 管理网络开关

本程序描述如何更改思科9300系列的网络时间协议(NTP)服务器地址 管理网络开关 .

  1. 使用SSH访问开关,然后登录为admin 拥有管理员密码的用户.

    注:

    如果SSH没有配置,那么使用远程网访问开关作为admin 用户。
  2. 回顾当前配置。

    Switch# show running-config


    该命令输出包括当前NTP服务器的条目。

    例如:

    ... ntp server 10.10.10.1 prefer use-vrf default ntp server 10.8.8.1 use-vrf default ...


  3. 删除当前的NTP服务器配置。

    Switch# configure terminal Enter configuration commands,one per line.End with CNTL/Z. Switch(config)# no ntp server 10.10.10.1 Switch(config)# no ntp server 10.8.8.1 Switch(config)# end Switch# copy running-config startup-config [########################################] 100% Copy complete, now saving to disk (please wait)... Copy complete.


    注:

    每个当前的NTPIP地址需要被删除。无效的IP地址也必须被删除.
  4. 配置两个NTP服务器。

    在本例中,新的NTP服务器IP地址为10.7.7.1和10.9.9.1。

    Switch# configure terminal Enter configuration commands,one per line.End with CNTL/Z. Switch(config)# feature ntp Switch(config)# ntp server 10.7.7.1 prefer Switch(config)# ntp server 10.9.9.1 Switch(config)# clock protocol ntp Switch(config)# end


  5. 验证更改。

    Switch# show running-config


    命令输出应该包括新的NTP服务器的条目。

    例如:

    ... ntp server 10.7.7.1 prefer use-vrf default ntp server 10.9.9.1 use-vrf default ...


  6. 保存配置。

    Switch# copy running-config startup-config [########################################] 100% Copy complete, now saving to disk (please wait)... Copy complete.


  7. 离开会议。

    Switch# exit



 在思科4948以太网开关上设置NTP服务器地址

您可以设置或更改思科4948以太网交换机上的网络时间协议(NTP)服务器。

  1. 根据固件版本,使用下列方法之一访问开关:
    1. 固件版本早于第2.2版:使用远程网访问开关,并使用管理密码作为管理员登录。
    2. 公司软件版本12.2或以后:使用SSH访问开关,然后登录为admin 有管理密码的用户。

      注:

      如果SSH没有配置,那么使用远程网访问开关作为admin 用户。
  2. 改变以启用模式.提示输入密码时,请使用管理员密码。

    Switch> enable


  3. 回顾当前配置。

    Switch# show running-config


  4. 删除当前的NTP服务器配置。

    在本例中,当前IP地址为10.10.10.1和10.8.8.1。

    Switch# configure terminal Enter configuration commands,one per line.End with CNTL/Z. Switch(config)# no ntp server 10.10.10.1 Switch(config)# no ntp server 10.8.8.1 Switch(config)# end Switch# write memory Building configuration... Compressed configuration from 2603 bytes to 1158 bytes [OK ]


    注:

    每个当前的NTPIP地址需要被删除。无效的IP地址也必须被删除.
  5. 配置两个NTP服务器。

    Switch# configure terminal Enter configuration commands,one per line.End with CNTL/Z. Switch(config)# ntp server 10.7.7.1 prefer Switch(config)# ntp server 10.9.9.1 Switch(config)# end Switch# write memory Building configuration... Compressed configuration from 2603 bytes to 1158 bytes [OK ]


  6. 验证更改。

    Switch# show running-config


    命令输出应该包括新的NTP服务器的条目。

    例如:

    Building configuration... ... ntp server 10.7.7.1 prefer ntp server 10.9.9.1 ...


  7. 保存配置。

    Switch# copy running-config startup-config Destination filename [startup-config]? Building configuration... Compressed configuration from 14343 bytes to 3986 bytes[OK]


  8. 离开会议。

    Switch# exit



 在网上设置NTP服务器地址 无限波段网络织物 转换

您可以在网上设置或更改网络时间协议(NTP)服务器地址。 无限波段网络织物 换一下。

注:

不要手动编辑文件 无限波段网络织物 开关。
  1. 登录为ilom-admin 用户。
  2. 使用下列方法之一设置日期、时差和NTP服务器:
    • 使用 综合照明经理 图形接口。

    • 手工操作,使用下列命令:

      set /SP/clock timezone=preferred_tz set /SP/clients/ntp/server/1 address=ntp_ip1 set /SP/clients/ntp/server/2 address=ntp_ip2 set /SP/clock usentpserver=enabled


      在上面的命令中, 最好_tz 是首选的时差,而且 Ntp_IP1 和 Ntp_IP2 是NTP服务器IP地址。不需要配置两个NTP服务器,但至少需要配置一个。

文章转载自胡飞,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论