LinuxÄÚºË2.6.14Ô´Âë·ÖÎö
LinuxÄÚºËÔ´Âë·ÖÎö-Á´±í´úÂë·ÖÎö
·ÖÎöÈË£ºÓàÐñ
·ÖÎöʱ¼ä£º2005Äê11ÔÂ17ÈÕÐÇÆÚËÄ 11:40:10 AM
Óê ζȣº10-11¶È
±àºÅ£º1-4 Àà±ð£º×¼±¸¹¤×÷
Email£ºyuxu9710108@163.com
ʱ´ú±³¾°£º¿ªÊ¼ÔÚwww.linuxforum.net LinuxÄں˼¼ÊõÂÛ̳ÉÏÃæ·¢Ìù£¬ÔÚÍøÓѵİïæÏ£¬
½â¾öÁËһЩÎÊÌâ¡£
°æȨÉùÃ÷£º°æȨ±£Áô¡£±¾ÎÄÓÃ×÷ÆäËûÓÃ;µ±¾×÷Õß±¾ÈËͬÒâ,תÔØÇë×¢Ã÷×÷ÕßÐÕÃû
All Rights Reserved. If for other use,must Agreed By the writer.Citing this
text,please claim the writer's name.
Copyright (C) 2005 YuXu
**************************************************
-------------Ë«ÏòÑ»·Á´±í---------------------------
À´Ô´ÓÚ£ºlist.h
Éè¼Æ˼Ï룺¾¡¿ÉÄܵĴúÂëÖØÓ㬻¯´ó¶ÑµÄÁ´±íÉè¼ÆΪµ¥¸öÁ´±í¡£
Á´±íµÄ¹¹Ô죺Èç¹ûÐèÒª¹¹ÔìijÀà¶ÔÏóµÄÌض¨ÁÐ±í£¬ÔòÔÚÆä½á¹¹Öж¨ÒåÒ»¸öÀàÐÍΪlist_
headÖ¸ÕëµÄ³ÉÔ±£¬Í¨¹ýÕâ¸ö³ÉÔ±½«ÕâÀà¶ÔÏóÁ¬½ÓÆðÀ´£¬ÐγÉËùÐèÁÐ±í£¬²¢Í¨¹ýͨÓÃÁ´±íº¯
Êý¶ÔÆä½øÐвÙ×÷¡£ÆäÓŵãÊÇÖ»Ðè±àдͨÓÃÁ´±íº¯Êý£¬¼´¿É¹¹ÔìºÍ²Ù×÷²»Í¬¶ÔÏóµÄÁÐ±í£¬¶ø
ÎÞÐèΪÿÀà¶ÔÏóµÄÿÖÖÁбí±àдרÓú¯Êý£¬ÊµÏÖÁË´úÂëµÄÖØÓá£
Èç¹ûÏë¶ÔijÖÖÀàÐÍ´´½¨Á´±í£¬¾Í°ÑÒ»¸ölist_headÀàÐ͵ıäÁ¿Ç¶Èëµ½¸ÃÀàÐÍÖУ¬ÓÃlist_
headÖеijÉÔ±ºÍÏà¶ÔÓ¦µÄ´¦Àíº¯ÊýÀ´¶ÔÁ´±í½øÐбéÀú¡£Èç¹ûÏëµÃµ½ÏàÓ¦µÄ½á¹¹µÄÖ¸Õ룬ʹ
ÓÃlist_entry¿ÉÒÔËã³öÀ´¡£
-------------·ÀÖ¹Öظ´°üº¬Í¬Ò»¸öÍ·Îļþ---------------
#ifndef _LINUX_LIST_H
#define _LINUX_LIST_H
...
#endif
ÓÃÓÚ·ÀÖ¹Öظ´°üº¬Í¬Ò»¸ölist.hÍ·Îļþ
-----------struct list_head{}¼°³õʼ»¯ºê---------
struct list_head
{
struct list_head *next, *prev;
};
list_head´Ó×ÖÃæÉÏÀí½â£¬ºÃÏñÊÇÍ·½áµãµÄÒâ˼¡£µ«´ÓÕâÀïµÄ´úÂëÀ´¿´È´ÊÇÆÕͨ½áµãµÄ½á¹¹
Ìå¡£ÔÚºóÃæµÄ´úÂëÖн«list_headµ±³ÉÆÕͨµÄ½áµãÀ´´¦Àí¡£
--LIST_HEAD_INIT()--LIST_HEAD()--INIT_LIST_HEAD()------
#define LIST_HEAD_INIT(name) { &(name), &(name) }
#define LIST_HEAD(name) \
struct list_head name = LIST_HEAD_INIT(name)
·ÖÎö£ºnameµ±Îª½á¹¹Ìåstruct list_head{}µÄÒ»¸ö½á¹¹Ìå±äÁ¿£¬&(name)Ϊ¸Ã½á¹¹Ìå±äÁ¿µÄ
µØÖ·¡£ÓÃname½á¹¹Ìå±äÁ¿µÄʼµØÖ·½«¸Ã½á¹¹Ìå±äÁ¿½øÐгõʼ»¯¡£
#define INIT_LIST_HEAD(ptr) do { \
(ptr)->next = (ptr); (ptr)->prev = (ptr); \
} while (0)
1.ptrΪһ¸ö½á¹¹ÌåµÄÖ¸Õ룬¶ønameΪһ¸ö½á¹¹Ìå±ä
Ïà¹ØÎĵµ£º
°²×°mysql
sudo apt-get install mysql-servel-5.0 mysql-client-5.0
ÏÂÔØ°²×°¹ý³ÌÖУ¬»áÌáʾÊäÈërootÃÜÂë
°²×°CÓïÑÔ±à³Ì½Ó¿Ú£º
sudo apt-get install libmysqlclient15-dev
¸ü¶àapi ²é¿´£ºhttp://dev.mysql.com/doc/refman/5.0/en/c.html
Ïà¹ØmysqlÍ·ÎļþºÍ¿âÎļþ°²×°ÔÚ/usr/include/mysql/ºÍ/usr/lib/mysqlÄ¿ ......
Æô¶¯mysql: /etc/rc.d/init.d/mysql start
ÐÞ¸ÄÃÜÂë: ¸ñʽ£ºmysqladmin -uÓû§Ãû -p¾ÉÃÜÂë password ÐÂÃÜÂë
ʹÓÃÃÜÂëµÇ¼: mysql -u root -p
ÏÔʾÊý¾Ý¿â: show databases;
Ñ¡ÔñÊý¾Ý¿â: use Êý¾Ý¿âÃû;
ÏÔʾ±í: show tables;
ÏÔʾ±í½á¹¹: descibe ±íÃû;
Ô¶³ÌµÇ¼mysqlÐèÒª¿ªÆôÈ ......
×¼±¸¹¤×÷:
¡¡¡¡Óõ½µÄperl À©Õ¹×é¼þ(modules)ÔÚÉÏƪÌù³ö.( win32::odbc Ä£¿é
)ÏÂÔØ×é¼þºó°´ÕÕReadmeÎļþ°²×°µ¹ÏìӦĿ¼.ÅäÖúÃÏàÓ¦µÄodbcÊý¾ÝÔ´.
¡¡¡¡
¡¡¡¡³ÌÐòʵÏÖ:
¡¡¡¡Ê¹ÓÃ
¡¡¡¡use
Win32::ODBC;
¡¡¡¡
¡¡¡¡Óï¾ä°üº¬Ó¦Ê¹ÓõÄÄ£¿éÊÇwin32::odbc,д³öÊý¾Ý¿â
Á¬½Ó×Ö·û´®
¡¡¡¡
¡¡¡¡$DSN = "DSN =
My DSN ......
±¾È˳õѧlinux£¬ÔÚÁìµ¼¶½´ÙºÍ¹¤×÷ѹÁ¦Ï£¬°´ÕÕÇ°È˲¿ÊðÊÖ²áºÍÇ¿´óËÑË÷ÒýÇæ°ïÖúÏ£¬ÓÃlvsºÍmonʵÏÖµÄnat¸ºÔؾùºâ£¬vsÊÇsuse 10.2£¬realserverÊÇwindows2003µÄIIS²¿Êð¡£
1 °²×°
1.1 ÍøÂçÍØÆËͼ
1.1 ¼ì²éÄÚºËÊÇ·ñÖ§³ÖlvsÑ¡Ïî
&nbs ......
Linux
ÏÂͨÓÃÏ̳߳صĴ´½¨ÓëʹÓÃ
±¾
Îĸø³öÁËÒ»¸öͨÓõÄÏ̳߳ؿò¼Ü£¬¸Ã¿ò¼Ü½«ÓëÏß³ÌÖ´ÐÐÏà¹ØµÄÈÎÎñ½øÐÐÁ˸߲ã´ÎµÄ³éÏó£¬Ê¹Ö®Óë¾ßÌåµÄÖ´ÐÐÈÎÎñÎ޹ء£ÁíÍâ¸ÃÏ̳߳ؾßÓж¯Ì¬ÉìËõÐÔ£¬ËüÄܸù¾ÝÖ´ÐÐ
ÈÎÎñµÄÇáÖØ×Ô¶¯µ÷ÕûÏ̳߳ØÖÐÏ̵߳ÄÊýÁ¿¡£ÎÄÕµÄ×îºó£¬ÎÒÃǸø³öÒ»¸ö¼òµ¥Ê¾Àý³ÌÐò£¬Í¨¹ý¸ÃʾÀý³ÌÐò£¬ÎÒÃǻᷢÏÖ£¬Í¨¹ý¸ÃÏ̳߳ؿ ......