Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

LINUXÍø¿¨°ó¶¨¾ÛºÏÉèÖÃ

LINUXÍø¿¨°ó¶¨¾ÛºÏÉèÖÃ
1.½¨Á¢ÐéÄâÍøÂç½Ó¿ÚÅäÖÃÎļþ£ºifcfg-bond0
cd /etc/sysconfig/ network-scripts/
[root@rhas-13 root]# vi ifcfg-bond0      (½¨Á¢ifcfg-bond0Îļþ)

2.±à¼­ÐéÄâÍøÂç½Ó¿ÚÅäÖÃÎļþ
#vi ifcfg-bond0  
½«µÚÒ»ÐÐ¸Ä³É DEVICE=bond0  
# cat ifcfg-bond0
DEVICE=bond0
BOOTPROTO=static
IPADDR=192.168.113.55
NETMASK=255.255.255.0
ONBOOT=yes
MAST=bond0

ÕâÀïÒªÖ÷Ò⣬²»ÒªÖ¸¶¨µ¥¸öÍø¿¨µÄIP µØÖ·¡¢×ÓÍøÑÚÂë»òÍø¿¨ ID¡£½«ÉÏÊöÐÅÏ¢Ö¸¶¨µ½ÐéÄâÊÊÅäÆ÷(bonding)Öм´¿É¡£
[root@rhas-13 network-scripts]# cat ifcfg-eth1  
DEVICE=eth1
BOOTPROTO=no
ONBOOT=yes
MASTER=bond0
USERCTL=no

[root@rhas-13 network-scripts]# cat ifcfg-eth2  
DEVICE=eth2
BOOTPROTO=no
ONBOOT=yes
MASTER=bond0
USERCTL=no

3 ÉèÖÃÆô¶¯Ê±¼ÓÔØ°ó¶¨Ä£¿é
# vi /etc/modules.conf  
±à¼­ /etc/modules.conf Îļþ£¬¼ÓÈëÈçÏÂÒ»ÐÐÄÚÈÝ£¬ÒÔʹϵͳÔÚÆô¶¯Ê±¼ÓÔØbondingÄ£¿é£¬¶ÔÍâÐéÄâÍøÂç½Ó¿ÚÉ豸Ϊ bond0  
¡¡
¼ÓÈëÏÂÁÐÁ½ÐР 
alias bond0 bonding
options bond0  miimon=100 mode=0

˵Ã÷£ºmiimonÊÇÓÃÀ´½øÐÐÁ´Â·¼à²âµÄ¡£ ±ÈÈç:miimon=100£¬ÄÇôϵͳÿ100ms¼à²âÒ»´ÎÁ´Â·Á¬½Ó״̬£¬Èç¹ûÓÐÒ»ÌõÏß·²»Í¨¾ÍתÈëÁíÒ»ÌõÏß·£»modeµÄÖµ±íʾ¹¤×÷ģʽ£¬Ëû¹²ÓÐ0£¬1,2,3ËÄÖÖģʽ£¬³£ÓõÄΪ0,1Á½ÖÖ¡£
   mode=0±íʾload balancing (round-robin)Ϊ¸ºÔؾùºâ·½Ê½£¬Á½¿éÍø¿¨¶¼¹¤×÷¡£
   mode=1±íʾfault-tolerance (active-backup)ÌṩÈßÓ๦ÄÜ£¬¹¤×÷·½Ê½ÊÇÖ÷±¸µÄ¹¤×÷·½Ê½,Ò²¾ÍÊÇ˵ĬÈÏÇé¿öÏÂÖ»ÓÐÒ»¿éÍø¿¨¹¤×÷,ÁíÒ»¿é×ö±¸·Ý.   
bondingÖ»ÄÜÌṩÁ´Â·¼à²â£¬¼´´ÓÖ÷»úµ½½»»»»úµÄÁ´Â·ÊÇ·ñ½Óͨ¡£Èç¹ûÖ»Êǽ»»»»ú¶ÔÍâµÄÁ´Â·downµôÁË£¬¶ø½»»»»ú±¾Éí²¢Ã»ÓйÊÕÏ£¬ÄÇôbonding»áÈÏΪÁ´Â·Ã»ÓÐÎÊÌâ¶ø¼ÌÐøʹÓÃ

4 # vi /etc/rc.d/rc.local  
¼ÓÈë
ifenslave bond0 eth1 eth2


µ½ÕâʱÒѾ­ÅäÖÃÍê±ÏÖØÐÂÆô¶¯»úÆ÷.
ÖØÆô»á¿´¼ûÒÔÏÂÐÅÏ¢¾Í±íʾÅäÖóɹ¦ÁË
................  
Bringing up interface bond0 OK  
Bringing up interface eth0 OK  
Bringing up interface eth1 OK  
±¾ÎÄÀ´×ÔChinaUnix²©¿Í£¬Èç¹û²é¿´Ô­ÎÄÇëµã£º
ht


Ïà¹ØÎĵµ£º

¶Ô±È£ºLinuxºÍWindowsϵͳÏ̼߳äµÄÇø±ð


¶Ô±È£ºLinuxºÍWindowsϵͳÏ̼߳äµÄÇø±ð
ÊìϤWIN32±à³ÌµÄÈËÒ»¶¨ÖªµÀ£¬WIN32µÄ½ø³Ì¹ÜÀí·½Ê½ÓëLinuxÉÏÓÐןܴóÇø±ð£¬ÔÚUNIXÀֻÓнø³ÌµÄ¸ÅÄµ«ÔÚWIN32ÀïÈ´»¹ÓÐÒ»¸ö"Ïß³Ì"µÄ¸ÅÄÄÇôLinuxºÍWIN32ÔÚÕâÀ﾿¾¹ÓÐ×ÅʲôÇø±ðÄØ£¿
 
WIN32ÀïµÄ½ø³Ì/Ïß³ÌÊǼ̳Ð×ÔOS/2µÄ¡£ÔÚWIN32À"½ø³Ì"ÊÇÖ¸Ò»¸ö³ÌÐò£¬¶ø"Ïß³Ì"ÊÇÒ ......

[ת]Ïê½âLinux 2.6ÄÚºËÐÂÎļþϵͳ±ä»¯»úÖÆ£¨inotify£©

Ô­ÎĵØÖ·£ºhttp://soft.yesky.com/os/lin/326/2237826.shtml
±¾ÎÄÏêϸµØ½éÉÜÁËÔÚ Linux 2.6.13 ÄÚºËÖÐÐÂÒýÈëµÄÎļþϵͳ±ä»¯Í¨Öª»úÖÆ inotify£¬²¢¾ÙÀý˵Ã÷ÁËËüµÄʹÓÃÓëµäÐÍÓ¦Óð¸Àý¡£
Ò»¡¢ÒýÑÔ
ÖÚËùÖÜÖª£¬Linux ×ÀÃæϵͳÓë MAC »ò Windows Ïà±ÈÓÐÐí¶à²»ÈçÈËÒâµÄµØ·½£¬ÎªÁ˸ÄÉÆÕâÖÖ×´¿ö£¬¿ªÔ´ÉçÇøÌá³öÓû§Ì¬ÐèÒªÄÚºËÌṩ ......

LinuxÏÂÓÃeclipseдC/C++ÓïÑÔ³ÌÐòµÄ±àÒëÎÊÌâ

µ±Òª½¨Á¢Ï̵߳Èʱ£¬ÔÚLinuxÏ£¬ÓÃÎı¾±à¼­£¬ÔÚ¼üÈë“g++ -lpthread”.......“¿ÉÒÔ°Ñ¿âpthreadÒýÈ딣¬±àÒëͨ¹ý¡£ÏÖÔÚÏëÓÃeclipse£¬µ«ÊÇĬÈÏÇé¿öÏ£¬ÒýÈë²»ÁËpthread¡£»á±¨“undefined reference to phread_create”µÈ´íÎó¡£
½â¾ö·½·¨£º¿ÉÒÔÔÚprojectÖкõ½properties
ÔÚÀïÃæµÄ&ldquo ......

linuxÖÐÏÔʾÖÐÎÄÂÒÂëµÄÎÊÌâ

ÓÉÓÚÔÚwindowsÏÂĬÈÏÊÇgb±àÂ룬¶øÎÒµÄvimĬÈÏÊÇutf-8£¨geditĬÈÏÒ²ÊÇutf-8£©£¬ËùÒÔ´ò¿ª»á³ÉÂÒÂë¡£ÐÞ¸ÄÁËÒ»ÏÂÅäÖÃÎļþ£¬
ʹvi
Ö§³Ögb±àÂë¾ÍºÃÁË¡£
$vi
 ~/.vimrc
let
&termencoding=&encoding
set fileencodings=utf-8,gbk
$:wq
ÔÙ
´Î´ò¿ªvi
£¬ÏÔʾ¾ÍÕý³£ÁË¡£
Èç¹ûÄãÐèÒªÔÚlinuxÏÂÃæÓõ½windowsÏ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ