linux time synchronization (linux ʱ¼äͬ²½ÉèÖÃ)
1.check ntp is installed or not
[root@myvm1 server-tar]# whereis npt
npt:
#:(..not install
2.get ntp from official website(http://psp2.ntp.org/bin/view/Main/SoftwareDownloads) and install.
[root@myvm1 server-tar]# wget http://archive.ntp.org/ntp4/ntp-4.2/ntp-4.2.6.tar.gz
[root@myvm1 server-tar]#cp ntp-4.2.6.tar.gz ../
[root@myvm1 server-tar]#cd ..
[root@myvm1 server-tar]#tar -zxvf ntp-4.2.6.tar.gz
[root@myvm1 server-tar]#cd ntp-4.2.6
[root@myvm1 ntp-4.2.6]# vim README
[root@myvm1 ntp-4.2.6]# vim INSTALL
[root@myvm1 ntp-4.2.6]# ./configure --help
######################
By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc. You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.
######################
i will install it in the path "/usr/local/ntp"
[root@myvm1 ntp-4.2.6]# mkdir /usr/local/ntp
[root@myvm1 ntp-4.2.6]# ./configure --prefix=/usr/local/ntp
[root@myvm1 ntp-4.2.6]# make
[root@myvm1 ntp-4.2.6]# make install
[root@myvm1 ntp-4.2.6]# whereis ntp
ntp: /usr/local/ntp
#synchronization time from time server(time.nist.gov).
[root@myvm1 ntp-4.2.6]# date
Tue Feb 2 18:59:22 CST 2010
[root@myvm1 ntp-4.2.6]# /usr/local/ntp/bin/ntpdate time.nist.gov
[root@myvm1 ntp-4.2.6]# hwclock -w
#write time into bios
[root@myvm1 ntp-4.2.6]# date
Sat Feb 20 10:29:59 CST 2010
#successful!
#you must create crontab list to make sure synchronize time.
#########
#Update Time Everyday
0 0 * * * /usr/local/ntp/bin/ntpdate time.nist.gov > /dev/null 2>&1
Ïà¹ØÎĵµ£º
ʹÓÃÒ»ÖÖ±»³ÆΪ"¹«Ë½Ô¿"ÈÏÖ¤µÄ·½Ê½À´½øÐÐsshµÇ¼. "¹«Ë½Ô¿"ÈÏÖ¤·½Ê½¼òµ¥µÄ½âÊÍ:Ê×ÏÈÔÚ¿Í»§¶ËÉÏ´´½¨Ò»¶Ô¹«Ë½Ô¿ £¨¹«Ô¿Îļþ£º~/.ssh/id_rsa.pub£» ˽ԿÎļþ£º~/.ssh/id_rsa£©
È»ºó°Ñ¹«Ô¿·Åµ½·þÎñÆ÷ÉÏ£¨~/.ssh/authorized_keys£©, ×Ô¼º±£ÁôºÃ˽Կ.ÔÚʹÓÃsshµÇ¼ʱ,ssh³ÌÐò»á·¢ËÍ˽ԿȥºÍ·þÎñÆ÷ÉϵĹ«Ô¿×öÆ¥Åä.Èç¹ûÆ¥Åä³É¹¦¾Í¿ ......
Internet------(eth1)router1(eth2)------(eth1)router2(eth0)------(eth0)router3(eth1)------(eth0)pc
ÉÏÃæ¾ÍÊÇÎÒµÄÍøÂçÍØÆ˽ṹ£¬ÆäÖзÓÉÆ÷1ÊÇÓÃÀ´Á¬½ÓÍⲿÍøÂçµÄһ̨linux»úÆ÷£¬Í¼ÖÐËùÓзÓÉÆ÷¶¼ÊÇÆÕͨµÄpc»ú£¬ÕâЩpc¶¼°²×°ÁËubuntu×ÀÃæϵͳ£¬³ýÁË×îÓұߵÄpc£¬ÆäÓàµÄpc¶¼×°ÁË3ÕÅÍø¿¨£¨ÆäÖÐÒ»Õű¸Óã©¡£
ÓÉÓÚDebianϵ ......
Îĵµ´´½¨ÈÕÆÚ£º2010-02-19
£ÛÎļþ1: test06-08.c£Ý
01 // P174: 2.±à³ÌÌâ (8)°ÑÓÐÐòµÄÁ½¸öÊý×éaºÍbºÏ²¢£¬ÒªÇóºÏ²¢ºóµÄÊý×éÒÀÈ»ÓÐÐò
02
03 // The beginning of C program: test06-08.c.
&nbs ......
Ã÷Ìì¾Í»Ø¼ÒÁË¡£½ñÍíÈ¥»ð³µÕ¾ÂòÁËÃ÷ÔçµÄ³µÆ±£¬¸Ð¾õÂù´ÒæµÄ¡£ÕâÁ½Ì죬³ýÁËÕûµçÄÔ£¬É¶Ê¶¼Ã»¸É¡£ÎÒÄÇ¿ÉÁ¯µÄµçÄÔ£¬¸ôÈý²îÎåµÄ¾Í±»ÎÒÕûÒ»´Î¡£¿ªÊ¼Ö»ÊÇÓ¦ÓÃÈí¼þ²ãÃæÉϵģ¬½Ó×ÅÊÇϵͳ£¬ÔÙ½ÓמÍÊǽӽüÓ²¼þ¡£
»¨ÁËÕâô¶àʱ¼ä ......