centos6.5配置NTP服务器的详细步骤
来源:互联网 发布:编程初学 编辑:程序博客网 时间:2024/06/05 09:58
1.查看是否安装了NTP:
# rpm -q ntp
ntp-4.2.4p8-2.el6.x86_64 // 这表示已安装了,如果没有安装,这是空白。
2.如果没有安装,我们按照下
# yum install ntp
注意:前提是已经配置好了yum源。
3.开启ntp的自启命令:
# chkconfig ntpd on
4.配置NTP的配置文件:
#vi /etc/ntp.conf
需修改内容为:
restrict 127.0.0.1
restrict -6 ::1
添加内容:
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
server 210.72.145.44 perfer # 中国国家受时中心
server 202.112.10.36 # 1.cn.pool.ntp.org
server 59.124.196.83 # 0.asia.pool.ntp.org
restrict 210.72.145.44 nomodify notrap noquery
restrict 202.112.10.36 nomodify notrap noquery
restrict 59.124.196.83 nomodify notrap noquery
# 外部时间服务器不可用时,以本地时间作为时间服务
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
# Enable public key cryptography.
#crypto
5.保存退出即可。
6.开启ntp服务:
# service ntpd start
7.一般需要5-10分钟左右,查看状态:
# netstat -tlunp | grep ntp
出现:udp 0 0 172.24.240.160:123 0.0.0.0:* 23103/ntpd 说明配置成功。
(注意:本机的ip为172.24.240.160)。
到此服务器已经配置完成。
客户机时间同步配置:
1.# yum install ntp
...
# chkconfig ntp on
2.# vim /etc/ntp.conf
配置文件内容为:
driftfile /var/lib/ntp/drift
restrict 127.0.0.1
restrict -6 ::1
# 配置时间服务器为本地的时间服务器
server 172.24.240.160
restrict 172.24.240.160 nomodify notrap noquery
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys
保存退出。
3.手动同步:
ntpdate -u 172.24.240.160
4.查看状态:
# ntpstat
出现:synchronised to NTP server (172.24.240.160) at stratum 12
表示配置成功。
恭喜你配置完成!
# rpm -q ntp
ntp-4.2.4p8-2.el6.x86_64 // 这表示已安装了,如果没有安装,这是空白。
2.如果没有安装,我们按照下
# yum install ntp
注意:前提是已经配置好了yum源。
3.开启ntp的自启命令:
# chkconfig ntpd on
4.配置NTP的配置文件:
#vi /etc/ntp.conf
需修改内容为:
restrict 127.0.0.1
restrict -6 ::1
添加内容:
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
server 210.72.145.44 perfer # 中国国家受时中心
server 202.112.10.36 # 1.cn.pool.ntp.org
server 59.124.196.83 # 0.asia.pool.ntp.org
restrict 210.72.145.44 nomodify notrap noquery
restrict 202.112.10.36 nomodify notrap noquery
restrict 59.124.196.83 nomodify notrap noquery
# 外部时间服务器不可用时,以本地时间作为时间服务
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
# Enable public key cryptography.
#crypto
5.保存退出即可。
6.开启ntp服务:
# service ntpd start
7.一般需要5-10分钟左右,查看状态:
# netstat -tlunp | grep ntp
出现:udp 0 0 172.24.240.160:123 0.0.0.0:* 23103/ntpd 说明配置成功。
(注意:本机的ip为172.24.240.160)。
到此服务器已经配置完成。
客户机时间同步配置:
1.# yum install ntp
...
# chkconfig ntp on
2.# vim /etc/ntp.conf
配置文件内容为:
driftfile /var/lib/ntp/drift
restrict 127.0.0.1
restrict -6 ::1
# 配置时间服务器为本地的时间服务器
server 172.24.240.160
restrict 172.24.240.160 nomodify notrap noquery
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys
保存退出。
3.手动同步:
ntpdate -u 172.24.240.160
4.查看状态:
# ntpstat
出现:synchronised to NTP server (172.24.240.160) at stratum 12
表示配置成功。
恭喜你配置完成!
阅读全文
0 0
- centos6.5配置NTP服务器的详细步骤
- Centos6.5安装配置NTP时间服务器
- CentOS-如何配置centos6.x的ntp时间同步服务器
- CentOS6.3下配置NTP服务器
- CentOS6.X 配置L2TP For IPsec VPN服务器 详细步骤
- NTP服务器的配置
- NTP服务器的配置
- NTP服务器的配置
- ntp服务器的配置
- Centos6.5升级glibc的详细步骤
- CentOS6.5系统搭建NTP服务器
- NTP时间服务器的配置
- NTP服务器的基本配置
- IT零起步-CentOS6.4配置NTP服务器
- CentOS6.3搭建NTP服务器
- centos6.5的服务器同步时间时报错:ntpdate ntp.fudan.edu.cn
- Centos6.5下本地安装Bowtie2的详细步骤
- 计算机NTP时钟同步(NTP服务器-NTP时间服务器)的重要性及其配置方法
- Intel 100芯片组如何安装Win7
- Python Numpy 线性代数操作总结(随时更新)
- python三种方法实现字符串拼接
- 频繁的更换密码真的安全吗
- 设计模式--模板方法模式
- centos6.5配置NTP服务器的详细步骤
- flask 出现 TemplateNotFound的问题
- ftp和vsftpd的区别
- 红宝书第二章学习笔记
- 【实战\聚焦Python分布式爬虫必学框架Scrapy 打造搜索引擎项目笔记】第5章 scrapy爬取知名问答网站(1)
- 机器学习模型同时处理不同类型的问题
- 机器学习(多元线性回归)
- Android关于Theme.AppCompat相关问题的解决方案
- 快排 Java版