ntp时间服务
1.linux常用时间命令
    # 查看系统时间
    date
    # 查看硬件时间
    hwclock
 
2.安装部署ntp服务
    1、查看是否安装ntp服务
    rpm -qa|grep ntp
    2、安装ntp服务
    yum install -y ntp
    3、同步系统时间
    ntpdate  0.cn.pool.ntp.org
    hwclock -w  # 系统时间保存到硬件时间
    4、修改ntp配置
    vim /etc/ntp.conf
    # 修改server 为中国服务器
    server 0.cn.pool.ntp.org iburst
    server 1.cn.pool.ntp.org iburst
    server 2.cn.pool.ntp.org iburst
    server 3.cn.pool.ntp.org iburst
    5、启动ntp服务
    systemctl start ntpd.service 
    6、设置开机启动
    systemctl enable ntpd.service
    










