This time, I tried to set NTP, so I will write it in a memo as a memorandum. I'm sure there are other people listed, but it's not bad. ..
First of all, from the general flow.
Now, let's actually describe the details of each.
yum install ntp
The configuration file for ntp.conf is below. /etc/ntp.conf
2-1. First, make a backup of ntp.conf.
cp -p /etc/ntp.conf /etc/Backup file name (optional).conf
2-2. Next, edit the ntp.conf file. #### **`vi /etc/ntp.conf`** ```conf The following contents are described in the contents of the ntp.conf file, so comment them out with "#". Describe the information of the NTP server you want to set on it. * This time, as an example, NICT (http://jjy.nict.go.jp/ntp/) NTP server and MULTIFEED (https://www.mfeed.ad.jp/ntp/overview.html) The NTP server of is described. >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 ntp.nict.jp > server ntp1.jst.mfeed.ad.jp > #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 ### 3. Set the time with the ntpupdate command * If the time is off, synchronization will not be successful, so perform this procedure. Execute the following command. ```date``` ```ntpupdate ntp server``` ```date``` There is a possibility that the time is off on the first date, but the time is correct on the second date after executing ntpupdate. ### 4. Start the ntpd service Execute the following command to restart the NTP service. ```service ntpd restart``` Make sure the NTP service is running. ```service ntpd status```