NTP Service Setup

Source: Internet
Author: User

1: Experimental environment

Prerequisites: Virtual machine environment, Windows client, shutdown firewall, linux Server shut down firewall, turn off SELinux.

Cent OS:NTP Server ip:192.168.80.134/255.255.255.0

Windows 7: Client ip:192.168.80.133/255.255.255.0

2:NTP Service Installation

① generally comes with:

1 grep NTP 2 ntp-4.2. 6p5-1. el6.centos.x86_643 fontpackages-filesystem-1.41 -1.1. El6.noarch4 ntpdate-4.2. 6p5-1. el6.centos.x86_ 64

② if not, this installation

㈠RPM Installation:

RPM-IVH ntp-*.rpm

Unloading:

Rpm-e ntp-*.rpm

㈡yum Installation

Yum-y Install ntp.i*

Unloading:

Yum-y Remove ntp.i*

3: Service configuration:

①: vi/etc/ntp.conf

1Restrict 192.168.80.0 mask 255.255.255.0 nomodify notrap2 3 # Use public servers from the pool.ntp.org project.4# Consider joining the pool (http://www.pool.ntp.org/join.html).5#server0. centos.pool.ntp.org Iburst6#server1. centos.pool.ntp.org Iburst7#server2. centos.pool.ntp.org Iburst8#server3. centos.pool.ntp.org Iburst9 Server asia.pool.ntp.org

1 /etc/rc.d/init.d/ntpd start
1 chkconfig ntpd on

②: Change the time zone:

Tzselect:

Execute the tzselect command--Select asia--> Select china--> Select East China-beijing, Guangdong, Shanghai, etc--> and enter 1;

Execute tz= ' Asia/shanghai '; Export TZ and add this line of command to the. Profile, then exit and log back in.

Reference: http://jingyan.baidu.com/article/fa4125acb7328628ac70920e.html

③ Manual Update:

Ntpdate asia.pool.ntp.org

④ View the synchronization of this machine with the upper NTP server:

Ntpq-p

At this point: the NTP itself is synchronized properly and then set the client

⑤ Change the IP address of the Windows Synchronization server to the NTP server IP that was built, and update the time immediately.

Finally: The simple construction of the NTP server, the implementation of the basic functions.

NTP Service Setup

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.