Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB
ÈÈÃűêÇ©£º c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 ×îÐÂÎÄÕ : linux

ºìñЯÊÖ»ªÇåÔ¶¼û¹²½¨¹úÄÚLinux¿ª·¢È˲ÅÅàÑø±ê×¼

 
À´Ô´£º»ªÇåÔ¶¼ûǶÈëʽѧԺ    
ºìñ¹«Ë¾´óÖлªÇøÅàѵ·þÎñ×ܼà»Æ½¨Ò«Ó뻪ÇåÔ¶¼û½ÌÓý¼¯ÍÅ×ܲü¾¾Ã·å¹²Í¬ÇìºØºÏ×÷³É¹¦
2010Äê5ÔÂ18ÈÕ£¬»ªÇåÔ¶¼û½ÌÓý¼¯ÍÅÓëºìñ´óÖлªÇø¹ØÓÚLinux¿ª·¢È˲ÅÅàÑøµÄºÏ×÷Ç©Ô¼ÒÇʽÔÚ±±¾©ÊÀ¼Í²Æ¸»ÖÐÐĺìñ¹«Ë¾×ܲ¿Õýʽ¾ÙÐУ¬ºìñ´óÖлªÇøÅàѵ·þÎñ×ܼà»Æ½¨Ò«¡¢»ªÇåÔ¶¼û½ÌÓý¼¯ÍÅ×ܲü¾¾Ã·å¡¢ºìñ´óÖлªÇøÇþµÀ¾­ÀíÀî»ÝÃô¼°»ªÇåÔ¶¼û½ÌÓý¼¯ÍŸ±×ܲüÖÑà·ãµÈ¹²Í¬³öϯÁ˱¾´ÎÇ©Ô¼ÒÇʽ¡£
ºìñ¹«Ë¾´óÖлªÇøÅàѵ·þÎñ×ܼà»Æ½¨Ò«½éÉÜ˵£º“ÔÚµ÷ÑкÍÉó²é¹ý´óÁ¿Åàѵ»ú¹¹Ö®ºó£¬ºìñÈÏΪ»ªÇåÔ¶¼ûÔÚLinux¿ª·¢ÁìÓò£¬ÌرðÊÇÔÚǶÈëʽרҵÁìÓòµÄ»îÔ¾³Ì¶ÈºÍ½ÌѧÖÊÁ¿¶¼·ûºÏÆÚÐí£¬ÊÇÎÒÃÇÍƹãºìñLinux¿ª·¢ÅàѵÏîÄ¿·Ç³£ÓÅÐãµÄºÏ×÷»ï°é£¬ÕâÒ²ÊǺìñ¹«Ë¾ÔÚLinux¿ª·¢ÅàѵÁìÓòÄڵĵÚÒ»¼ÒÕ½ÂÔºÏ×÷»ï°é¡£ºìñ»á´Ó¿Î³ÌÑз¢¡¢½Ì²Ä±àд¡¢Ê¦×ÊÅàÑø¡¢½ÌÓýÖÊÁ¿¿¼ºËµÈ¸÷¸ö·½ÃæÈ«Á¦Ö§³Ö»ªÇåÔ¶¼ûÔÚLinux¿ª·¢È˲ŷ½ÃæµÄÅàѵ¡£Ä¿Ç°ºìñÕýÓ뻪ÇåÔ¶¼ûÒ»ÆðÑо¿¿Æѧ¶øʵÓõÄLinux¿ª·¢È˲ÅÅàÑøÌåϵºÍÈÏÖ¤±ê×¼£¬°üÀ¨LinuxÓ¦Óÿª·¢¡¢Äں˿ª·¢ºÍÉ豸Çý¶¯¿ª·¢£¬ÒÔ´ïµ½½øÒ»²½¹æ·¶ÔÚÕâһרҵÁìÓòÄÚÅàѵ±ê×¼µÄÄ¿µÄ£¬Ê¹µÃ¹ã´óѧϰÕßÊÜÒæ¡£”
×÷ΪȫÇò¿ªÔ´½â¾ö·½°¸µÄÁì ......

Linux Makefile½éÉÜʹÓõĻ·¾³ÉîÈëdz³ö

Linux MakefileÒѱ»¹ã·ºÓ¦Óõ«ÊÇÒ²ÔÚ²»¶ÏµÄ¸üУ¬ÕâÀï½éÉÜLinux Makefile°²×°ÉèÖÃʹÓ㬰ïÖú´ó¼Ò°²×°¸üÐÂLinux Makefileϵͳ¡£×÷ΪLinuxϵijÌÐò¿ª·¢ÈËÔ±£¬´ó¼ÒÒ»¶¨¶¼Óöµ½¹ýLinux Makefile£¬ÓÃmakeÃüÁîÀ´±àÒë×Ô¼ºÐ´µÄ³ÌÐòȷʵÊǺܷ½±ã¡£Ò»°ãÇé¿öÏ£¬´ó¼Ò¶¼ÊÇÊÖ¹¤Ð´Ò»¸ö¼òµ¥Linux Makefile£¬Èç¹ûÒªÏëд³öÒ»¸ö·ûºÏ×ÔÓÉÈí¼þ¹ßÀýµÄLinux Makefile¾Í²»ÄÇôÈÝÒ×ÁË¡£
ÔÚ±¾ÎÄÖУ¬½«¸ø´ó¼Ò½éÉÜÈçºÎʹÓÃautoconfºÍautomakeÁ½¸ö¹¤¾ßÀ´°ïÖúÎÒÃÇ×Ô¶¯µØÉú³É·ûºÏ×ÔÓÉÈí¼þ¹ßÀýµÄLinux Makefile£¬ÕâÑù¾Í¿ÉÒÔÏó³£¼ûµÄGNU³ÌÐòÒ»Ñù£¬Ö»ÒªÊ¹ÓÓ./configure”£¬“make”£¬“make instal”¾Í¿ÉÒ԰ѳÌÐò°²×°µ½LinuxϵͳÖÐÈ¥ÁË¡£Õ⽫ÌرðÊʺÏÏë×ö¿ª·ÅÔ´´úÂëÈí¼þµÄ³ÌÐò¿ª·¢ÈËÔ±£¬ÓÖ»òÈç¹ûÄãÖ»ÊÇ×Ô¼ºÐ´Ð©Ð¡µÄToy³ÌÐò£¬ÄÇôÕâ¸öÎÄÕ¶ÔÄãÒ²»áÓкܴóµÄ°ïÖú¡£
Ò»¡¢Linux Makefile½éÉÜ
Linux MakefileÊÇÓÃÓÚ×Ô¶¯±àÒëºÍÁ´½ÓµÄ£¬Ò»¸ö¹¤³ÌÓкܶàÎļþ×é³É£¬Ã¿Ò»¸öÎļþµÄ¸Ä±ä¶¼»áµ¼Ö¹¤³ÌµÄÖØÐÂÁ´½Ó£¬µ«ÊDz»ÊÇËùÓеÄÎļþ¶¼ÐèÒªÖØбàÒ룬Linux MakefileÖмͼÓÐÎļþµÄÐÅÏ¢£¬ÔÚmakeʱ»á¾ö¶¨ÔÚÁ´½ÓµÄʱºòÐèÒªÖØбàÒëÄÄЩÎļþ¡£
Linux MakefileµÄ×ÚÖ¼¾ÍÊÇ£ºÈñàÒëÆ÷ÖªµÀÒª±àÒëÒ»¸ ......

LINUX ¿â×ÊÁÏ´óÈ«

¾­¹ý³¤Ê±¼äѧϰlinux¿âÎļþµÄ¸ÅÄ½ñÌìС±àÒ²¸ø´ó¼ÒËѼ¯Á˹ØÓÚ¿âµÄ¸ÅÄîÒÔ¼°×÷Óã¬Ï£Íû´ó¼Ò¿´ºó»áÓкܶàÊÕ»ñ¡£
1.ʲôÊÇlinux¿â
ÔÚwindowsƽ̨ºÍlinuxƽ̨϶¼´óÁ¿´æÔÚ×Å¿â¡£±¾ÖÊÉÏÀ´Ëµ¿âÊÇÒ»ÖÖ¿ÉÖ´ÐдúÂëµÄ¶þ½øÖÆÐÎʽ£¬¿ÉÒÔ±»²Ù×÷ϵͳÔØÈëÄÚ´æÖ´ÐС£ÓÉÓÚwindowsºÍlinuxµÄ±¾Öʲ»Í¬£¬Òò´Ë¶þÕß¿âµÄ¶þ½øÖÆÊDz»¼æÈݵġ£±¾ÎĽöÏÞÓÚ½éÉÜlinuxϵĿ⡣
2.linux¿âµÄÖÖÀà
linux¿âÓÐÁ½ÖÖ£º¾²Ì¬¿âºÍ¹²Ïí¿â¡£¶þÕߵIJ»Í¬µãÔÚÓÚ´úÂë±»ÔØÈëµÄʱ¿Ì²»Í¬¡£¾²Ì¬¿âµÄ´úÂëÔÚ±àÒë¹ý³ÌÖÐÒѾ­±»ÔØÈë¿ÉÖ´ÐгÌÐò£¬Òò´ËÌå»ý½Ï´ó¡£¹²Ïí¿âµÄ´úÂëÊÇÔÚ¿ÉÖ´ÐгÌÐòÔËÐÐʱ²ÅÔØÈëÄÚ´æµÄ£¬ÔÚ±àÒë¹ý³ÌÖнö¼òµ¥µÄÒýÓã¬Òò´Ë´úÂëÌå»ý½ÏС¡£
3.¿â´æÔÚµÄÒâÒå
¿âÊDZðÈËдºÃµÄÏÖÓеģ¬³ÉÊìµÄ£¬¿ÉÒÔ¸´ÓõĴúÂ룬Äã¿ÉÒÔʹÓõ«Òª¼ÇµÃ×ñÊØÐí¿ÉЭÒé¡£ÏÖʵÖÐÿ¸ö³ÌÐò¶¼ÒªÒÀÀµºÜ¶à»ù´¡µÄµ×²ã¿â£¬²»¿ÉÄÜÿ¸öÈ˵ĴúÂ붼´ÓÁ㿪ʼ£¬Òò´Ë¿âµÄ´æÔÚÒâÒå·ÇͬѰ³£¡£¹²Ïí¿âµÄºÃ´¦ÊÇ£¬²»Í¬µÄÓ¦ÓóÌÐòÈç¹ûµ÷ÓÃÏàͬµÄ¿â£¬ÄÇôÔÚÄÚ´æÀïÖ»ÐèÒªÓÐÒ»·Ý¸Ã¹²Ïí¿âµÄʵÀý¡£
4.¿âÎļþÊÇÈçºÎ²úÉúµÄÔÚlinuxÏÂ
¾²Ì¬¿âµÄºó׺ÊÇ.a£¬ËüµÄ²úÉú·ÖÁ½²½
Step 1.ÓÉÔ´Îļþ±àÒëÉú³ÉÒ»¶Ñ.o£¬Ã¿¸ö.oÀﶼ°üº¬Õâ¸ö±àÒëµ¥ÔªµÄ·ûºÅ±í
Step 2.arÃüÁºÜ¶à.oת»»³É ......

LinuxÏÂselectµÄʹÓÃС¼Ç

½ñÌìʹÓÃselect±à³Ì£¬ÎÊÌâºÜ¶à£¬ÒÔÇ°ÕæµÄûÓÐ×ÐϸÑо¿¹ý¡£
³öÏÖÁËÒÔϼ¸¸öÎÊÌâ
1 recvfromÔÚ½ÓÊÕʱ£¬Ìṩ¸øϵͳµ÷ÓõÄ×îºóÒ»¸ö²ÎÊý£¬¿Í»§¶ËµÄµØÖ·½á¹¹£¬Æ䳤¶È±ØÐë½øÐгõʼ»¯£¬Èç¹ûΪ0£¬Ôò²»ÄܽÓÊÕÊý¾Ý¡£
2 selectµÄµÚÒ»¸ö²ÎÊýΪËùÓмàÊÓµÄÎļþÃèÊö·ûµÄ×î´óÖµ+1£¬¶ø²»ÊǼàÊÓµÄÎļþÃèÊö·û¸öÊý+1¡£
3 ²»Òª¼àÊÓÄÇЩ¾­³£¿ÉÓõÄÎļþÃèÊö·û£¬Èç¹ûÕâÑù×ö£¬select»áÒ»Ö±·µ»Ø¡£
4 ÔÚselect·µ»Øºó£¬Èç¹û¼àÊÓµÄÎļþÃèÊö·ûûÓÐ״̬¸Ä±ä£¬ÔòÔÚfd_setÖдËÎļþÃèÊö·û»á±»Çå0£¬Òò´ËÔÚselectµÄÑ­»·ÖУ¬Ã¿´Î½øÈ붼ҪÖØÐÂÉèÖÃÎÒÃÇËù¹Ø×¢µÄÎļþÃèÊö·û¡£
5 Èç¹ûselectʹÓÃÁ˳¬Ê±²Ù×÷£¬Ã¿´Î·µ»Øselect¶¼»áÐ޸ļÆʱÆ÷£¬½«¼ÆʱÆ÷ÉèΪÓàϵÄʱ¼ä£¬Òò´ËÈç¹ûʹÓÃÁ˼ÆʱÆ÷£¬Ã¿´Î½øÈëÑ­»·¶¼ÒªÖØÖüÆʱÆ÷¡£pselectûÓÐÕâ¸ö벡¡£
ÏÂÃæÊÇlinuxϵĻùÓÚselectµÄÒ»¸öUDP·´Éä·þÎñÆ÷µÄʾÀý´úÂ룺
 #include <sys/select.h>
#include <sys/types.h>
#include <sys/time.h>
#include <unistd.h>
#include <stdio.h>
#include <error.h>
#include <stdio.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <stdlib.h> ......

linuxÍøÂçÅäÖõÄÐÞ¸Ä

LINUX--ÐÞ¸ÄIPµØÖ·
A¡¢ÐÞ¸ÄipµØÖ·
¼´Ê±ÉúЧ:
# ifconfig eth0 192.168.0.20 netmask 255.255.255.0
Æô¶¯ÉúЧ:
ÐÞ¸Ä/etc/sysconfig/network-scripts/ifcfg-eth0
B¡¢ÐÞ¸Ädefault gateway
¼´Ê±ÉúЧ:
# route add default gw 192.168.0.254
Æô¶¯ÉúЧ:
ÐÞ¸Ä/etc/sysconfig/network-scripts/ifcfg-eth0
C¡¢ÐÞ¸Ädns
ÐÞ¸Ä/etc/resolv.conf
Ð޸ĺó¿É¼´Ê±ÉúЧ£¬Æô¶¯Í¬ÑùÓÐЧ
D¡¢ÐÞ¸Ähost name
¼´Ê±ÉúЧ:
# hostname fc2
Æô¶¯ÉúЧ:
ÐÞ¸Ä/etc/sysconfig/network ......

LinuxÈñ½ÝÉÏÍø,°²×°¹ý³Ì£º

ÏÂÔØÈñ½ÝÉÏÍø°ü,½âѹ,ÓÐĿ¼: libpcap.so.0.6.2, libstdc++.so.5,compat-libstdc%2B%2B-33_3.2.3-48_i386.deb,xrgsu
1½øÈëruijieĿ¼
sudo cd ./ruijie(½«¸ÃÎļþ¼Ð·ÅÔÚµ±Ç°Óû§Ä¿Â¼ÏÂ)
2¸´ÖÆÎļþ
sudo cp xrgsu /bin
sudo cp libpcap.so.0.6.2 /usr/lib
sudo cp libstdc++.so.5 /usr/lib
find /usr/lib -name "libpcap.so.*"
ÎÒµÄÊÇ°æ±¾ÊÇ9.10·µ»Ø"libpcap.so.1.0.0"ÆäËü°æ±¾¿ÉÄÜ·µ»ØÆäËüÖµ
sudo ln -sv /usr/lib/libpcap.so.1.0.0£¨Äã·µ»ØµÄÖµ£© /usr/lib/libpcap.so.0.6.2
find /usr/lib -name "libstdc++.so.*"
·µ»Ølibstdc++.so.6
sudo ln -sv /usr/lib/libstdc++.so.6£¨Äã·µ»ØµÄÖµ£© /usr/lib/libstdc++.so.5
¸´ÖÆÍêºó½«compat-libstdc%2B%2B-33_3.2.3-48_i386.debË«»÷°²×°
ÔËÐйý³Ì:
½«ipÉèÖóɾ²Ì¬µÄ£¨Äã¿ÉÒÔÔÚwindowsÏÂ,ÔËÐÐcmd,ÊäÈëipconfig /all²é¿´,
È»ºó½«ÏÔʾµÄEthernetÐÅÏ¢£¬ÔÚUbuntuÉϵÄAuto eth0µÄipÉèÖÃÖÐÌîÈë)
sudo ifconfig eth0 172.20.85.206(ÓëÍø¿¨ipµØÖ·Ò»ÖÂ.£©
sudo xrgsu
È»ºó°´ÌáʾÊäÈëÓû§ÃûºÍÃÜÂë
È»ºó»áÓÐÎÊÄãÊÇ·ñʹÓÃDHCP¶¯Ì¬»ñÈ¡ip£¬²»ÄÜÖ±½Ó»Ø³µ£¬Ó¦Ñ¡1£¬¼´Ê¹ÓÃDHCP£¨ÕâÀïÊDz»ÊǺÜÆæ¹ ......
×ܼǼÊý:5772; ×ÜÒ³Êý:962; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [5] [6] [7] [8] 9 [10] [11] [12] [13] [14]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ