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

linux ÐÞ¸ÄÖ÷»úÃû

ubuntu: ÐÞ¸ÄΪmaserat1
1) ÐÞ¸Ä /etc/hostname
master1
2£© /etc/hosts
127.0.0.1 localhost.localdomain localhost
172.16.111.102 master1.localdomain master1
172.16.111.103 slaver1.localdomain slaver1
172.16.111.106 slaver2.localdomain slaver2
3£© ÖØÆôÍøÂç
Redhat  ÐÞ¸ÄΪslaver2
1) ÐÞ¸Ä /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
#HOSTNAME=localhost.localdomain
HOSTNAME=slaver2
2£© /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6
172.16.111.102 master1.localdomain master1
172.16.111.103 slaver1.localdomain slaver1
172.16.111.106 slaver2.localdomain slaver2
3£© ÖØÆôÍøÂç


Ïà¹ØÎĵµ£º

linuxÀïÃüÁîpkg config¹¤¾ßµÄʹÓÃ

Ò»¡¢±àÒëºÍÁ¬½Ó
        Ò»°ãÀ´Ëµ£¬Èç¹û¿âµÄÍ·Îļþ²»ÔÚ /usr/include Ŀ¼ÖУ¬ÄÇôÔÚ±àÒëµÄʱºòÐèÒªÓà -I
²ÎÊýÖ¸¶¨Æä·¾¶¡£ÓÉÓÚͬһ¸ö¿âÔÚ²»Í¬ÏµÍ³ÉÏ¿ÉÄÜλÓÚ²»Í¬µÄĿ¼Ï£¬Óû§°²×°¿âµÄʱºòÒ²¿ÉÒÔ½«¿â°²×°ÔÚ²»Í¬µÄĿ¼Ï£¬ËùÒÔ¼´Ê¹Ê¹ÓÃͬһ¸ö¿â£¬ÓÉÓÚ¿âµÄ·¾¶µÄ
²»Í¬£¬Ôì³ÉÁËÓà -I ²ÎÊýÖ ......

linuxÏÂCÓïÑÔ¶àÏ̱߳à³ÌʵÀý

ѧ¶«Î÷£¬ÍùÍùʵÀý²ÅÊÇ×îÈÃÈ˸ÐÐËȤµÄ£¬ÀÏÊÇѧ»ù´¡ÀíÂÛ£¬²»¶¯ÊÖ£¬¸Ð¾õûÓгɾ͸У¬ºÇºÇ¡£
   ÏÂÃæÏÈÀ´Ò»¸öʵÀý¡£ÎÒÃÇͨ¹ý´´½¨Á½¸öÏß³ÌÀ´ÊµÏÖ¶ÔÒ»¸öÊýµÄµÝ¼Ó¡£
»òÐíÕâ¸öʵÀýûÓÐʵ¼ÊÔËÓõļÛÖµ£¬µ«ÊÇÉÔ΢¸Ä¶¯Ò»Ï£¬ÎÒÃǾͿÉÒÔÓõ½ÆäËûµØ·½È¥À­¡£
ÏÂÃæÊÇÎÒÃǵĴúÂ룺
/*thread_example.c : c multiple thread p ......

LinuxÖеÄwaitϵͳµ÷ÓÃ

ϵͳÖеĽ©Ê¬½ø³Ì¶¼ÒªÓÉwaitϵͳµ÷ÓÃÀ´»ØÊÕ£¬ÏÂÃæ¾Íͨ¹ýʵս¿´Ò»¿´waitµÄ¾ßÌåÓ÷¨£º
waitµÄº¯ÊýÔ­ÐÍÊÇ£º
#include <sys/types.h> /* ÌṩÀàÐÍpid_tµÄ¶¨Òå */
#include <sys/wait.h>
pid_t wait(int *status);
½ø³ÌÒ»µ©µ÷ÓÃÁËwait£¬¾ÍÁ¢¼´×èÈû×Ô¼º£¬ÓÉwait×Ô¶¯·ÖÎöÊÇ·ñµ±Ç°½ø³ÌµÄij¸ö×Ó½ø³ÌÒѾ­Í˳ö£¬Èç¹ûÈ ......

linux¿ª»ú×Ô¶¯ÔËÐÐÉèÖÃ

ÔÚÍøÉÏ¿´µ½ÓÐÈË×ܽáµÃ²»´í
1£®¿ª»úÆô¶¯Ê±×Ô¶¯ÔËÐгÌÐò 
Linux
¼ÓÔغó, Ëü½«³õʼ»¯Ó²¼þºÍÉ豸Çý¶¯, È»ºóÔËÐеÚÒ»¸ö½ø³Ìinit¡£init¸ù¾ÝÅäÖÃÎļþ¼ÌÐøÒýµ¼¹ý³Ì£¬Æô¶¯ÆäËü½ø³Ì¡£Í¨³£Çé¿öÏ£¬Ð޸ķÅÖÃ
ÔÚ /etc/rc»ò /etc/rc.d »ò /etc/rc?.d Ä¿Â¼ÏµĽű¾Îļþ£¬¿ÉÒÔʹinit×Ô¶¯Æô¶¯Æ ......

ÈÃlinuxÖ§³Ögbk±àÂë


ÍøÉÏ¿´µ½µ½µÄ·½·¨£¬¼Ç¼ÒÔ±¸Óá£
ÔÚÓ¢ÎÄLocaleϵÄUbuntu
ÎÞ·¨Õý³£ÏÔʾXPÏÂGBK±àÂëµÄÖÐÎÄ
±à¼­/etc/environmentÎļþ
Ìí¼ÓLC_CTYPE="zh_CN.GBK"Ò»ÐÐ
ÈçÏÂ:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games"
LANG="en_US.UTF-8"
LANGU ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ