Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Centos7 and other operating systems realize ntp clock synchronization

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

1. Ntp server build 1.centos7.6, build ntp server

Before installation:

[root@ntpserver ~] # more / etc/redhat-release CentOS Linux release 7.6.1810 (Core) [root@ntp-server ~] # ps-ef | grep ntproot 18054 17742 0 15:53 pts/0 00:00:00 grep-- color=auto ntp [root@ntp-server ~] # ll / etc/ | grep ntp [root@ntp-server ~] # ntpdate-bash: ntpdate: command [root@ntp-server ~] # systemctl status ntpdUnit ntpd.service could not be found not found.

Ntp server ip is 172.27.9.131 and the operating system version is centos 7.6.There is no ntp service before installation, and there is no related ntp file or ntpdate command in the / etc directory.

Installation:

[root@ntp-server ~] # yum-y install ntp [root@ntp-server ~] # ps-ef | grep ntp root 18225 17742 0 16:00 pts/0 00:00:00 grep-- color=auto ntp [root@ntp-server ~] # ll / etc/ | grep ntp drwxr-xr-x 3 root root 52 November 5 15:59 ntp-rw-r--r-- 1 root root August 6 21:44 ntp.conf [root@ntp- Server ~] # ntpdate 5 Nov 16:01:04 ntpdate [18240]: no servers can be used Exiting [root@ntp-server ~] # systemctl status ntpd ● ntpd.service-Network Time Service Loaded: loaded (/ usr/lib/systemd/system/ntpd.service Disabled; vendor preset: disabled) Active: inactive (dead)

2.ntp server configuration

New profile ntp-source.conf

[root@ntp-server ~] # cat > / etc/ntp/ntp-source.conf

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report