CentOS+GPS+Gpsd+ntpd架设时间服务器
记录CentOS架设时间服务器要点:
GPS: Gstar RS-232接口USB供电。
1、GPS连接COM1口。
2、从http://gpsd.berlios.de/下载gpsd安装,如果系统没有ncurses-devel包,系统将无法编译gpsmon程序。
3、启动gpsd程序,在/etc/rc.local增加
/bin/chmod o+rw /dev/ttyS0 /usr/local/sbin/gpsd -n /dev/ttyS0
4、/etc/ntp.conf文件增加
server 127.127.28.0 minpoll 4 maxpoll 4 fudge 127.127.28.0 time1 0.420 refid GPS server 127.127.28.1 minpoll 4 maxpoll 4 prefer fudge 127.127.28.1 refid GPS1
注意:在某些机器不使用/bin/chmod o+rw /dev/ttyS0修改ttyS0的权限,ntpd也能读取掉相应的时间信息,但是在某些机器,死活也不好使。