linux ×öË«»úÈȱ¸
1.1 Ê×ÏÈÏÂÔØlibnet.tar.gz£¬heartbeat-2.0.4.tar.gz
1.2 °´Ë³ÐòÏÖ×°libnetÔÙ×°heartbeat
¶¼ÊÇÔ´Âë°ü£¬½âѹ¿ªºó·Ö±ðÖ´ÐУº
./configure ;make ;make install;
°²×°Íê±Ï¡£
1.3 Èí¼þµÄÅäÖÃ
HeartbeatÈí¼þµÄ°²×°Ä¿Â¼Îª/usr/local/etc/ha.d£¬ÆäÖеÄREADME.config¶ÔÅäÖÃÎļþ½øÐÐÁË˵Ã÷£¬¹²ÓÐÈý¸öÖ÷ÒªµÄÅäÖÃ
Îļþ£ºha.cf£¬haresources£¬authkeys¡£
ʹÓÃÃüÁî rpm -q heartbeat -d »òÕß find / -name ha.cf ¾ù¿ÉÒÔÕÒµ½ÉÏÊöÈý¸öÅäÖÃÎļþ£¬ËùÔÚĿ¼Ϊ:
/usr/local/share/doc/heartbeat-2.0.4¡£
ÏÂÃæÒÀ´Î¶ÔÈý¸öÅäÖÃÎļþ½øÐÐ˵Ã÷£¬´ËÍâÓû§»¹¿ÉÒԲο¼Linux-HA¸½´øµÄ°²×°ÎĵµÒÔ¼°ÅäÖÃÎļþ×ÔÉíµÄ×¢ÊÍ¡£
1.3.1 ÅäÖÃha.cfÎļþ
ha.cfÊÇheartbeatµÄÖ÷ÒªÅäÖÃÎļþ£¬¿ÉÒÔ¶ÔheartbeatµÄ¶àÊýÐÔÄܺÍ״̬½øÐÐÅäÖᣴ󲿷ÖÑ¡ÏîµÄÈ¡Öµ¿ÉÒÔ²ÉÓÃĬÈÏÖµ£¬ÆäÖеÄÖ÷ҪѡÏî¼°ÅäÖ÷½·¨ËµÃ÷ÈçÏ£º
debugfile /var/log/ha-debug£º¸ÃÎļþ±£´æheartbeatµÄµ÷ÊÔÐÅÏ¢
logfile /var/log/ha-log£ºheartbeatµÄÈÕÖ¾Îļþ
keepalive 2£ºÐÄÌøµÄʱ¼ä¼ä¸ô£¬Ä¬ÈÏʱ¼äµ¥Î»ÎªÃë
deadtime 30£º³¬³ö¸Ãʱ¼ä¼ä¸ôδÊÕµ½¶Ô·½½ÚµãµÄÐÄÌø£¬ÔòÈÏΪ¶Ô·½ÒѾËÀÍö¡£
warntime 10£º³¬³ö¸Ãʱ¼ä¼ä¸ôδÊÕµ½¶Ô·½½ÚµãµÄÐÄÌø£¬Ôò·¢³ö¾¯¸æ²¢¼Ç¼µ½ÈÕÖ¾ÖС£
initdead 120£ºÔÚijЩϵͳÉÏ£¬ÏµÍ³Æô¶¯»òÖØÆôÖ®ºóÐèÒª¾¹ýÒ»¶Îʱ¼äÍøÂç²ÅÄÜÕý³£¹¤×÷£¬¸ÃÑ¡ÏîÓÃÓÚ½â¾öÕâÖÖÇé¿ö²úÉúµÄʱ¼ä¼ä¸ô¡£È¡ÖµÖÁÉÙΪdeadtimeµÄÁ½±¶¡£
udpport 694£ºÉèÖù㲥ͨÐÅʹÓõĶ˿ڣ¬694ΪĬÈÏʹÓõĶ˿ںš£
baud 19200£ºÉèÖô®ÐÐͨÐŵIJ¨ÌØÂÊ¡£
serial /dev/ttyS0£ºÑ¡Ôñ´®ÐÐͨÐÅÉ豸£¬ÓÃÓÚË«»úʹÓô®¿ÚÏßÁ¬½ÓµÄÇé¿ö¡£Èç¹ûË«»úʹÓÃÒÔÌ«ÍøÁ¬½Ó£¬ÔòÓ¦¸Ã¹Ø±Õ¸ÃÑ¡Ïî¡£
bcast eth0£ºÉèÖù㲥ͨÐÅËùʹÓõÄÍøÂç½Ó¿Ú¿¨¡£
auto_failback on£ºheartbeatµÄÁ½Ì¨Ö÷»ú·Ö±ðΪÖ÷½ÚµãºÍ´Ó½Úµã¡£Ö÷½ÚµãÔÚÕý³£Çé¿öÏÂÕ¼ÓÃ×ÊÔ´²¢ÔËÐÐËùÓеķþÎñ£¬
Óöµ½¹ÊÕÏʱ°Ñ×ÊÔ´½»¸ø´Ó½Úµã²¢ÓÉ´Ó½ÚµãÔËÐзþÎñ¡£ÔÚ¸ÃÑ¡ÏîÉèΪonµÄÇé¿öÏ£¬Ò»µ©Ö÷½Úµã»Ö¸´ÔËÐУ¬Ôò×Ô¶¯»ñÈ¡
×ÊÔ´²¢È¡´ú´Ó½Úµã£¬·ñÔò²»È¡´ú´Ó½Úµã¡£
ping ping-node1 ping-node2£ºÖ¸¶¨ping node£¬ping node²¢²»¹¹³ÉË«»ú½Úµã£¬ËüÃǽö½öÓÃÀ´²âÊÔÍøÂçÁ¬½Ó¡£
respawn hacluster /usr/lib/heartbeat/ipfail£ºÖ¸¶¨ÓëheartbeatһͬÆô¶¯ºÍ¹Ø±ÕµÄ½ø³Ì£¬¸Ã½ø³Ì±»×Ô¶¯¼àÊÓ£¬
Óöµ½¹ÊÕÏÔòÖØÐÂÆô¶¯¡£×î³£ÓõĽø³ÌÊÇipfail£¬¸Ã½ø³ÌÓÃÓÚ¼ì²âºÍ´¦ÀíÍøÂç¹ÊÕÏ£¬ÐèÒªÅäºÏpingÓï¾äÖ¸¶¨µÄping
nodeÀ´¼ì²âÍøÂçÁ¬½Ó¡£
¾ßÌåÄÚÈݾÙ
Ïà¹ØÎĵµ£º
2009 Äê 4 ÔÂ 23 ÈÕ
±¾ÎÄÖÐÎÒÃÇÕë¶Ô Linux É϶àÏ̱߳à³ÌµÄÖ÷ÒªÌØÐÔ×ܽá³ö 5 Ìõ¾Ñ飬ÓÃÒÔ¸ÄÉÆ Linux ¶àÏ̱߳à³ÌµÄÏ°¹ßºÍ±ÜÃâÆäÖеĿª·¢ÏÝÚå¡£ÔÚ±¾ÎÄÖУ¬ÎÒÃÇ´©²åһЩ Windows µÄ±à³ÌÓÃÀýÓÃÒÔ¶Ô±È Linux ÌØÐÔ£¬ÒÔ¼ÓÉî¶ÁÕßÓ¡Ïó¡£
±³¾°
Linux ƽ̨ÉϵĶàÏ̳߳ÌÐò¿ª·¢Ïà¶ÔÓ¦ÆäËûƽ̨£¨±ÈÈç Windows£©µÄ¶àÏß³Ì API ÓÐһЩϸ΢ ......
ÓÉÓÚ Linux Á¼ºÃµÄÓû§È¨ÏÞ¹ÜÀíÌåϵ£¬²¡¶¾ÍùÍùÊÇ Linux ϵͳ¹ÜÀíÔ±×îºó²ÅÐèÒª¿¼ÂǵÄÎÊÌâ¡£ÒÔÍù£¬Linux ÉϵÄɱ¶¾Èí¼þÖ÷ÒªÊÇΪÆóÒµµÄÓʼþºÍÎļþ·þÎñÆ÷ËùÉè¼ÆµÄ¡£Èç½ñ£¬Ëæ×Å Linux ×ÀÃæÓû§ÊýÁ¿µÄÔö³¤£¬×ÀÃæÓû§ÔÚÊÜÒæÓÚ Linux ϵͳ¶Ô²¡¶¾½ÏÇ¿µÄÌìÈ»ÃâÒßÁ¦µÄͬʱ£¬Ò²ÐèҪɱ¶¾Èí¼þÇåÀí´ÓÍøÂç»òUÅÌ´øÀ´µÄWIndows²¡¶¾¡£¾¡¹ÜÄÇЩ ......
http://www.ibm.com/developerworks/cn/linux/embed/diy/
DIY£º×Ô¼º¶¯ÊÖ×öÒ»¸öÃÔÄã Linux ϵͳ
ÎĵµÑ¡Ïî
<tr valign="top"><td width="8"><img alt="" height="1" width="8" src="//www.ibm.com/i/c.gif"/></td><td width=&quo ......
ÔÎļû£ºhttp://www.cppblog.com/flashboy/articles/47012.html
1¡¢ÐÞ¸ÄÓû§½ø³Ì¿É´ò¿ªÎļþÊýÏÞÖÆ
ÔÚLinuxƽ̨ÉÏ£¬ÎÞÂÛ±àд¿Í»§¶Ë³ÌÐò»¹ÊÇ·þÎñ¶Ë³ÌÐò£¬ÔÚ½øÐи߲¢·¢TCPÁ¬½Ó´¦Àíʱ£¬×î¸ßµÄ²¢·¢ÊýÁ¿¶¼ÒªÊܵ½ÏµÍ³¶ÔÓû§µ¥Ò»½ø³Ìͬʱ¿É´ò¿ªÎļþÊýÁ¿µÄÏÞÖÆ(ÕâÊÇÒòΪϵͳΪÿ¸öTCPÁ¬½Ó¶¼Òª´´½¨Ò»¸ösocket¾ä±ú£¬Ã¿¸ ......
from:http://www.dzjs.net/html/qianrushixitong/2008/0509/3125.html
1 ÒýÑÔ
ELF(Executable and Linkable Format)¼´¿ÉÖ´ÐÐÁ¬½ÓÎļþ¸ñʽ£¬ÊÇLinux£¬SVR4ºÍSolaris2.0ĬÈϵÄÄ¿±êÎļþ¸ñʽ£¬Ä¿Ç°±ê×¼½Ó¿ÚίԱ»áTISÒѽ«ELF±ê×¼»¯ÎªÒ»ÖÖ¿ÉÒÆÖ²µÄÄ¿±êÎļþ¸ñʽ£¬ÔËÐÐÓÚ32-bit IntelÌåϵ΢»úÉÏ£¬¿ÉÓë¶àÖÖ²Ù×÷ ......