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

Linux϶¯Ì¬¿âµÄÉú³É¼°Á´½Ó·½·¨(1)

               Linux϶¯Ì¬¿âµÄÉú³É¼°Á´½Ó·½·¨ £¨1£©
      Linux ϶¯Ì¬¿âÎļþµÄÀ©Õ¹ÃûΪ".so"£¨Shared Object£©¡£°´ÕÕÔ¼¶¨£¬ËùÓж¯Ì¬¿âÎļþÃûµÄÐÎʽÊÇlibname.so£¨¿ÉÄÜÔÚÃû×ÖÖмÓÈë°æ±¾ºÅ£©¡£ÕâÑù£¬Ï̺߳¯Êý¿â±»³Æ×÷ libthread.so¡£¾²Ì¬¿âµÄÎļþÃûÐÎʽÊÇlibname.a¡£¹²ÏíarchiveµÄÎļþÃûÐÎʽÊÇlibname.sa¡£¹²ÏíarchiveÖ»ÊÇÒ»ÖÖ¹ý¶ÉÐÎʽ£¬°ïÖúÈËÃÇ´Ó¾²Ì¬¿âת±äµ½¶¯Ì¬¿â¡£ ±¾ÎĽöÒÔ¼òµ¥µÄÀý×Ó½éÉܶ¯Ì¬¿âÎļþµÄÉú³ÉºÍÁ´½Ó·½·¨¡£²Ù×÷ϵͳ£ºVM_Red Hat Linux; GCC°æ±¾£º3.2.2-5.
Ò»¡¢¿âÎļþ¼°²âÊÔÎļþ´úÂë ¿âÎļþ¼°²âÊÔÎļþËùÔÚµÄĿ¼£º/home/myself/libtest/¡£
  1.¿âÎļþÃû£ºmylib.c
  /*lib test */
  #include <stdio.h>
  int my_lib_test (void)
  {
    printf ("\n==lib test!\n");
    return 0;
  }
 2.²âÊÔÎļþÃû£ºtest.c
 #include <stdio.h>
 int main(void)
 {
   my_lib_test();
   return 0;
 }
¶þ¡¢¶¯Ì¬¿âµÄ±àÒë·½·¨
 ±àÒë¿âÎļþmylib.c:
 $gcc -shared -o mylib.so mylib.c
Èç¹û±àÒë³É¹¦£¬»áÔÚµ±Ç°Ä¿Â¼ÏÂÉú³É¶¯Ì¬¿âÎļþ£ºmylib.so¡£
ÆäÖУ¬±àÒëÉú³É¶¯Ì¬¿âµÄÃüÁîΪ£ºgcc (-fpic) -shared -o mylib.so mylib.c -fpic ʹÊä³öµÄ¶ÔÏóÄ£¿éÊÇ°´ÕÕ¿ÉÖض¨Î»µØÖ··½Ê½Éú³ÉµÄ¡£ -sharedÖ¸¶¨°Ñ¶ÔÓ¦µÄÔ´ÎļþÉú³É¶ÔÓ¦µÄ¶¯Ì¬Á´½Ó¿âÎļþ¡£
Èý¡¢¶¯Ì¬¿âµÄ²âÊÔ·½·¨
 ±àÒë²âÊÔÎļþtest.c:
 $ gcc -o test test.c ./mylib.so
³É¹¦±àÒëºó£¬Éú³ÉtestÎļþ£¬ÔËÐÐtest£º $ ./test
  ==lib test!
ÆäÖУ¬gcc -o test test.c ./mylib.soµÄ×îºóÒ»¸ö²ÎÊýÖ¸¶¨ËùÁ´½Ó¿âÎļþµÄÏà¶Ô·¾¶¡££¨Ïà¶Ô·¾¶ºÍ¾ø¶Ô·¾¶Ó¦¸ÃÖªµÀ°É£¿£©
Linux϶¯Ì¬¿âµÄÉú³É¼°Á´½Ó·½·¨ £¨2£©


Ïà¹ØÎĵµ£º

linux϶¨Ê±Æ÷µÄʹÓ㨶þ£©

 
¡¾ÕªÒª¡¿
±¾ÎÄÖ÷Òª½éÉÜÁËlinuxµÄʱ¼äºÍ¶¨Ê±Æ÷¡£
¡¾¹Ø¼ü´Ê¡¿
Linux ¶¨Ê±Æ÷ ʱ¼ä
Ò»¡¢ÎÊÌâµÄÌá³ö
ÎÒÃÇ¿ª·¢³ÌÐòʱ£¬¾­³£»áÓöµ½Ê±¼äºÍ¶¨Ê±Æ÷µÄÎÊÌ⣬ΪÁ˸üºÃµÄʹÓÃʱ¼äºÍ¶¨Ê±Æ÷£¬ÏÖÔÚÁоÙÒ»¸öһЩʱ¼ä½á¹¹Ìå¡¢º¯ÊýºÍ¶¨Ê±Æ÷¡£
¶þ¡¢½â¾ö˼·
1.ʱ¼äÀàÐÍ
1) time_tÊÇÒ»¸ö³¤ÕûÐÍ£¬Ò»°ãÓÃÀ´±íʾÓÃ1970ÄêÒÔÀ´µÄÃëÊ ......

Linux·ÀÖ¹ipÊײ¿id×ֶλØÈƵIJßÂÔ

 IPÊײ¿µÄid×Ö¶ÎÓÃÀ´±êʶ²»Í¬µÄ·â°ü£¨¶ø²»ÊÇ·ÖƬ£¬Ò»¸ö·â°üµÄËùÓзÖƬӵÓÐÏàͬµÄid£©
Õâ¸ö×Ö¶ÎÖ»Õ¼ÓÃ16룬Òò´ËÔÚÒ»¸ö¿ìËÙµÄÍøÂçÉϺܿì¾Í»á»ØÈÆ£¬ÕâÊǾͿÉÄÜÔì³ÉЭÒéÕ»¶Ôip±¨ÎÄʶ±ð»ìÂÒ¡£
LinuxÄں˲ÉÈ¡Á˲ßÂÔÀ´¼õ»ºÆä»ØÈÆËٶȡ£
²»Ê¹ÓÃÈ«¾ÖµÄid±äÁ¿£¬¶øÊǶÔÿ¸öipʹÓÃÒ»¸öµ¥¶ÀµÄ¼ÆÊýÆ÷À´¼ÆËãÆäid£¬
µ«ÊÇipµØÖ·ÊǺ ......

LinuxÖÐÌí¼Ósudoer

 
ʹÓÃsudo¿ÉÒÔÔÚÒÔ·ÇrootÓû§µÇ¼ʱÁÙʱ»ñµÃrootȨÏÞ£¬²¢Ö´ÐÐÐèÒªµÄÃüÁî¡£
¿ÉÒÔʹÓÃsudoµÄÓû§¿ÉÒÔ½Ð×ösudoer¡£
Ìí¼ÓsudoerµÄ·½·¨£¨¼ÙÉèÄúÒѾ­°²×°sudo£©£º
Ö´ÐÐ
# visudo
»ò
# sudoedit
Ìáʾ£º
ÓÐЩ·¢ÐаæµÄsudoÌṩÁËsudoedit£¬ÓеÄÔòÌṩÁËvisudo£¬¹¦ÄÜÉÏ»ù±¾ÊÇÒ»ÑùµÄ¡£
ÄãÒ²¿ÉÒÔʹÓÃÆäËû±à¼­Æ÷Èçvi½øÐÐ ......

LinuxÏÂÔö¼Ó´ÅÅÌÉ豸µÄ´¦Àí¼Ç¼

--Ê×ÏÈ¿´¿´ÓÐÄÄЩ´ÅÅÌ
 [root@localhost ~]# fdisk -l
--Òª´¦ÀíµÄÊÇsdj£¬Ê¹ÓÃfdisk·ÖÇø
 [root@localhost ~]# fdisk /dev/sdj
The number of cylinders for this disk is set to 13054.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with ......

LinuxÈí¼þ°²×°Ö®RPMµÄ°²×°¼¼ÇÉ£¨×ª£©

 ½ñÌìÔÚ¼Ò°²×°oracle£¬°²×°Ö®Ç°ÒѾ­¼ì²é¹ýһЩ±ØÒªµÄ°ü£¬¶øÇÒÎʹýͬÊ£¬ËµÒѾ­°²×°µÄÕâЩ°üÒѾ­¿ÉÒÔÂú×ãÒªÇóÁË¡£ÓÚÊǺõ¿ªÊ¼oracleµÄ°²×°¡£oracle×Ô¼º½øÐаücheckʱ±¨libaioÕâ¸ö°üûÓУ¬ÓÚÊÇÉÏÍøÕÒÁËÒ»¸örpmµÄ£¬»¹ÊÇsrc.rpmµÄ¡£ÓÉÓÚСµÜ³õÉælinux£¬ºÜ¶àÃüÁ²»ÖªµÀ£¬ËùÒÔÉÏÍøËÑÑ°ÁËһϣ¬·¢ÏÖ´ËÌù¡£×ªÔØ£¬ÒÔ·ÀÍü¼Ç¡£
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ