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

linuxÏÂÍø¿¨ÅäÖÃ

linuxϵͳ°²×°Í꣬ÒÔºóͨ¹ýÃüÁîģʽÅäÖÃÍø¿¨IP¡£ÅäÖÃÎļþͨ³£ÊÇ/etc/sysconfig/network-scripts/ifcfg-interface-name
1.ÅäÖÃÍø¿¨IPµØÖ·
vi /etc/sysconfig/network-scripts/ifcfg-eth0 #µÚ¶þ¿éÍø¿¨£ºvi /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth0 #ÎïÀíÉ豸Ãû
IPADDR=192.168.1.10 #IPµØÖ·
NETMASK=255.255.255.0 #ÑÚÂëÖµ
NETWORK=192.168.1.0 #ÍøÂçµØÖ·(¿É²»Òª)
BROADCAST=192.168.1.255 #¹ã²¥µØÖ·£¨¿É²»Òª£©
GATEWAY=192.168.1.1 #Íø¹ØµØÖ·
ONBOOT=yes # [yes|no]£¨Òýµ¼Ê±ÊÇ·ñ¼¤»îÉ豸£©
USERCTL=no #[yes|no]£¨·ÇrootÓû§ÊÇ·ñ¿ÉÒÔ¿ØÖƸÃÉ豸£©
BOOTPROTO=static #[none|static|bootp|dhcp]£¨Òýµ¼Ê±²»Ê¹ÓÃЭÒé|¾²Ì¬·ÖÅä|BOOTPЭÒé|DHCPЭÒ飩
2.ÅäÖÃÍø¿¨DNS
ÅäÖÃÎļþÔÚ/etc/resolv.confÏÂÃæ¡£
vi /etc/resolv.conf
nameserver 202.109.14.5 #Ö÷DNS
nameserver 219.141.136.10 #´ÎDNS
search localdomain
ËùÒÔÍøÂçÅäÖÃÍê³Éºó£¬¶¼ÐèÒªÖØÆôÍøÂç·þÎñ£ºservice network restart »ò/etc/init.d/network restart
3.µ¥Íø¿¨°ó¶¨Á½¸öIP
linuxµÄÍøÂçÉ豸ÅäÖÃÎļþ´æ·ÅÔÚ/etc/sysconfig/network-scriptsÀïÃ棬 ¶ÔÓÚÒÔÌ«ÍøµÄµÚÒ»¸öÍøÂçÉ豸£¬ÅäÖÃÎļþÃûÒ»°ãΪifcfg-eth0¡£Èç¹ûÐèҪΪµÚÒ»¸öÍøÂçÉ豸¶à°ó¶¨Ò»¸öIPµØÖ·£¬Ö»ÐèÒªÔÚ/etc/sysconfig/network-scriptsĿ¼ÀïÃæ´´½¨Ò»¸öÃûΪifcfg-eth0:0µÄÎļþ£¬ÄÚÈÝÑùÀýΪ£º
DEVICE="eth0:0"
IPADDR="211.100.10.119"
NETMASK="255.255.255.0"
ONBOOT="yes"
ÆäÖеÄDEVICEΪÉ豸µÄÃû³Æ£¬IPADDRΪ´ËÉ豸µÄIPµØÖ·£¬NETMASKΪ×ÓÍøÑÚÂ룬ONBOOT ±íʾÔÚϵͳÆô¶¯Ê±×Ô¶¯Æô¶¯¡£
¡¡¡¡Èç¹ûÐèÒªÔٰ󶨶àÒ»¸öIPµØÖ·£¬Ö»ÐèÒª°ÑÎļþÃûºÍÎļþÄÚµÄDEVICEÖеÄeth0¼ÓÒ»¼´¿É¡£LINUX×î¶à¿ÉÒÔÖ§³Ö255¸öIP±ðÃû¡£


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì(Áù) L2CAP±à³ÌʵÀý

ÀýÒ»£º·¢ËÍSignaling Packet£º
Signaling CommandÊÇ2¸öBluetoothʵÌåÖ®¼äµÄL2CAP²ãÃüÁî´«Êä¡£ËùÒÔµÃSignaling CommandʹÓÃCID 0x0001.
¶à¸öCommand¿ÉÒÔÔÚÒ»¸öC-frame£¨control frame£©Öз¢ËÍ¡£
 Èç¹ûÒªÖ±½Ó·¢ËÍSignaling Command.ÐèÒª½¨Á¢SOCK_RAWÀàÐ͵ÄL2CAPÁ¬½ÓSocket¡£ÕâÑù²ÅÓлú»á×Ô¼ºÌî³äCommand Code£¬Identi ......

linux 2.6Ô´´úÂëÇé¾°·ÖÎö±Ê¼ÇÖ®ÖжÏÓëÒì³£3

³õʼ»¯ÖжÏÃèÊö·û±í
ÄÚºËÆôÓÃÖжÏÒÔÇ°£¬±ØÐë°Ñidt±íµÄ³õʼµØÖ·×°µ½idtr¼Ä´æÆ÷£¬²¢³õʼ»¯±íÖеÄÿһÏî¡£ÕâÏ×÷ÊÇÔÚ³õʼ»¯ÏµÍ³Ê±Íê³É¡£
intÖ¸ÁîÔÊÐíÓû§Ì¬½ø³Ì·¢³öÒ»¸öÖжÏÐźţ¬ÆäÖµ¿ÉÒÔÊÇ0-255µÄÈÎÒâÒ»¸öÏòÁ¿¡£Òò´Ë¡£ÎªÁË·ÀÖ¹Óû§Í¨¹ýintÖ¸ÁîÄ£Äâ·Ç·¨µÄÖжϺÍÒì³££¬idtµÄ³õʼ»¯±ØÐë·Ç³£Ð¡ÐÄ¡£Õâ¿ÉÒÔͨ¹ý°ÑÖжϻòÕßÏÝÚåà ......

linuxÀï²é¿´ËùÓÐÓû§ºÍÓû§×é

1¡¢linuxÀï²é¿´ËùÓÐÓû§
£¨1£©ÔÚÖÕ¶ËÀï.ÆäʵֻÐèÒª²é¿´ /etc/passwdÎļþ¾ÍÐÐÁË.
£¨2£©¿´µÚÈý¸ö²ÎÊý:500ÒÔÉϵÄ,¾ÍÊǺóÃ潨µÄÓû§ÁË.ÆäËüÔòΪϵͳµÄÓû§.
»òÕßÓÃcat /etc/passwd |cut -f 1 -d :
2¡¢Óû§¹ÜÀíÃüÁî
useradd ×¢£ºÌí¼ÓÓû§
adduser ×¢£ºÌí¼ÓÓû§
passwd ×¢£ºÎªÓû§ÉèÖÃÃÜÂë
usermod ×¢£ºÐÞ¸ÄÓû§ÃüÁ ......

Linuxϵͳµ÷Óà recv/recvfrom/recvmsgº¯ÊýÏê½â

¡¾recv/recvfrom/recvmsgϵͳµ÷Óá¿ 
¹¦ÄÜÃèÊö£º
´ÓÌ×½Ó×ÖÉϽÓÊÕÒ»¸öÏûÏ¢¡£¶ÔÓÚrecvfrom ºÍ recvmsg£¬¿ÉͬʱӦÓÃÓÚÃæÏòÁ¬½ÓµÄºÍÎÞÁ¬½ÓµÄÌ×½Ó×Ö¡£recvÒ»°ãÖ»ÓÃÔÚÃæÏòÁ¬½ÓµÄÌ×½Ó×Ö£¬¼¸ºõµÈͬÓÚrecvfrom£¬Ö»Òª½«recvfromµÄµÚÎå¸ö²ÎÊýÉèÖÃNULL¡£
Èç¹ûÏûϢ̫´ó£¬ÎÞ·¨ÍêÕû´æ·ÅÔÚËùÌṩµÄ»º³åÇø£¬¸ù¾Ý²»Í¬µÄÌ×½Ó×Ö£¬¶àÓà ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ