LinuxÏÂsambaµÄ°²×°ÓëÅäÖÃ
°²×°samba
ÎÄÕÂÖÐÌáµ½µÄsmaba°²×°³ÌÐò samba-3.0.20b-1.i386.rpm (ISO)
1 Ê×ÏÈ£¬ÔÚVMwareÄÚ°Ñsamba°²×°ÎļþµÄ¾µÏñÎļþÓ³ÉäΪ¹âÇý£¬Èçͼ1-1²½Öè1-2-3¡£
ͼ1-1
2 È»ºó£¬Ê¹ÓÃÃüÁîmount /dev/cdrom /mnt/cdrom ×÷ÓÃÊǰѹâÇýÔØÈëµ½Îļþ¼Ð/mnt/cdromÖУ¬Èçͼ1-2¡£
ͼ1-2
´Ëʱ£¬½¨Òé¼ì²éµçÄÔÊÇ·ñÒÑ°²×°ÓÐsambaµÄÆäËû°æ±¾£¬Ê¹ÓÃÃüÁîrqm –qa |grep samba
,Èçͼ1-3Ëùʾ£¨Í¼Ê¾±íʾ¸ÃϵͳÎÞsamba£¬¿É¼ÌÐø²Ù×÷£»ÈçÏÔʾÓÐÆäËû°æ±¾£¬ÐèҪжÔØ¡££©
ͼ1-3
3 ÏÂÃ棬ʹÓÃcd /mnt/cdrom,½øÈëµ½/mnt/cdrom£¬Í¨¹ýÃüÁîls²é¿´£¬Èçͼ1-4
ͼ1-4
´Ëʱ£¬Áгöµ±Ç°Îļþ¼ÐÄÚÈÝ£¬ËµÃ÷ͨ¹ýÃüÁî½øÐа²×°£¬ÔÚÕâÀィÒ齫ÐèÒª°²×°µÄÎļþתÒƵ½ÏµÍ³ÖÐÔÙ°²×°¡£²Ù×÷ÈçÏ£º
Ê×ÏÈ£¬Ê¹ÓÃÃüÁîcp Òƶ¯sambaµ½ÏµÍ³/rootĿ¼£¨Ä¿Â¼ËæÒâÉèÖã©Ï£¬×îºó²é¿´
Èçͼ1-5
ͼ1-5
×¢Ò⣺ϰ¹ßÉÏ£¬ÎÒÃÇ´ËʱӦ¸ÃʹÓÃÃüÁî°Ñ/mnt/cdromĿ¼Óë¹âÇýµÄÁ¬½Ó¶Ï¿ª£¬
ÕâÀïµÄÃüÁîÊÇumount /mnt/cdrom
4 ½ÓÏÂÀ´£¬Ê¹ÓÃÃüÁîrpm –ivh samba-3.0.20b-1.i386.rpm°²×°samba·þÎñ¡£Èçͼ1-6Ëùʾ¡£
ͼ1-6
5 ×îºó£¬Ê¹ÓÃÃüÁî/etc/rc.d/init.d/smb start¿ªÆôsamba·þÎñ£¬ÈçÉÏͼ¿É¼û·þÎñ¿ªÆô³É¹¦£¬ÕâÑùsamba¾Í°²×°³É¹¦ÁË¡£
ÅäÖÃsamba£¬Á¬½Óµ½ÆäËûÖ÷»ú
ÅäÖÃ֮ǰ£¬È·ÈÏÏÂϵͳÍøÂçÊÇ·ñÒÑÅäÖúÃIP¡£Ê¹ÓÃÃüÁîifconfig²é¿´¡£Í¼Ê¾2-1±íʾÒÑÅäÖúᣣ¨Î´ÅäÖÿÉͨ¹ýnetconfig½øÈëÉèÖᣣ©
ͼ2-1
1 ʹÓÃsambclint –L “¼ÆËã»úÃû” –U “Óû§Ãû” À´²éÕÒÄ¿±êÖ÷»úµÄ¹²ÏíĿ¼£¬Èçͼ2-2Ëùʾ£¨Í¼ÖÐÖ÷»úÃûÊÇCD9DE1EF3E4C433.£¬Óû§Ãû×ÓÊÇadministrator£© ¼ÆËã»úÃûʹÓÃÖ÷»úIPÒ²¿É£º192.168.0.1 £¬Ö÷»ú±¾µØÁ¬½ÓÒª¹²Ïí¡£
ͼ2-2
2 ÕâÑù£¬¾Í±íʾÁ¬½Ó³É¹¦ÁË¡£
ÅäÖÃsamba£¬Á¬½Óµ½samba·þÎñÆ÷
1 ½øÈë/etc/samba/Ŀ¼£¬±¸·ÝµÈÏÂÒªÐ޸ĵÄsmb.confÎļþ£¬Èçͼ3-1
ͼ3-1
2 ʹÓÃÃüÁîvi smb.conf´´½¨ÐµÄsmb.confÅ
Ïà¹ØÎĵµ£º
ΪÁ˴nfsϵͳ,...ËùÒÔ ±ØÐëÔÚÄÚºËÒÆÖ²ºÃÍø¿¨Çý¶¯. ÎÒ¿¿.ÕÕÏÂÃæ×ö,Ò»´ÎÄܳɹ¦.
ÎÒµÄÖ÷°åÊÇÓÑÉÆÖ®±Û 2410. »·¾³ÊÇ vmware+ubuntu
LINUX2.6.14ÏÂCS8900µÄÒÆÖ²£¨Fs2410£©
1.
(ÎļþÔÚÎÒµÄÏÂÔØ°æÓÐ)
¿½±´Îļþcs8900.c cs8900.hµ½ linux2.6.14.1/drivers/net
½øÈëĿ¼cs8900
cp cs8900.c ../linux-2.6.14.1/dri ......
1. ÓÐЩÃüÁî²ÎÊý¹ý¶à£¬¿ÉÒÔÓÃgrepÀ´·½±ã²éÕÒ£¬È磺
iptables -h 2>&1|grep '\-A'
ÆäÖÐ2>&1½«stderrתÏòstdout£¬È»ºóÎÒÃǾͿÉÒÔͨ¹ýgrepÕÒµ½ÐèÒªµÄÑ¡ÏҪעÒâµÄÊǺá¸Ë֮ǰҪ¼Ó·´Ð±¸ ......
ÔÚÍøÉÏÕÒµ½µÄÒ»¸ö³ÌÐò
[c]
#include <stdio.h>
#include <sys/types.h>
#include <regex.h>
/* È¡×Ó´®µÄº¯Êý */
static char* substr(const char*str,unsigned start, unsigned end)
{
unsigned n = end - start;
static char stbuf[256]; ......
ʵÏÖÒ»¸öÁ´±í£¬Íê³ÉÁ´±íµÄ²åÈ룬²éÕÒ£¬É¾³ý
typedef struct _FIFO_M{
void *pdata;
struct _FIFO_M *pNext;
}FIFO_M,* pFIFO_M;
typedef struct _FIFO{
pFIFO_M head;
pFIFO_M tail;
pFIFO_M pos;
int mcount;//½Úµã¸öÊý
int max_count;//½Úµã×î´ó¸öÊý¡£
}FIFO,* pFIFO;
......