Linuxƽ̨É϶¯Ì¬Á´½Ó¿âµÄ´´½¨Óë¼ÓÔØ
ÔÚ¶Ájvm´úÂëʱ£¬Ñ§Ï°Á˶ÁÈ¡¶¯Ì¬Á´½Ó¿âµÄ·½·¨¡£ÏÂÃæ¾Í.soÎļþµÄ´´½¨ºÍ¶ÁÈ¡×öÒ»¸ö¼òµ¥µÄ×ܽᡣ
1.´´½¨.soÎļþ
add.h
#ifndef ADD_H
#define ADD_H
int add(int arg1,int arg2);
#endif
add.c
#include "add.h"
int add(int arg1,int arg2)
{
return arg1 + arg2;
}
±àÒëΪ.oÎļþ:
gcc -fPIC -c add.c
Éú³É¿âÎļþ£º
gcc -shared -Wl,-soname,libadd.so.1 -o libadd.so.1.0 add.o
cp libadd.so.1.0 libadd.so
ÕâÑù¾ÍÉú³ÉÁËlibadd.so¿âÎļþ¡£ÐÞ¸ÄLD_LIBRARY_PATH,½«libadd.so¼ÓÈ뵽·¾¶ÖС£
2.¼ÓÔØ.soÎļþ£¬µ÷Óú¯Êý¡£
dltest.c,²Î¿¼man 3 dlopen °ïÖúÎļþÖеÄÀý×Ó¡£
#include <stdio.h>
#include <stdlib.h>
#include <dlfcn.h>
int main(int argc, char **argv)
{
void *handle;
int (*add)(int,int);
char *error;
handle = dlopen ("libadd.so", RTLD_LAZY);
if (!handle) {
fprintf (stderr, "%s\n", dlerror());
exit(1);
}
dlerror(); /* Clear any existing error */
add = dlsym(handle, "add");
if ((error = dlerror()) != NULL) {
fprintf (stderr, "%s\n", error);
exit(1);
}
printf ("%d\n", add(3,5));
dlclose(handle);
return 0;
}
±àÒ룺
gcc -rdynamic -o dltest dltest.c -ldl
Ö´ÐÐdltestµÃµ½½á¹ûΪ8¡£
Ïà¹ØÎĵµ£º
1. /proc/sys/net/core/rmem_max — ×î´óµÄTCPÊý¾Ý½ÓÊÕ»º³å
2. /proc/sys/net/core/wmem_max — ×î´óµÄTCPÊý¾Ý·¢ËÍ»º³å
3. /proc/sys/net/ipv4/tcp_timestamps — ʱ¼ä´ÁÔÚ(Çë²Î¿¼RFC 1323)TCPµÄ°üÍ·Ôö¼Ó12¸ö×Ö½Ú
4. /proc/sys/net/ipv4/tcp_sack — ÓÐÑ¡ÔñµÄÓ¦´ð
5. /proc/sys/net/ipv4/tcp_windo ......
Linuxϵͳ³öÏÖÎÊÌâʱ£¬ÎÒÃDz»½öÐèÒª²é¿´ÏµÍ³ÈÕÖ¾ÐÅÏ¢£¬¶øÇÒ»¹ÒªÊ¹ÓôóÁ¿µÄÐÔÄܼà²â¹¤¾ßÀ´ÅжϾ¿¾¹ÊÇÄÄÒ»²¿·Ö£¨ÄÚ´æ¡¢CPU¡¢Ó²ÅÌ……£©³öÁËÎÊÌâ¡£ÔÚLinuxϵͳÖУ¬ËùÓеÄÔËÐвÎÊý±£´æÔÚÐéÄâĿ¼/procÖУ¬»»¾ä»°Ëµ£¬ÎÒÃÇʹÓõÄÐÔÄÜ¼à¿Ø¹¤¾ßÈ¡µ½µÄÊý¾Ýֵʵ¼ÊÉϾÍÊÇÔ´×ÔÓÚÕâ¸öĿ¼£¬µ±Éæ¼°µ½ÏµÍ³¸ß¹Àʱ£¬ÎÒÃǾͿÉÒÔÐÞ ......
DNSÅäÖôíÎó
´íÎó1
dns_master_load: *:2: unexpected end of line
´íÎó2
>linux.zzw.com
* Server: 127.0.0.1 *
* Address: 127.0.0.1#53 *
* *
*** server can't find linux.zzw.com: SERVFAIL *
linuxÏ´íÎó²é¿´ /var/log/messages
¸ÃÎļþÏÂÓÐservice named restart µÄÆô¶¯ÈÕÖ¾
µ±¸Ã·þÎñÆô¶¯Ê±£¬¹ý³ÌÈçÏ ......
´´½¨Ê±¼ä£º2010-01-27
×÷ÕߣºSteven Yang
E-mail£ºmqyoung@gmail.com
ΪÁ˸ßЧµÄ¶Ôkernel½øÐе÷ÊÔ£¬×÷ÕßÔÚʵÑéÊÒÀûÓÃÒÑÓеÄ×ÊÔ´½øÐл·¾³ÅäÖá£Ê×ÏÈÊÇÓ²¼þ»·¾³£¬ÎÒÓÐÁ½¸öPC£¬
Ò»¸öÊÇP III£¬Debian£¨Target£©
Ò»¸öÊÇAMD 64£¬Ubuntu£¨Developer£©
Ҫͨ¹ýDeveloperµ÷ÊÔTarget£ ......
½âѹÃüÁî´óÈ«
gz
½âѹ1£ºgunzip FileName.gz
½âѹ2£ºgzip -d FileName.gz
ѹËõ£ºgzip FileName
.tar.gz
½âѹ£ºtar zxvf FileName.tar.gz
ѹËõ£ºtar zcvf FileName.tar.gz DirName
---------------------------------------------
.bz2
½âѹ1£ºbzip2 -d Fi ......