NTP ์ค์ ๋งค๋ด์ผ ( CentOS Linux release 7.9 )
NTP ์๋น์ค ํ์ฑํ ์ฌ๋ถ ํ์ธ ๋ฐฉ๋ฒ
- systemctl status ntpd.service
- ํ์ฌ ์๋ฒ์ NTP ์๋น์ค๊ฐ ํ์ฑํ๋์ด ์๋์ง ํ์ธํ ์ ์๋ค
[root@localhost ~]# systemctl status ntpd.service
โ ntpd.service - Network Time Service
Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor preset: disabled)
Active: inactive (dead)
NTP ์๋น์ค Config ์ค์ ๋ฐฉ๋ฒ
- /etc/ntp.conf ํ์ผ ํ์ธ
- ์ฌ์ฉํ NTP ์๋ฒ ์ถ๊ฐ
- ์ธํฐ๋ท ๊ฒ์ํ๋ ๋๋ถ๋ถ time.bora.net / time.konet.net ์๋ฒ๋ฅผ ๋ฑ๋กํด์ ์ฌ์ฉํ๊ณ ์์ด ๋ ๊ฐ ์ฃผ์ ์ถ๊ฐ
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst
server time.bora.net
server time.konet.net
#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.
NTP ์๋น์ค ์์, ํ์ธ ๋ฐฉ๋ฒ
- ntp.conf ํ์ผ์ ntp ์๋น์ค์ ์ฌ์ฉํ ์๋ฒ๋ฅผ ์ถ๊ฐ ํ์ผ๋ฉด ์๋ ๋ช ๋ น์ด๋ก ์๋น์ค ์์!
- systemctl start ntpd.service ( ์๋น์ค ์์ )
- systemctl status ntpd.service ( ์๋น์ค ์ํ ํ์ธ )
- Active : active ๋ก ํ์๋๋ค๋ฉด ํ์ฌ NTP ์๋น์ค๊ฐ ํ์ฑํ๋ ์ํ
[root@localhost ~]# systemctl start ntpd.service
[root@localhost ~]# systemctl status ntpd.service
โ ntpd.service - Network Time Service
Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2022-05-23 20:46:56 EDT; 3s ago
Process: 4159 ExecStart=/usr/sbin/ntpd -u ntp:ntp $OPTIONS (code=exited, status=0/SUCCESS)
Main PID: 4160 (ntpd)
Tasks: 1
CGroup: /system.slice/ntpd.service
โโ4160 /usr/sbin/ntpd -u ntp:ntp -g
May 23 20:46:56 localhost.localdomain ntpd[4160]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
May 23 20:46:56 localhost.localdomain ntpd[4160]: Listen and drop on 1 v6wildcard :: UDP 123
May 23 20:46:56 localhost.localdomain ntpd[4160]: Listen normally on 2 lo 127.0.0.1 UDP 123
May 23 20:46:56 localhost.localdomain ntpd[4160]: Listen normally on 3 ens33 192.168.32.129 UDP 123
May 23 20:46:56 localhost.localdomain ntpd[4160]: Listen normally on 4 virbr0 192.168.122.1 UDP 123
May 23 20:46:56 localhost.localdomain ntpd[4160]: Listen normally on 5 ens33 fe80::ba71:6fed:e48d:4a90 UDP 123
May 23 20:46:56 localhost.localdomain ntpd[4160]: Listen normally on 6 lo ::1 UDP 123
May 23 20:46:56 localhost.localdomain ntpd[4160]: Listening on routing socket on fd #23 for interface updates
May 23 20:46:56 localhost.localdomain ntpd[4160]: 0.0.0.0 c016 06 restart
May 23 20:46:56 localhost.localdomain ntpd[4160]: 0.0.0.0 c012 02 freq_set kernel -11.582 PPM
NTP ์๋น์ค์ ์ฐ๊ฒฐ๋ ์๋ฒ ์ ๋ณด ๋ฐ ์ฐ๋ ์ํ ํ์ธ ๋ฐฉ๋ฒ
- ntpq -p
- ๋๊ธฐํ ์ฑ๊ณต ์ ์๋ฒ ๋ช ์์ * ์ด ํ์ ๋๋ค
[root@localhost etc]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
*time.bora.net 90.1.14.51 2 u 32 64 3 15.268 -31.360 7.743
216.120.146.201 .INIT. 16 u - 512 0 0.000 0.000 0.000
'Linux (Cent OS)' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Cent OS 7] My SQL ์ค์นํ๊ธฐ (0) | 2023.01.15 |
---|---|
[๋ฆฌ๋ ์ค] ํ์ผ ์ญ์ ๋ช ๋ น์ด (0) | 2022.05.03 |
๋๊ธ