Aktionen
Setup ntp server » Historie » Revision 1
Revision 1/2
| Weiter »
Jeremias Keihsler, 12.01.2017 10:44
Install Procedure for ntp-server¶
Requirements¶
To install rdesktop you will need the following:- a installed and supported operating system (e.g. CentOS 6.x)
- root-access
- a fast internet connection
Preliminary Note¶
This procedure is based on a documentation supplied by- http://www.cyberciti.biz/faq/rhel-fedora-centos-configure-ntp-client-server/
- http://http://www.gtkdb.de/index_7_576.html
- http://linuxwave.blogspot.com/2007/08/setting-up-your-own-ntp-server.html
Install¶
Install ntp:
yum install ntp
Configure ntp Server¶
vim /etc/ntp.conf
Use external ntp-Server as reference
Basically the ntp.conf is ready configured, so there is nothing to change¶
If there is need to use additional or different ntp-server then add it to the server
section
Use internal clock as reference¶
This is only necessary if there is no reliable time-source or ntp-server available at all
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 4 # set stratum to any value from 0 to 16, the higher the safer, defaults to 10, 4 is working with WinXP and Win7
Start ntp Server¶
manually start ntp Server:
/etc/init.d/ntpd start
automatically start the service at boot time:
/sbin/service ntpd on
you can check the runlevels by
/sbin/chkconfig --list ntpd
you should get an output like:
ntpd 0:off 1:off 2:off 3:on 4:off 5:on 6:off
configure firewall¶
Open NTP Port (123) on Iptables Firewall
system-config-firewall-tui
add port
123:udp
check if settings are ok
cat /etc/sysconfig/iptables
You should have following line before COMMIT:
-A RH-Firewall-1-INPUT -m state --state NEW -p udp --dport 123 -j ACCEPT
Restart Iptables Firewall:
/etc/init.d/iptables restart
Usage¶
try to connect via windows machine and enter as a internet-time-source the ip-adress of the new ntp-server. (e.g. 192.168.2.53)
try to connect via linux machine and use to sync time:
ntpdate 192.168.2.53
Von Jeremias Keihsler vor fast 8 Jahren aktualisiert · 1 Revisionen