您好,欢迎访问三七文档
NTP编译安装方案一、安装环境RedHatEnterpriseLinuxServerrelease6.0(Santiago)二、NTP最新版本ntp-4.2.8p6三、安装步骤1.查看原ntp版本信息,执行命令:#rpm-qa|grepntp结果如下:原版本为:ntp-4.2.4p8-2.el6.x86_642.查看ntpd服务状态,执行命令:#chkconfig--list|grepntpd结果如下:ntpd服务为关闭状态。3.删除原ntp:#rpm-entp-4.2.4p8-2.el6.x86_64或者:#yumremoventp4.下载tar包这里能找到最新的tar包为:ntp-4.2.8p6.tar.gz下载链接:或者接外网情况下执行命令:wget~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.8p6.tar.gz5.上传至系统指定目录这里上传到/root/目录下。6.解压tar包到当前目录下,执行解压命令:#tar-xzvfntp-4.2.8p6.tar.gz得到解压文件夹ntp-4.2.8p6,文件夹内的文件如下:#cdntp-4.2.8p67.编译ntp#./configure--prefix=/usr/local/ntp-4.2.8p6--enable-all-clocks--enable-parse-clocks#make&&makeinstall8.创建软链接#ln-s/usr/local/ntp-4.2.8p6/usr/local/ntp9.编辑配置文件#vi/etc/ntp.confdriftfile/var/lib/ntp/driftrestrictdefaultkodnomodifynotrapnopeernoqueryrestrict-6defaultkodnomodifynotrapnopeernoqueryrestrict127.0.0.1restrict-6::1server0.centos.pool.ntp.orgserver1.centos.pool.ntp.orgserver2.centos.pool.ntp.orgincludefile/etc/ntp/crypto/pwkeys/etc/ntp/keys10.运行ntp#/usr/local/ntp/bin/ntpd-c/etc/ntp.conf11.检查同步情况#watch/usr/local/bin/ntpq-p12.开机运行#echo'/usr/local/ntp/bin/ntpd-c/etc/ntp.conf'/etc/rc.local参考:
本文标题:ntp编译安装方案
链接地址:https://www.777doc.com/doc-4063372 .html