配置SOLARIS的NTP服务

来源:互联网 发布:巨杉数据库风投 编辑:程序博客网 时间:2024/05/21 06:41

配置SOLARIS的NTP服务 

1、查看是否安装了NTP软件包(默认是安装的),有下面两行则是已安装 # pkginfo | grep ntp
system SUNWntpr NTP, (Root) 
system SUNWntpu NTP , (Usr)
2、编辑配置文件ntp.conf #vi /etc/inet/ntp.conf
server ip_132.118.64.25 prefer
driftfile /var/ntp/ntp.drift
3、创建drift文件 touch /var/ntp/ntp.drift
4、停止、启动NTP服务 /etc/init.d/xntpd start
/etc/init.d/xntpd stop
5、查看服务 ps -ef|grep ntp
   查看进程 snoop |grep -i ntp 查看是否存在ntp包

6、查看其他服务器时间
ntpdate -q 132.118.64.25
7.检查服务器是否加成功
检查方法:ntpq -p