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

RedHat linuxÍøÂçÅäÖÃÎļþÏê½â


ÖØÐÂÆô¶¯ÍøÂçÉèÖãº
£¯sbin/service network restart
ÊÊÓûúÐÍ:
ËùÓзþÎñÆ÷
ÎĵµÄÚÈÝ£º
Òª½¨Á¢Ò»¸öLinux·þÎñÆ÷¾ÍÊ×ÏÈÒªÁ˽âLinux»·¾³ÏºÍÍøÂç·þÎñÏà¹ØµÄÅäÖÃÎļþµÄº¬Òå¼°ÈçºÎ½øÐа²È«µÄÅäÖá£ÔÚLinuxϵͳÖÐ,TCP/IPÍøÂçÊÇͨ¹ýÈô¸É¸öÎı¾Îļþ½øÐÐÅäÖõģ¬Ò²ÐíÄãÐèÒª±à¼­ÕâЩÎļþÀ´Íê³ÉÁªÍø¹¤×÷£¬ÏÂÃæ½éÉܼ¸¸ö»ù±¾µÄTCP/IPÍøÂçÅäÖÃÎļþ¡£
1./etc/sysconfig/network-scripts/ifcfg-<interface-name>Îļþ
ÔÚ
RedHatÖУ¬ÏµÍ³ÍøÂçÉ豸µÄÅäÖÃÎļþ±£´æÔÚ/etc/sysconfig/network-scriptsĿ¼Ï£¬ifcfg-eth0°üº¬µÚÒ»¿éÍø
¿¨µÄÅäÖÃÐÅÏ¢£¬ifcfg-eth1°üº¬µÚ¶þ¿éÍø¿¨µÄÅäÖÃÐÅÏ¢¡£ÔÚÆô¶¯Ê±£¬ÏµÍ³Í¨¹ý¶ÁÈ¡Õâ¸öÅäÖÃÎļþ¾ö¶¨Ä³¸öÍø¿¨ÊÇ·ñÆô¶¯ºÍÈçºÎÅäÖá£
ÏÂÃæÊÇ/etc/sysconfig/network-scripts/ifcfg-eth0ÎļþµÄʾÀý£º
DEVICE=eth0
IPADDR=192.168.0.2
NETMASK=255.255.255.0
BROADCAST=192.168.0.255
ONBOOT=yes
BOOTPROTO=none
GATEWAY£½192.168.0.1
ÈôÏ£ÍûÊÖ¹¤ÐÞ¸ÄÍøÂçµØÖ·»òÔö¼ÓеÄÍøÂçÁ¬½Ó£¬¿ÉÒÔͨ¹ýÐ޸ĶÔÓ¦µÄÎļþifcfg-<interface-name>»ò´´½¨ÐµÄÎļþÀ´ÊµÏÖ¡£
DEVICE=<name>¡¡¡¡¡¡ <name>±íʾÎïÀíÉ豸µÄÃû×Ö
IPADDR=<address>¡¡¡¡¡¡ <address>±íʾ¸³¸ø¸ÃÍø¿¨µÄIPµØÖ·
NETMASK=<mask>¡¡¡¡ <mask>±íʾ×ÓÍøÑÚÂë
BROADCAST=<address>¡¡ <address>±íʾ¹ã²¥µØÖ·
ONBOOT=yes/no¡¡¡¡ Æô¶¯Ê±ÊÇ·ñ¼¤»î¸Ã¿¨
BOOTPROTO=none none£ºÎÞÐëÆô¶¯Ð­Òé
bootp£ºÊ¹ÓÃbootpЭÒé
¡¡¡¡ dhcp£ºÊ¹ÓÃdhcpЭÒé
GATEWAY=<address> <address>±íʾĬÈÏÍø¹Ø
MACADDR=<MAC-address> <MAC-address>±íʾָ¶¨Ò»¸öMACµØÖ·
USERCTL=yes/no¡¡¡¡¡¡¡¡ ÊÇ·ñÔÊÐí·ÇrootÓû§¿ØÖƸÃÉ豸
2./etc/resolv.confÎļþ
Îļþ/etc/resolv.confÅäÖÃDNS¿Í»§¶Ë£¬Ëü°üº¬ÁËDNS·þÎñÆ÷µØÖ·ºÍÓòÃûËÑË÷ÅäÖã¬Ã¿Ò»ÐÐÓ¦°üº¬Ò»¸ö¹Ø¼ü×ÖºÍÒ»¸ö»ò¶à¸öµÄÓÉ¿Õ¸ñ¸ô¿ªµÄ²ÎÊý¡£ÏÂÃæÊÇÒ»¸öÀý×ÓÎļþ£º
search wuxp.com
nameserver 192.168.0.1
nameserver 192.168.0.2
search
wuxp.com:±íʾµ±ÌṩÁËÒ»¸ö²»°üÀ¨ÍêÈ«ÓòÃûµÄÖ÷»úÃûʱ£¬ÔÚ¸ÃÖ÷»úÃûºóÌí¼Ówuxp.comµÄºó׺£»
nameserver:±íʾ½âÎöÓòÃûʱʹÓøõØÖ·Ö¸¶¨µÄÖ÷»úΪÓòÃû·þÎñÆ÷¡£ÆäÖÐÓòÃû·þÎñÆ÷ÊÇ°´ÕÕÎļþÖгöÏÖµÄ˳ÐòÀ´²éѯµÄ¡£Òò´Ë£¬Ó¦¸ÃÊ×Ïȸø³ö×î¿É¿¿µÄ·þ
ÎñÆ÷¡£Ä¿Ç°£¬ÖÁ¶àÖ§³ÖÈý¸öÃû×Ö·þÎñÆ÷¡£
3./etc/sysconfig/networkÎļþ
¸ÃÎļþÓÃÀ´Ö¸¶¨·þÎñÆ÷


Ïà¹ØÎĵµ£º

linux gcc µÄ±àÒë¹ý³Ì Ïê½â

gccµÄ±àÒë¹ý³Ì·ÖΪËIJ½£¬·Ö±ðΪ£º
(1)Ô¤±àÒë (Pre-Processing)
(2)±àÒë (Compiling)
(3)»ã±à (Assembling)
(4)Á´½Ó (Linking)
ÒÔhello.cΪÀý˵Ã÷£º
#include<stdio.h>
int main(void)
{
 printf("Hello World!");
 return 0;
}
(1)Ô¤±àÒë½×¶Î (Pre-Processing)
&nbs ......

ÉîÈëÀí½âLinuxÄÚºËÖеÄÁ´±í

  ×î½ü£¬¿ªÊ¼ÑжÁÒ»ÏÂLinuxµÄÄں˴úÂ룬¸ÕÒ»¿ªÊ¼£¬¾ÍÓÐÁîÈ˾ªÌ¾µÄ·¢ÏÖ£¬²»µÃ²»¸Ð̾Äں˴úÂëÉè¼ÆµÃÖ®ÃÀ£¡µ¥ÊÇ×î³£ÓõÄÁ´±íÒ²Éè¼ÆµÃ²»µÃ²»ÁîÈËÅå·þ£¡
1.1.Á´±ílist_head
    include/linux/list.h
    ºÜ¾­µä£¬Á´±íÔÚÄÚºËÖкܳ£Óã¬ÀýÈç¹ÜÀí½ø³Ì£¬½ø³ÌµÄ¸÷¸ö״̬¶ÓÁж¼ÊÇʹÓÃÕâ¸öË«ÏòÁ ......

²»¿É²»ÖªµÄ Linux Ê®ÏîÖØ´ó·¢Õ¹

Linux®¼¼Êõ¡¢¿ª·¢Ä£ÐͺÍÉçÇø¶¼¶Ô IT Òµ²úÉúÁËÖØÒªµÄÓ°Ï죬ÎÒÃÇÄÜ×öµÄ¾ÍÊÇÕ¾µ½Ò»±ß¿´¿´ÕâЩ£¬ºÜ¸ßÐËÓë developerWorks Ò»Æð¶È¹ýÁ˵ÚÒ»¸ö 10 Äê¡£Linux ÍŶÓÒѾ­½«ÕâЩ¶Ô Linux ²úÉúÖØ´óÓ°ÏìµÄÄÚÈÝÕûÀíµ½Ò»Æð¡£
¹ýÈ¥ 10 ÄêÀLinux ·¢ÉúÁËÌ«¶àµÄÊÂÇ飬ºÜÄÑÍêÕûµØÁгö¸Ã²Ù×÷ϵͳµÄÖØҪʼþºÍ¼¼Êõ¸Ä½ø¡£¾¡¹ÜÈç´Ë£¬ÎªÁËÇì× ......

linux½Å±¾(shell)±à³Ì

http://blog.csdn.net/compiler_hdz/archive/2006/01/10/575113.aspx
ÏÈ¿´Ò»¸ö“hello world!”µÄÀý×Ó£º
 ÔÚij¸öĿ¼ÏÂн¨Ò»¸öÎļþ£¬½Ðhello.sh£¬ÇÃÈëÒÔÏ´úÂ룺
#!/bin/sh
echo "hello world!"
 ºÃ£¬¾ÍÕâЩ¡£±£´æ£¬ÔÚÃüÁîÌáʾ·ûϽøÈë±£´æ“hello.sh”µÄĿ¼£¬ÕâÑùÖ´ÐУº
......

linux systemº¯ÊýʹÓÃÏê½â


Ïà¹Øº¯Êý
fork£¬execve£¬waitpid£¬popen
±íÍ·Îļþ
££i nclude<stdlib.h>
¶¨Ò庯Êý
int system(const char * string);
º¯Êý˵Ã÷
system()»áµ÷ÓÃfork()²úÉú×Ó½ø³Ì£¬ÓÉ×Ó½ø³ÌÀ´µ÷ÓÃ/bin/sh-c stringÀ´Ö´ÐвÎÊýstring×Ö·û´®Ëù´ú±íµÄÃüÁ´ËÃü>ÁîÖ´ÐÐÍêºóËæ¼´·µ»ØÔ­µ÷ÓõĽø³Ì¡£ÔÚµ÷ÓÃsystem()ÆÚ¼äSIGCHLD ÐÅ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ