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ϵͳÏ̼߳äµÄÇø±ð
ÊìϤWIN32±à³ÌµÄÈËÒ»¶¨ÖªµÀ£¬WIN32µÄ½ø³Ì¹ÜÀí·½Ê½ÓëLinuxÉÏÓÐןܴóÇø±ð£¬ÔÚUNIXÀֻÓнø³ÌµÄ¸ÅÄµ«ÔÚWIN32ÀïÈ´»¹ÓÐÒ»¸ö"Ïß³Ì"µÄ¸ÅÄÄÇôLinuxºÍWIN32ÔÚÕâÀ﾿¾¹ÓÐ×ÅʲôÇø±ðÄØ£¿
WIN32ÀïµÄ½ø³Ì/Ïß³ÌÊǼ̳Ð×ÔOS/2µÄ¡£ÔÚWIN32À"½ø³Ì"ÊÇÖ¸Ò»¸ö³ÌÐò£¬¶ø"Ïß³Ì"ÊÇÒ ......
ÔÎĵØÖ·£ºhttp://soft.yesky.com/os/lin/326/2237826.shtml
±¾ÎÄÏêϸµØ½éÉÜÁËÔÚ Linux 2.6.13 ÄÚºËÖÐÐÂÒýÈëµÄÎļþϵͳ±ä»¯Í¨Öª»úÖÆ inotify£¬²¢¾ÙÀý˵Ã÷ÁËËüµÄʹÓÃÓëµäÐÍÓ¦Óð¸Àý¡£
Ò»¡¢ÒýÑÔ
ÖÚËùÖÜÖª£¬Linux ×ÀÃæϵͳÓë MAC »ò Windows Ïà±ÈÓÐÐí¶à²»ÈçÈËÒâµÄµØ·½£¬ÎªÁ˸ÄÉÆÕâÖÖ×´¿ö£¬¿ªÔ´ÉçÇøÌá³öÓû§Ì¬ÐèÒªÄÚºËÌṩ ......
µ±Òª½¨Á¢Ï̵߳Èʱ£¬ÔÚLinuxÏ£¬ÓÃÎı¾±à¼£¬ÔÚ¼üÈë“g++ -lpthread”.......“¿ÉÒÔ°Ñ¿âpthreadÒýÈ딣¬±àÒëͨ¹ý¡£ÏÖÔÚÏëÓÃeclipse£¬µ«ÊÇĬÈÏÇé¿öÏ£¬ÒýÈë²»ÁËpthread¡£»á±¨“undefined reference to phread_create”µÈ´íÎó¡£
½â¾ö·½·¨£º¿ÉÒÔÔÚprojectÖкõ½properties
ÔÚÀïÃæµÄ&ldquo ......
ÓÉÓÚÔÚwindowsÏÂĬÈÏÊÇgb±àÂ룬¶øÎÒµÄvimĬÈÏÊÇutf-8£¨geditĬÈÏÒ²ÊÇutf-8£©£¬ËùÒÔ´ò¿ª»á³ÉÂÒÂë¡£ÐÞ¸ÄÁËÒ»ÏÂÅäÖÃÎļþ£¬
ʹvi
Ö§³Ögb±àÂë¾ÍºÃÁË¡£
$vi
~/.vimrc
let
&termencoding=&encoding
set fileencodings=utf-8,gbk
$:wq
ÔÙ
´Î´ò¿ªvi
£¬ÏÔʾ¾ÍÕý³£ÁË¡£
Èç¹ûÄãÐèÒªÔÚlinuxÏÂÃæÓõ½windowsÏ ......