CentOS 7.5 配置 NTP 时钟同步
1、NTP 服务通信的端口为 UDP 123。
2、rpm -qa | grep ntp-检查系统是否安装 ntp 软件包,可以看到系统默认安装了 ntp 软件包。
3、vi /etc/ntp.conf编辑 ntp 配置文件,修改 ntp 时钟服务器配置。
4、# server 0.centos.pool.ntp.org iburst# server 1.centos.pool.ntp.org i芟鲠阻缒burst# server 2.centos.pool.ntp.org iburst# server 3.centos.pool.ntp.org iburstserver ntp.aliyun.com iburst查找 server 字段,系统默认配置了 4 个 ntp 服务器,我们注释掉厂商的 ntp 服务器,添加阿里云时钟服务器,阿里云时钟服务器地址为 203.107.6.88,保存配置文件并退出。
5、systemctl restart ntpdsystemctl status ntpd重启 ntpd 并查看 ntpd 状态。
6、ntpstat使用 ntpstat 命令查看 ntp 同步状态。
7、ntpq -p使用 ntpq -p 命令也能查看 ntp 同步状态。
8、systemctl enable ntp蟠校盯昂dsystemctl status ntpd配置 ntpd 服务开机自启动,通过 systemctl status ntpd 命令可以看到 ntpd 服务已配置为开机自启动。
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:93
阅读量:20
阅读量:48
阅读量:66
阅读量:78