Linux Íø¿¨ÅäÖÃÎļþ¼°Ïà¹ØÉèÖÃ
1.ÅäÖÃÎļþ
/etc/hosts(±¾µØÖ÷»úipµØÖ·Ó³Éä,¿ÉÒÔÓжà¸ö±ðÃû£©¡£
/etc/services(¶Ë¿ÚºÅÓë±ê×¼·þÎñÖ®¼äµÄ¶ÔÓ¦¹Øϵ£©¡£
/etc/sysconfig/network£¨ÉèÖÃÖ÷»úÃû£¬Íø¹Ø£¬ÓòÃû£©¡£
HOSTANME=zjw.com(Ö÷»úÃû£©£¨ÐèÒªÖØÆô¼ÆËã»ú²ÅÓÐЧ£©
GATEWAY=192.168.1.1£¨Íø¹Ø£©
/etc/rc.d/init.d/network restart£¨½Å±¾·þÎñÆô¶¯)
service network restart(ͬÉÏ£¬ÊÇÃüÁîÖ´ÐУ©
2.ºÍDNSÏà¹Ø
/etc/host.conf
/etc/nsswitch.conf
/etc/resolv.conf(ÅäÖÃdns)
3.Íø¿¨ÅäÖÃÎļþ
/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0(ÄÄÕÅÍø¿¨£©
ONBOOT=yes
BOOTPROTO=static(¾²Ì¬ip״̬ÉèÖã©
BOOTPROTO=dhcp(dhcp»ñÈ¡£©
IPADDR=192.168.1.8(¾²Ì¬ipµØÖ·)
NETMASK=255.255.255.0
GATEWAY=192.168.1.1£¨Íø¹Ø£©(Èç¹ûÔÚ´ËÉèÖÃÍø¹Ø£¬ÔòÉÏÃæµÄÎÞЧ£©
MACADDR=00:0C:29:96:38:F8£¨ÐÞ¸ÄmacµØÖ·£©(ÓÀ¾ÃÓÐЧ£©
/etc/rc.d/init.d/network restart(½Å±¾Æô¶¯£©
service network restart(ÃüÁîÆô¶¯£©
4.IPÅäÖ÷½·¨¼°×Ô¶¯»ñÈ¡ip
ifconfig eth0 192.168.0.10 ½«²ÉÓÃĬÈÏ×ÓÍøÑÚÂë
ifconfig eth0 192.168.0.10 netmask 255.255.255.252 (ÊÖ¶¯¶¨Òå×ÓÍøÑÚÂë)
ifconfig eth0 up(¼¤»îÍø¿¨£©
/etc/sysconfig/network-scripts/ifup eth0(½Å±¾¼¤»îÍø¿¨£©»òÕß
ifup eth0(Ö¸Ïò/sbin/ifupµÄ·ûºÅÁ´½Ó£©¡£×¢£ºÐÞ¸ÄmacµØÖ·£¬Óô˺ÃÏñÎÞЧ£¬Çмǡ£
ifconfig eth0 down(¹Ø±ÕÍø¿¨£©
/etc/sysconfig/netowrk-scripts/ifdown eth0(½Å±¾¹Ø±ÕÍø¿¨£©»òÕß
ifdown eth0(Ö¸Ïò/sbin/ifdownµÄ·ûºÅÁ´½Ó£©
netconfig
ÊÇÎı¾´°¿ÚµÄÐÎʽÉèÖÃIPµÄÃüÁî,Ð޸ĺÃÖ®ºóÓÃ
service network restart (ÈÃÅäÖòÎÊýÉúЧ)
ifconfig eth0 -dynamic(ÊÖ¶¯ÉèÖûñÈ¡dhcp ipµØÖ·£©
5.ÐÞ¸ÄMACµØÖ·
ifconfig eth0 down
ifconfig eth0 hw ether 00:00:0c:12:34:56
/etc/rd.d/init.d/network(ÉÏÃæµÄÐ޸Ŀɴ洢Ôڴ˽ű¾ÖУ©
ifconfig eth0 up
££ÉÏÃæÕâÖÖ·½·¨ÊÇÔÚÄÚºËÖÐÐ޸ģ¬Ï´οª»ú½«»¹Ô
ÒªÓÀ¾ÃÓÐЧÔÚÍø¿¨ÅäÖÃÎļþÖмÓÈëÒÔÏÂÕâÒ»Ìõ£º
MACADDR=00:00:0c:12:34:56
/etc/sysconfig/network-scripts/ifcfg-eth0
6.³£ÓòâÊÔÃüÁî
ping -c 4 172.16.1.1
route (¶ÔÄں˵Äip·Óɱí½øÐвÙ×÷£¬Ö÷Òª¶Ô¼ºÅäÖõĽӿڵÄÖ÷»ú»òÍøÂçÉèÖþ²Ì¬Â·ÓÉ£¬Èçͨ¹ýifconfig³ÌÐòÅä)
route add -net 192.168.1.0 netmask 255.255.255.0 eth0 (Ìí¼ÓÒ»Ìõµ½192.168.1.0ÍøÂçµÄ·ÓÉÌõÄ¿)
route del -net 192.168.1.0 netmask 255.255.
Ïà¹ØÎĵµ£º
Linuxϵͳ¶¼ÊÇÒÔÎļþµÄÐÎʽÀ´·ÃÎÊÓ²¼þÉ豸µÄ£¬¸÷ÖÖÉ豸ÊÇÒÔϵͳÉ豸ÎļþµÄÐÎʽ´æÔÚÓÚϵͳÉ豸Ŀ¼£¯devÖеġ£ÕâЩÎļþÓÃÓÚ·ÃÎÊϵͳÖÐËùÓв»Í¬ÀàÐ͵ÄÓ²¼þ¡£ÀýÈ磬£¯dev£¯mouseÎļþ¶ÔÓ¦Êó±êÉ豸Îļþ£¬ÓÃÓÚ¶ÁÈ¡Êó±êÊäÈëµÄ£»£¯dev£¯fd0Îļþ¶ÔÓ¦ÈíÇýÉ豸Îļþ£¬ÓÃÓÚ´¦ÀíÈíÅ̶ÁдµÄ£»
LinuxÎļþϵͳÖÐÿ¸öÎļþÓà i½Úµã À´±êʶ£¬¹Ø ......
linuxÊÇÒ»¸ö¸´ÔÓµÄÈí¼þϵͳ£¬ÆäÄÚºËÔ´´úÂëÍùÍù»áÓõ½Ò»Ð©ÔÚÓ¦ÓóÌÐòÉè¼ÆÖв¿³£¼ûÓïÑԳɷֺͱà³Ì¼¼ÇÉ£¬ÕâЩ¶¼ÊÇ·ÖÎöÄÚºËÔ´´úÂëµÄ»ù±¾¹¦£¬Ï£Íû´ó¼ÒÄÜÖصãÕÆÎÕ¡£
Ê×ÏÈ£¬gcc±àÒëÆ÷´ÓÓïÑÔÀïÎüÊÕÁË“inline”ºÍ“const”¡£inlineº¯ÊýµÄ´óÁ¿Ê¹Óã¬ÓÐÀûÓÚÌá¸ßÔËÐ ......
ÔõÑù´´½¨ÕæÕýºÜСµÄLinuxϵÄELF¿ÉÖ´ÐÐÎļþ
תÔØ: ELFÎļþ¸ñʽÑо¿
ÈÕÆÚ: Friday, July 25 @ 14:46:16 CST
Ö÷Ì⣺ Èí¼þ¿ª·¢
·¢ÐÅÈË: someone (++), ÐÅÇø: Linux
±ê Ìâ: ÔõÑù´´½¨ÕæÕýºÜСµÄLinuxϵÄELF¿ÉÖ´ÐÐÎļþ
·¢ÐÅÕ¾: ......
ÒòΪ×Ô¼ºµÄɵ£¬ËùÒÔ²ÅÓеĴËƪÈÕÖ¾¡£Ò²ÐíÓÐÈË¿ÉÒÔ·¢ÏÖ£¬ÔÚÎÒ²©¿ÍÉÏÒѾÓÐƪÃûΪ“LFSÅäÖÃIP¼°°²×°OpenSSH”£¬¶øÔÙдÕâƪÈÕ¼ÇÊÇÒòΪ×Ô¼ºÔÚLinuxÏÂʹÓÃÁ˹âÅÌÀïµÄOpenSSH£¬È»ºó×°ÉϺóʹÓÃ×Ô¼ºÓ²ÅÌÉϵÄSSHʱÀÏÊÇÌáʾÒѾռÓ㬽á¹û·´¸´×°Á˺ü¸±é²ÅÒâʶµ½Õâ¸öÎÊÌ⣡~Õâ¾ÍºÃ±ÈÒ»¸öÈËÆïÔÚÂíÉÏÊýÂíµÄÊýÄ¿Ò»Ñù£¬×ÜÊÇÉÙÒ» ......
ÔÚlinuxµÄÈÕ³£·þÎñÆ÷ά»¤Õ¾µãά»¤ÖУ¬¾³£ÐèÒªÅúÁ¿²Ù×÷Ò»²¿·ÖÎļþ£¬±ÈÈçÊý¾Ý¿âÓû§µÄ×ÊÁϱä¸ü£¬ÄÇôËùÒÔÏà¹ØÕ¾µãµÄÊý¾Ý¿âÅäÖÃÎļþÒªÏàÓ¦µÄÐ޸ġ£´ó¼Ò¶¼ÖªµÀ£¬linuxÏÂÃ漸ºõËùÓеÄÅäÖÃÎļþ¶¼ÊÇ´¿´âµÄÎı¾Îļþ£¬ËùÒÔÕâÆäʵ¾ÍÊÇÒ»¸ö»ù±¾µÄÎı¾²Ù×÷¡£Ò»Ì¨·þÎñÆ÷ÉÏÓÐÉÏ°Ù¸öÉõÖÁÉÏǧ¸öµÄÍøÕ¾¡£Èç¹ûÎÒÃÇÒ»¸ö¸öÀ´Ð޸IJ»ÊDz»¿ÉÒÔ£¬µ« ......