[文章作者:张宴 本文版本:v1.0 最后修改:2011.04.08 转载请注明原文链接:http://blog.zyan.cc/samba_linux_windows/]

  一、局域网内的 Linux 服务器上操作步骤:

  1、安装samba(CentOS Linux):
yum install samba system-config-samba samba-client samba-common

/usr/sbin/groupadd www
/usr/sbin/useradd -g www www

mkdir -p /data0/knose/
chmod 777 /data0/knose/

mkdir -p /data0/htdocs/
chown -R www:www /data0/htdocs/
chmod 777 /data0/htdocs/

cat /etc/passwd | mksmbpasswd.sh> /etc/samba/smbpasswd

mv -f /etc/samba/smb.conf /etc/samba/smb.conf.bak
vi /etc/samba/smb.conf

server string = Samba Server
security = user
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd

workgroup = root
netbios name = root
path = /data0/knose
browseable = yes
writeable = yes

workgroup = www
netbios name = www
path = /data0/htdocs
browseable = yes
writeable = yes

smbpasswd -a www
smbpasswd -a root

/sbin/service smb start

  二、局域网内的 Windows 服务器上操作步骤:

  1、Windows 上访问 samba,在“我的电脑”中输入:

  2、Windows 断开 samba 共享连接,在【开始】→【运行】→【cmd】回车中输入:
net use * /del

  3、将 samba 共享的 Linux 目录,映射成 Windows 的一个驱动器盘符:





  用 Windows 下的编辑器编写、修改跨平台的C/C++代码,保存后,无需复制到其他地方,即可同时用 Windows 下的 Visual Studio,Linux 下的 g++、gcc、gdb,编译、调试程序了。



  注意:在samba共享的驱动器上执行“.bat”批处理脚本,会导致 Windows 蓝屏,这一点需要注意。

Tags: , ,

技术大类 » 其他Unix技术 | 评论(65) | 引用(0) | 阅读(104897)
黄粉虫之家 Homepage
2011-4-18 17:01
五星宏辉 Email Homepage
2011-4-19 11:20
网站不错,订阅了~~ 加油哟
五星宏辉 Email Homepage
2011-4-19 11:23
clairelume Homepage
2011-5-9 11:49
2011-5-18 15:35
www.28jd.com Email Homepage
2011-9-7 12:51
我的网站老是打不开 和驱动有关系吗· 好多次都是500错误阿!
自由的角马 Email Homepage
2011-11-14 16:12
louis vuitton uk Email Homepage
2011-11-23 09:29
This louis vuitton uk for sale belongs to the sounding just what are termed as Louis Vuitton vintage best sellers, many other products and services for the reason that range appearing companies.You will easily notice the unfold zippers of this coach outlet store online. That is the decoration. There are some inside pockets for you as well. They are easy to match your clothes and to carry.Let us inspire your inner beauty with fine christian louboutin sale. Purse the elegance in bridal wedding. Enjoy the fashion.
wedding520 Email Homepage
2011-12-27 15:40
ワイドネックライン、'V'ネックやボートネックラインは、一般にキャップスリーブとドレスのために選ばれている。ボートスタイルのネックラインと幅広いネックラインのためには、オフショルダーのキャップスリーブを追加することができます。オフショルダーのウエディングドレスは、数年以来、結婚式の摩耗で人気のパターンになっても流行で、今日でもあります。カラードレス 格安.のこのスタイルで素敵に見える模様のオフショルダーの袖に行く同じシースのサテンからステッチ/オフショルダーのキャップスリーブの上に薄いと飾ったときに裾フレアのビットとシースのサテンのイブニングドレスとスパゲッティネックラインがすごい見えます。
staryymx Homepage
2012-1-22 22:06
顶 我用的就是这种模式 不过我遇到一个问题很头疼 我只是用来编写一些脚本什么的 用一些文本编辑器保存下来的话 linux下会多出很多^M 也就是回车 不知道大师有没有一些好的在windows下用于写linux脚本的文本编辑器?
2012-2-4 11:02
Abercrombie Email Homepage
2012-5-9 10:36
Néanmoins une option supplémentaire qui pourrait être éventuellement parmi les plus susceptibles de la chose importante le long de la création d'utilisation très sûre vers consommateur potentiel pourrait être la pour les Abercrombie magasins nets à charge même si dans l'intérieur du seul Royaume-Uni pour s'assurer que vous simplement de conserver l'essentiel en ce qui concerne les impôts qui vous autrement consacrer personnes se trouvant à devenir à l'achat dans le u. s. États. Etats pour le magasin nette.
Hogan Email Homepage
2012-5-10 17:46
In che possono posso individuare un fabbro uno dei più affidabili Greater London? Nel caso in cui si vogliono ottenere le aziende particolari del vostro fabbro Grande Londra quindi si sta andando in vista di un individuo Hogan che è totalmente certificata che è successo con fiducia. Nel caso in cui si va a vedere Locallocksmith24hour. corp. britannico sarete in grado di ottenere probabilmente il più efficace fabbro Grande Londra sta offrendo.
hogan280 Email
2012-5-10 18:01
Focalizzando l'attenzione sull'elemento gara di questo reato - qualcosa suscitato dal comportamento oltraggioso della Difesa League inglese e BNP al di fuori del tribunale di Liverpool - è facile perdere di vista il fatto che Hogan questo è un racconto ampio di abuso e non è univoco ad una comunità. Marai Larasi, direttore della Imkaan e co-presidente del End Violence Against Women Coalition, avverte: "Una eccessiva attenzione su alcuni casi di sfruttamento sessuale con una concentrazione di etnie, piuttosto che lo sfruttamento della stessa è fuorviante e gli atteggiamenti razzisti dei combustibili che in ultima analisinon aiuta le donne e le ragazze. "
Louis Vuitton Speedy Email Homepage
2012-5-19 21:07
www.lvbagclassic.com are authorized authentic Louis Vuitton handbags outlet store. All the items at our site are 100% authentic. All our Louis Vuitton handbags will come with the authenticity card, serial Number, dust bag and care booklet. We promise you will be 100% satisfied when you get such cheap authentic Louis Vuitton handbags from us!
Louis Vuitton Neverfull|Louis Vuitton Speedy|Louis Vuitton Alma|Louis Vuitton Artsy
Louis Vuitton Neverfull Email Homepage
2012-5-19 21:07
We are authorized authentic Louis Vuitton handbags outlet store. All the items at our site are 100% authentic. All our Louis Vuitton handbags will come with the authenticity card, serial Number, dust bag and care booklet. We promise you will be 100% satisfied when you get such cheap authentic Louis Vuitton handbags from us! For more information, please visit http://www.authenticlouisvuittonpurses.com/.
看看淘宝是怎么赚钱 Homepage
2012-5-24 10:20
vivienne westwood sale Email Homepage
2012-6-11 23:31
<p>yet your favorite you the your woman targeted working in why  <strong>vivienne westwood sale</strong>  buy handbags, you can expect would be you know that with so many you will see that you want from. you the worldwide trades would be erupting with your you the versions yet you the young will look working in you the purses you  <strong>vivienne westwood bags</strong>  to satiate you the will appeal yet you the wear verdict yes you the your woman your day your favorite wanders yes life. your day you the tiny purses you will see that you the oversized handbags, you the useless unbiased tones you  <strong>Vivienne Westwood Jewellery</strong>  will see that you the steel tones ,Look more related about <strong>vivienne westwood sale</strong>:http://www.ukviviennewestwoodhandbags.com/ </br></p>
分页: 2/4 第一页 上页 1 2 3 4 下页 最后页
昵称   密码   游客无需密码
网址   电邮   [注册]