'); /*! This file is auto-generated */ !function(e,a,t){var n,r,o,i=a.createElement("canvas"),p=i.getContext&&i.getContext("2d");function s(e,t){var a=String.fromCharCode,e=(p.clearRect(0,0,i.width,i.height),p.fillText(a.apply(this,e),0,0),i.toDataURL());return p.clearRect(0,0,i.width,i.height),p.fillText(a.apply(this,t),0,0),e===i.toDataURL()}function c(e){var t=a.createElement("script");t.src=e,t.defer=t.type="text/javascript",a.getElementsByTagName("head")[0].appendChild(t)}for(o=Array("flag","emoji"),t.supports={everything:!0,everythingExceptFlag:!0},r=0;r
您的位置 首页 教育

Linux配置校时服务

服务器lcentos6.x rpm -qa |grep ntp  查看是否安装 yum install ntp…

服务器lcentos6.x
rpm -qa |grep ntp  查看是否安装
yum install ntp

Step1、修改时区备份原有文件
cp /etc/localtime /etc/localtime.bak
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
step2、修改clock文件参数
vi /etc/sysconfig/clock
ZONE=”Asia/Shanghai”
UTC=false
ARC=false
Step3、修改ntp服务并备份原有文件
cp /etc/ntp.conf /etc/ntp.conf.bak
Step4、修改ntp.conf文件参数
vi /etc/ntp.conf  
#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 10.254.96.101
server time.jtjc.yis.hn
10.254.17.253
Step5、手动同步一次服务器时间
service ntpd stop   #停止服务

ntpdate 10.254.17.253  #保持和ntp服务器日期同步

service ntpd start  #启动服务

chkconfig ntpd on  #保持开机启动
Step6、写入硬件BIOS

hwclock -w

手动改
date -s  16:03:00
date -s  “2022-01-06 16:03:00”
hwclock -w 

查看日志

tail -100f /var/log/ntp.log #查看最近100条运行日志

本文来自网络,不代表0514资讯网立场,转载请注明出处:https://www.0514zx.com/info/784.html
0514zx.com

作者: 0514zx.com

优质职场领域创作者
联系我们

联系我们

工作时间:周一至周五,9:00-17:30,节假日休息

关注微信
微信扫一扫关注我们

微信扫一扫关注我们

CMS教程网 趣丁号猫咪日记趣文库每日星座运势电脑技术初夏网站长分类目录丝路百科趣学百科趣科技号热门榜论文之家问百科网