linux ¹²Ïí¿â»ù±¾Ê¹ÓãÛת£Ý
linux ¹²Ïí¿â»ù±¾Ê¹ÓÃ[ת]
xzq200 ·¢±íÓÚ 2007-6-16 11:02:00
0
ÍƼö
1 ´´½¨ºÍʹÓþ²Ì¬¿â
´´½¨Ò»¸ö¾²Ì¬¿âÊÇÏ൱¼òµ¥µÄ¡£Í¨³£Ê¹Óà ar ³ÌÐò°ÑһЩĿ±êÎļþ£¨.o£©×éºÏÔÚÒ»Æð£¬
³ÉΪһ¸öµ¥¶ÀµÄ¿â£¬È»ºóÔËÐÐ ranlib£¬ÒÔ¸ø¿â¼ÓÈëһЩË÷ÒýÐÅÏ¢¡£
2 ´´½¨ºÍʹÓù²Ïí¿â
ÌØÊâµÄ±àÒëºÍÁ¬½ÓÑ¡Ïî
-D_REENTRANT ʹµÃÔ¤´¦ÀíÆ÷·ûºÅ _REENTRANT ±»¶¨Ò壬Õâ¸ö·ûºÅ¼¤»îһЩºêÌØÐÔ¡£
-fPIC Ñ¡Ïî²úÉúλÖöÀÁ¢µÄ´úÂë¡£ÓÉÓÚ¿âÊÇÔÚÔËÐеÄʱºò±»µ÷È룬Òò´ËÕâ¸ö
Ñ¡ÏîÊDZØÐèµÄ£¬ÒòΪÔÚ±àÒëµÄʱºò£¬×°ÈëÄÚ´æµÄµØÖ·»¹²»ÖªµÀ¡£Èç¹û
²»Ê¹ÓÃÕâ¸öÑ¡Ï¿âÎļþ¿ÉÄܲ»»áÕýÈ·ÔËÐС£
-shared Ñ¡Ïî¸æËß±àÒëÆ÷²úÉú¹²Ïí¿â´úÂë¡£
-Wl,-soname -Wl ¸æËß±àÒëÆ÷½«ºóÃæµÄ²ÎÊý´«µÝµ½Á¬½ÓÆ÷¡£¶ø -soname Ö¸¶¨ÁË
¹²Ïí¿âµÄ soname¡£
££ ¿ÉÒÔ°Ñ¿âÎļþ¿½±´µ½ /etc/ld.so.conf ÖÐÁоٳöµÄÈκÎĿ¼ÖУ¬²¢ÒÔ
root Éí·ÝÔËÐÐ ldconfig£»»òÕß
££ ÔËÐÐ export LD_LIBRARY_PATH='pwd'£¬Ëü°Ñµ±Ç°Â·¾¶¼Óµ½¿âËÑË÷·¾¶ÖÐÈ¥¡£
1.7.9 ʹÓø߼¶¹²Ïí¿âÌØÐÔ
1. ldd ¹¤¾ß
ldd ÓÃÀ´ÏÔʾִÐÐÎļþÐèÒªÄÄЩ¹²Ïí¿â, ¹²Ïí¿â×°ÔعÜÀíÆ÷ÔÚÄÄÀïÕÒµ½ÁËÐèÒªµÄ¹²Ïí¿â.
2. soname
¹²Ïí¿âµÄÒ»¸ö·Ç³£ÖØÒªµÄ£¬Ò²ÊǷdz£ÄѵĸÅÄîÊÇ soname——¼òд¹²ÏíÄ¿±êÃû£¨short for shared object name£©¡£ÕâÊÇÒ»¸öΪ¹²Ïí¿â£¨.so£©Îļþ¶øÄÚǶÔÚ¿ØÖÆÊý¾ÝÖеÄÃû×Ö¡£ÈçÇ°ÃæÌáµ½µÄ£¬Ã¿Ò»¸ö³ÌÐò¶¼ÓÐÒ»¸öÐèҪʹÓõĿâµÄÇåµ¥¡£Õâ¸öÇåµ¥µÄÄÚÈÝÊÇһϵÁпâµÄ soname£¬Èçͬ ldd ÏÔʾµÄÄÇÑù£¬¹²Ïí¿â×°ÔØÆ÷±ØÐëÕÒµ½Õâ¸öÇåµ¥¡£
soname µÄ¹Ø¼ü¹¦ÄÜÊÇËüÌṩÁ˼æÈÝÐԵıê×¼¡£µ±ÒªÉý¼¶ÏµÍ³ÖеÄÒ»¸ö¿âʱ£¬²¢ÇÒпâµÄ soname ºÍÀϵĿâµÄ soname Ò»Ñù£¬ÓþɿâÁ¬½ÓÉú³ÉµÄ³ÌÐò£¬Ê¹ÓÃеĿâÒÀÈ»ÄÜÕý³£ÔËÐС£Õâ¸öÌØÐÔʹµÃÔÚ Linux Ï£¬Éý¼¶Ê¹Óù²Ïí¿âµÄ³ÌÐòºÍ¶¨Î»´íÎó±äµÃÊ®·ÖÈÝÒ
Ïà¹ØÎĵµ£º
ÍøÂçÎļþϵͳ£¨NFS£¬Network File System£©ÊÇÒ»ÖÖ½«Ô¶³ÌÖ÷»úÉϵķÖÇø£¨Ä¿Â¼£©¾ÍøÂç¹ÒÔص½±¾µØϵͳµÄÒ»ÖÖ»úÖÆ£¬Í¨¹ý¶ÔÍøÂçÎļþϵͳµÄÖ§³Ö£¬Óû§¿ÉÒÔÔÚ±¾µØϵͳÉÏÏñ²Ù×÷±¾µØ·ÖÇøÒ»ÑùÀ´¶ÔÔ¶³ÌÖ÷»úµÄ¹²Ïí·ÖÇø£¨Ä¿Â¼£©½øÐвÙ×÷¡£
ÔÚǶÈëʽLinux µÄ¿ª·¢¹ý³ÌÖУ¬¿ª·¢ÕßÐèÒªÔÚLinux ·þÎñÆ÷ÉϽøÐÐËùÓеÄÈí¼þ¿ª·¢£¬½»²æ±àÒëºó£¬Í¨Ó ......
Ãû³Æ ĬÈ϶¯×÷ ˵Ã÷
SIGHUP ÖÕÖ¹½ø³Ì ÖÕ¶ËÏß·¹Ò¶Ï
SIGINT ÖÕÖ¹½ø³Ì ÖжϽø³Ì
SIGQUIT ½¨Á¢COREÎļþ ÖÕÖ¹½ø³Ì£¬²¢ÇÒÉú³ÉcoreÎļþ
SIGILL ......
1.1.1 iptablesÔÀí
1.1.2 ÒÔ±¾µØΪԴµÄ°ü·¾¶
Step
Table
Chain
Comment
1
±¾µØ³ÌÐò£¨±ÈÈ磬·þÎñ³ÌÐò»ò¿Í»§³ÌÐò£©
2
·ÓÉÅжϣ¬ÒªÊ¹ÓÃÔ´µØÖ·£¬Íâ³ö½Ó¿Ú£¬»¹ÓÐÆäËûһЩÐÅÏ¢¡£
3
mangle
OUTPUT
ÔÚÕâ¶ù¿ÉÒÔmangle°ü¡£½¨Òé²»ÒªÔÚÕâ¶ù×ö¹ýÂË£¬¿ ......
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
-->
ÔÚ±¾ÎÄÖУ¬Ëùν“
Linux
֮·”ÊÇָͨÏòÍêÃÀ
Linux
×ÀÃæµÄµÀ·¡£Ì¸Æð
Linux
×ÀÃ棬ÓÐÈ˲»Ð¼Ò»¹Ë£¬àÍÖ®ÒԱǡ£Êµ¼ÊÇé¿öÈçºÎ£¿
11
ÔÂ
......
Ò»¡¢Óû§¹ÜÀíÀàÃüÁ
1¡¢Ìí¼ÓÓû§adduser
ÀýÈ磺ÔÚ192.168.20.11ÉÏ´´½¨Óû§yyj,ÊäÈëÈçÏÂÃüÁ
useradd yyj -s /bin/csh -d /home/yyj -m
ÕâÑù´´½¨Íê³ÉÓû§yyj
2¡¢ÉèÖÃÓû§yyjµÄÃÜÂ룺
passwd yyj
ÊäÈë2´Î¿ÚÁ¾ÍÉèÖÃÃÜÂë³É¹¦¡£
3¡¢É¾³ýÓû§yyj
rm -r yyj
¶þ¡¢½âѹÎļþ
³ ......