[文章作者:张宴 本文版本: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


  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


  3、创建samba配置文件
mv -f /etc/samba/smb.conf /etc/samba/smb.conf.bak
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


  4、为samba用户www、root设立一个密码:
smbpasswd -a www
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 蓝屏,这一点需要注意。


Tags: , ,



技术大类 » 其他Unix技术 | 评论(67) | 引用(0) | 阅读(106553)
토토사이트 Email Homepage
2023-4-25 13:59
I am a high school teacher. Your blog helps many students. Students read this blog and solved the problem. I am really happy to have found your blog. 토토사이트
mirinda
2023-6-10 17:58
PG
2023-8-31 01:40
Online slots for the best online slots website that can be tracked, you can start playing online for real money safely.PG SLOT สล็อตออนไลน์ สล็อต สล็อต เว็บตรง
lada
2023-12-11 10:05
Our direct website slots are certified to be the website that meets the highest standards. Whether the financial system Have stability and wealth.PG SLOT สล็อตออนไลน์ สล็อต สล็อต เว็บตรง
win
2024-2-21 17:51
Try playing PP slots. A popular game camp that includes more than 100 hot and trending games for you to play. Try unlimited free trials. You can easily choose the game you like and make money. Each game attracts attention. High payoutsPG SLOT สล็อตออนไลน์ สล็อต สล็อต เว็บตรง
win
2024-5-22 02:11
It is a genuine licensed website with international standards. Every slot game has a high RTP. Fast deposits and withdrawals, fast transactions, number 1 in Thailand.! ✨ ⭐️สล็อต  สล็อต เครดิตฟรีสล็อตออนไลน์
rolandsystem
2024-9-28 01:42
The trial system covers all games. Members can use it for free. No need to have a username, it's easy to use. You don't need to register first to play to your fullest potential. Try playing slots for free, available 24 hours a day, all games complete.✨✨สล็อต 888สล็อต เว็บตรงสล็อต 66
分页: 4/4 第一页 上页 1 2 3 4 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]