首页 > 系统相关 >校正centos服务器时间

校正centos服务器时间

时间:2022-08-14 23:55:49浏览次数:53  
标签:校正 centos service ntp usr 服务器 ntpd

1、安装NTP

sudo yum -y install ntp
1
2、使用 ntpdate 测试 NTP

ntpdate pool.ntp.org
1
3、查看服务器时间

date
1
4、启动ntpd daemon,持续校准时间

systemctl start ntpd
1
5、查看ntpd daemon是否启动

[root@localhost ~]# systemctl status ntpd
ntpd.service - Network Time Service
Loaded: loaded (/usr/lib/systemd/system/ntpd.service; disabled; vendor preset: disabled)
Active: active (running) since Mon 2017-09-11 15:37:23 CST; 1h 49min ago
Process: 12142 ExecStart=/usr/sbin/ntpd -u ntp:ntp $OPTIONS (code=exited, status=0/SUCCESS)
Main PID: 12143 (ntpd)
Memory: 624.0K
CGroup: /system.slice/ntpd.service
12143 /usr/sbin/ntpd -u ntp:ntp -g

标签:校正,centos,service,ntp,usr,服务器,ntpd
From: https://www.cnblogs.com/zeenzhou/p/16586738.html

相关文章

  • 服务器无法登录之迷——login界面无限循环
         本周遇到了一个很奇葩的问题,客户的一台服务器无论如何都无法登录到机器系统里面去。可以肯定的是输入的登录密码是完全正确的,但是输入密码后,总在login登录界面无......
  • centos7安装kettle 资源库问题的解决方案
    wgetftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/matthewdva:/build:/EPEL:/el7/RHEL_7/x86_64/webkitgtk-2.4.9-1.el7.x86_64.rpmyumin......
  • [CentOS7]更换内核
    1.添加repo库yum-yinstallhttps://www.elrepo.org/elrepo-release-7.el7.elrepo.noarch.rpm2.导入签名rpm--importhttps://www.elrepo.org/RPM-GPG-KEY-elrepo.......
  • 保护SSH服务器连接的8种方法
    在Linux上保护SSH服务器连接的8种方法入门小站 入门小站 2022-07-1121:58 发表于湖北收录于合集#Linux478个#ssh6个SSH是一种广泛使用的协议,用于安全地访......
  • 服务器12种基本故障+排查方法
    服务器12种基本故障+排查方法入门小站 入门小站 2022-07-1022:12 发表于湖北收录于合集#Linux478个#windows14个#服务器5个加电类故障定义举例从上电(或......
  • Ubuntu17.10上安装FTP服务器 (vsftpd)
    我在Ubuntu17.10上安装FTP服务器(vsftpd)原创 入门小站 入门小站 2022-08-0622:43 发表于湖北收录于合集#Linux478个#ftp1个1.安装vsftpd更新可用软......
  • centos7使用 Docker Engine部署gitlab
    1.安装docker-ce卸载旧版本:yumremovedockerdocker-commondocker-selinuxdocker-engine一、虚拟机联网,安装yum工具执行以下命令yuminstall-yyum-utils\dev......
  • flask+uwsgi+nginx 搭建后端服务器
    1)构建flask服务安装创建虚拟环境安装flask##创建虚拟环境python3-mvenvvenv#安装flaskpipinstall--upgradepippipinstall-Usetuptoolspipinstal......
  • 华为云服务器数据库配置远程连接
    华为云服务器数据库配置远程连接起因暑期购买了华为云的一台服务器进行开发在上面部署了MySQL数据库,由于app中修改用户信息存在未修复的bug,经常会出现登录密码为空,导致......
  • centOS7 firewall 防火墙基本操作
    centOS7firewall防火墙基本操作运维家 2022-07-2309:09 发表于北京收录于合集#防火墙1个#linux22个 一、防火墙的开启、关闭、禁用命令 (1)设置开机......