Linux cluster time synchronization settings

2011-09-24  来源:本站原创  分类:OS  人气:65 

11 sets of plans to look at Linux cluster time synchronization, the operating system to Ubuntu 11.04 x86 64 Bits

Selected one of the 133.133.10.2 as the time server (ntp server), the node with other nodes for time synchronization.

1, 133.133.10.2 (monitor) to install ntp server.

root @ monitor: ~ # apt-get install ntp

2, modify / etc / ntp.conf as follows: (reference http://blog.sina.com.cn/s/blog_6b86fdc50100ojfn.html )

# / Etc / ntp.conf, configuration for ntpd; see ntp.conf (5) for help

driftfile / var / lib / ntp / ntp.drift

# Enable this if you want statistics to be logged.

# Statsdir / var / log / ntpstats /

statistics loopstats peerstats clockstats

filegen loopstats file loopstats type day enable

filegen peerstats file peerstats type day enable

filegen clockstats file clockstats type day enable

# Specify one or more NTP servers.

# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board

# On 2011-02-08 (LP: # 104525). See http://www.pool.ntp.org/join.html for

# More information.

# Server 0.ubuntu.pool.ntp.org

# Server 1.ubuntu.pool.ntp.org

# Server 2.ubuntu.pool.ntp.org

# Server 3.ubuntu.pool.ntp.org

# Use Ubuntu's ntp server as a fallback.

# Server ntp.ubuntu.com

server 127.127.1.0 minpoll 4 maxpoll 5

fudge 127.127.1.0 stratum 2

# Access control configuration; see / usr / share / doc / ntp-doc / html / accopt.html for

# Details. The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions>

# Might also be helpful.

#

# Note that "restrict" applies to both servers and clients, so a configuration

# That might be intended to block requests from certain clients could also end

# Up blocking replies from your own upstream servers.

# By default, exchange time with everybody, but don't allow configuration.

# Restrict -4 default kod notrap nomodify nopeer noquery

# Restrict -6 default kod notrap nomodify nopeer noquery

restrict -4 default kod nomodify noper

restrict -6 default kod nomodify noper

# Local users may interrogate the ntp server more closely.

restrict 127.0.0.1

restrict:: 1

# Clients from this (example!) subnet have unlimited access, but only if

# Cryptographically authenticated.

# Restrict 192.168.123.0 mask 255.255.255.0 notrust

# If you want to provide time to your local subnet, change the next line.

# (Again, the address is an example only.)

# Broadcast 192.168.123.255

# If you want to listen to time broadcasts on your local subnet, de-comment the

# Next lines. Please do this only if you trust everybody on the network!

# Disable auth

# Broadcastclient

3, run ntpdate command

root @ monitor: / etc # ntpdate-q 127.0.0.1

Get

server 127.0.0.1, stratum 3, offset -0.000003, delay 0.02565

23 Sep 17:12:00 ntpdate [11502]: adjust time server 127.0.0.1 offset -0.000003 sec

4, the other nodes in the 133.133.10 .* 133.133.10.2 synchronization time and

Each node in the other run command

root @ slave1: ~ # ntpdate 133.133.10.2

This time found the time synchronization between nodes, but to run ntpdate at boot only, if we are to set the synchronization time of 1 hour, then proceed to Step 5

5, the other nodes in the 133.133.10 .* 133.133.10.2 synchronized regularly with the time

After the installation, use the crontab to automatically update the time:

# Crontab-e

Add the following line:

* * / 1 * * * / usr / sbin / ntpdate 133.133.10.2

This line means that every hour with a time synchronization with 133.133.10.2.

6, all nodes by the date command to find a consistent time

相关文章
  • Linux cluster time synchronization settings 2011-09-24

    11 sets of plans to look at Linux cluster time synchronization, the operating system to Ubuntu 11.04 x86 64 Bits Selected one of the 133.133.10.2 as the time server (ntp server), the node with other nodes for time synchronization. 1, 133.133.10.2 (mo

  • linux rsync synchronization settings detailed guide 2011-08-24

    linux rsync detailed guide to configure the synchronization settings to synchronize data rsync rsync rpm package installation and configuration [Root @ Hammer home] # rpm-qa | grep rsync # rsync installed, check whether the system packages rsync-2.6.

  • apache2 + tomcat5.5 cluster + session synchronization 2010-12-14

    Note: a warning by the previous, and write a session on the tomcat cluster synchronization problem, first introduced the tomcat integration and the reasons and necessity of doing cluster, session synchronization role. Including the software installat

  • linux cluster technology introduced 2010-12-08

    Currently, more and more sites using Linux operating system, to provide e-mail, Web, file storage, databases and other services. There are a lot of companies in the enterprise network to provide these services using Linux servers. With the deepening

  • linux cluster technology introduction 2010-12-08

    Currently, more and more web sites which use the Linux operating system to provide e-mail, Web, file storage, database and other services. There are a lot of companies within the enterprise network using Linux servers to provide these services. With

  • Transfer: high-performance Linux cluster monitoring of the Road 2011-03-30

    Monitoring is a core task of cluster management. Monitoring data can be used for scheduling tasks, load balancing, to report a hardware failure, and extensive control over system usage. Monitoring information must not affect the performance of the cl

  • Google case study of the Linux Cluster of Linux cluster solutions (1) 2010-10-05

    Original Address http://www.opendigest.org/article.php/538 Technical architecture on Goolge's technical staff has been very mysterious, Google paper discusses the realization of tens of thousands of Linux cluster server technology! 1. Introduction Go

  • Linux rsync directory synchronization to achieve 2011-03-03

    Linux rsync directory synchronization to achieve Goals: A server / opt / web directory on the server with B / opt / web directory synchronization. Namely: B and A for active sync. OS: Reaht AS4 A Server 192.168.1.2 / opt / web B Server 192.168.1.3 /

  • Linux Time Synchronization Settings 2010-08-28

    1. Linux first need to understand the task of planning tools within a crontab crontab can be timed to execute the action you want to do Directly edit the crontab command crontab-u / / set a user's cron service, usually root user to execute the comman

  • linux cluster configuration under tomcat 2010-03-29

    Apache + Tomcat + Linux clustering and load balancing (Session replication) configuration guide to practice After I repeated Test Practice, in the linux And the window under the Test Through, win a relatively simple, because by default, the multicast

  • Google case study of the Linux Cluster of Linux cluster solutions (2) 2010-10-05

    Original Address http://www.opendigest.org/article.php/538 4, Google's storage system Google cluster had been collected from the Web page to reach more than 80 million cards, while it also has more than one billion images. [5] reported in the Google

  • configure linux cluster apche2.2.6 & & tomcat5.5 2011-05-11

    To the official website of Apache required documents: httpd-2.2.6.tar.gz apache-tomcat-5.5.23.tar.gz mod_jk-1.2.27-httpd-2.2.6.so First, install apache # Tar xzvf httpd-2.2.6.tar.gz # Cd httpd-2.2.6 #. / Configure - prefix = / usr/local/apache2 - ena

  • apache under linux cluster load balancing and jboss4 2011-02-15

    linux under apache load balancing and jboss4 cluster operating system: RedHat AS 4 32bit Update 4 Packages required: Package used by Apache: httpd-2.2.4.tar.gz Jboss used package: jboss-4.0.2 (windows and linux compatible) JDK used by package: jdk-6u

  • Linux system time synchronization 2011-04-12

    ntpdate asia.pool.ntp.org 1, first need to understand the mission planning tool inside a linux crontab crontab can be timed to execute the action you want to do Directly edit the crontab command crontab-u / / set a user's cron service, usually root u

  • RHEL linux routing and IP settings on 2011-04-25

    1. [Root @ localhost ~] # echo '1 '> / proc/sys/net/ipv4/ip_forward [Root @ localhost ~] # more / proc/sys/net/ipv4/ip_forward 1 Note: boot linux router settings and view the current value 2. [Root @ localhost ~] # vi / etc / sysctl.conf Note: To sav

  • linux java environment variable settings 2010-06-12

    In / etc / profile file to change permissions. And then in a terminal enter sudo gedit / etc / profile. Or use the root user to directly edit. At the end of the file add the following few: export JAVA_HOME = / usr/java/jdk1.5 export PATH = $ JAVA_HOM

  • linux bt4 wireless network settings 2010-08-16

    Transfer from http://www.wlanbbs.com/thread-82706-1-1.html Steps are as follows: 1. First of all, the number left in the task bar icon to be a fourth, a black screen like a small icon, click to open a shell 2. Input / etc / init.d / wicd start, pay a

  • [Transferred] to ask about the sound in flash in synchronization settings problem. 2011-01-04

    http://bbs.9ria.com/viewthread.php?tid=71646&extra=page% 3D1% 26amp; orderby% 3Ddateline% 26amp; filter% 3D86400 After setting a key frame, as long as you import a sound file, the Properties panel of the frame can be set to the sound of the frame. Sy

  • linux vsftb user rights settings 2011-04-16

    Cu see in the title: linux vsftpd can not upload the user to download only the realization of URL: http://bbs.chinaunix.net/thread-2299305-1-5.html

  • No password linux cluster 2011-04-26

    1, install ssh, and generate a public key and private key to run ssh-keygen-t rsa, direct on-screen prompts to select "Enter" In the user directory ~ /. Ssh / generate two files, id_rsa, id_rsa.pub cat ~ / .ssh / id_dsa.pub>> ~ / .ssh / au