[文章作者:张宴 本文版本:v1.0 最后修改:2011.04.08 转载请注明原文链接:http://blog.zyan.cc/samba_linux_windows/]
一、局域网内的 Linux 服务器上操作步骤:
1、安装samba(CentOS Linux):
2、创建www账号
3、创建samba配置文件
输入以下内容:
4、为samba用户www、root设立一个密码:
5、启动samba:
二、局域网内的 Windows 服务器上操作步骤:
1、Windows 上访问 samba,在“我的电脑”中输入:
2、Windows 断开 samba 共享连接,在【开始】→【运行】→【cmd】回车中输入:
3、将 samba 共享的 Linux 目录,映射成 Windows 的一个驱动器盘符:



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


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


一、局域网内的 Linux 服务器上操作步骤:
1、安装samba(CentOS Linux):
yum install samba system-config-samba samba-client samba-common
2、创建www账号
/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
/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
3、创建samba配置文件
mv -f /etc/samba/smb.conf /etc/samba/smb.conf.bak
vi /etc/samba/smb.conf
vi /etc/samba/smb.conf
输入以下内容:
引用
[global]
server string = Samba Server
security = user
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
[knose]
workgroup = root
netbios name = root
path = /data0/knose
browseable = yes
writeable = yes
[web]
workgroup = www
netbios name = www
path = /data0/htdocs
browseable = yes
writeable = yes
server string = Samba Server
security = user
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
[knose]
workgroup = root
netbios name = root
path = /data0/knose
browseable = yes
writeable = yes
[web]
workgroup = www
netbios name = www
path = /data0/htdocs
browseable = yes
writeable = yes
4、为samba用户www、root设立一个密码:
smbpasswd -a www
smbpasswd -a root
smbpasswd -a root
5、启动samba:
/sbin/service smb start
二、局域网内的 Windows 服务器上操作步骤:
1、Windows 上访问 samba,在“我的电脑”中输入:
\\xxx.xxx.xxx.xxx\
2、Windows 断开 samba 共享连接,在【开始】→【运行】→【cmd】回车中输入:
net use * /del
3、将 samba 共享的 Linux 目录,映射成 Windows 的一个驱动器盘符:



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


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


pengeluaran togel singapura terbaru
2026-6-17 22:28
Thank you because you have been willing to share information with us. we will always appreciate all you have done here because I know you are very concerned with our.
yt
2026-6-19 01:40
We're quite prepared to look for this incredible website and additionally had experience checking advantageous articles or reviews shared right. All the choices for the journalist was first stunning, regards for those present. Slot Thailand Great Publish, I'm a large believer within publishing remarks upon websites in order to allow weblog authors realize that they’ve additional some thing beneficial in order to the internet! Lapak303 Alternatif We'd mention the fact that this may be a a good place associated with a terrific man, i will be pleased to look at the. Dewapoker Vip Login
ads
2026-6-20 16:59
I am impressed. I don't think Ive met anyone who knows as much about this subject as you do. You are truly well informed and very intelligent. You wrote something that people could understand and made the subject intriguing for everyone. Really, great blog you have got here. forex account management
ayan ansari
2026-6-24 19:14
Nice post. I was checking constantly this blog and I am impressed! Extremely helpful information specially the last part I care for such info a lot. I was seeking this particular information for a very long time. Thank you and good luck. taxi cost walton heathrow near me
SEO
2026-6-28 16:05
This is my first time visit to your blog and I am very interested in the articles that you serve. Provide enough knowledge for me. Thank you for sharing useful and don't forget, keep sharing useful info: 성인 피시방
sdfas
2026-6-29 20:17
You may be permitted to blog post details, though not back-links, with regard to they are really sanctioned and even at area. 성인 PC방 처벌
SEO
2026-7-1 15:11
thanks for the tips and information..i really appreciate it.. 성인 피시방 단속
성인피시
2026-7-2 15:52
I’m going to read this. I’ll be sure to come back. thanks for sharing. and also This article gives the light in which we can observe the reality. this is very nice one and gives indepth information. thanks for this nice article... 성인피시
성인 PC방 단속
2026-7-4 13:47
The on-line world might be bogged downwards with the help of counterfeit web logs without a proper personal message nonetheless put up was basically awesome not to mention value typically the read through. Regards for the purpose of showing this unique when camping. 성인 PC방 단속
오피사이트
2026-7-6 17:16
We've just lately commenced a new web site, the details anyone present on this internet site features made it easier for us drastically. Cheers pertaining to your occasion & operate. 오피사이트
아이허브 할인코드
2026-7-6 19:13
This is often nice blog post and even i enjoy to enjoy a book it blog post. your site is without a doubt fabulous and you just contain decent office staff ınside your web log. attractive writing continue the good work. 아이허브할인코드
인디고 게임
2026-7-7 16:30
The following is the perfect posting I actually found as a consequence of promote them. It's really just what exactly Needed to check out anticipation around long run you are going to continue on to get spreading this sort of great posting. 인디고 게임
sei
2026-7-7 19:43
A person's popular music is definitely astounding. You may have quite a few pretty good music artists. I actually need you actually the perfect with being successful. AK 게임
AK 게임
2026-7-8 15:57
I recently considered it could be a thought to create could someone else has been having troubles exploring yet I will be slightly not sure easily feel allowed to set brands and also address about the following. AK 게임
sej
2026-7-14 18:57
Amazing short article. Your article influences a great deal of vital issues of our own modern society. Many of us can not be uninvolved for you to these kind of issues. This specific article presents ideas along with aspects. Quite helpful along with functional. hair extensions
分页: 5/5
1 2 3 4 5
1 2 3 4 5
Windows 上静态编译 Libevent 2.0.10 并实现一个简单 HTTP 服务器
轻量级开源简单队列服务 HTTPSQS 1.6 版本发布

2011-4-8 08:53 | by







