各种笔记
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

8 lines
567 B

4 년 전
  1. # 安装ntpdate工具
  2. yum -y install ntp ntpdate
  3. # 设置系统时间与网络时间同步
  4. ntpdate 0.asia.pool.ntp.org
  5. 这里主要就是通过时间服务器对系统时间进行同步,所以0.asia.pool.ntp.org并不是固定的,大家可以选择time.nist.gov、time.nuri.net、0.asia.pool.ntp.org、1.asia.pool.ntp.org、2.asia.pool.ntp.org、3.asia.pool.ntp.org中任意一个,只要保证可用就OK
  6. # 将系统时间写入硬件时间
  7. hwclock --systohc
  8. 这里是为了防止系统重启后时间被还原,因此需要写到硬件设备中去。