[OT]FreeBSD mount 内网windows 共享问题

50 views
Skip to first unread message

Jack Wu

unread,
May 21, 2013, 2:24:47 AM5/21/13
to sh...@googlegroups.com
第一次在slug发帖,请多包涵
不知道要不要加个 OT,为了麻烦,还是加一下。。。
虽说是FreeBSD 下的,我感觉可能和Linux差不多,所以来碰碰运气
是这样的,一台开发虚拟机是在宿主机器上的,有root权限,但是不能su到root,只能sudo 。之后我想在本机(windows xp)上共享一个文件夹,使开发机能访问到windows 共享,达到在win本地开发,在FreeBSD上调试的目的。
试了 mount smbfs , mount nfs 都不行,提示 kldload(smbfs): Operation not permitted
貌似内核没加载 smbfs, 听这边管理员说,如果要加载smbfs, 那必须要再编译,影响其他虚拟机,所以只好放弃。
请问各位是否有其他好的解决方案啊? 我是一名web开发人员,使用Windows, 目的是想把环境搭建在FreeBSD/Linux上,以达到测试环境,开发环境和生产环境基本一致的目的。
还请各位指教,谢谢

Chaos Eternal

unread,
May 21, 2013, 2:42:40 AM5/21/13
to sh...@googlegroups.com
建议:
1. 用linux代替fbsd,
这样很少会发生连smbfs.ko都要依赖管理员的情况,特别是管理员很懒的时候,参见最近关于为啥windows
nt不如linux快的那个新闻。
2. 再一次从根本上否定你的问题:既然是代码,就应该有代码仓库,无论是cvs, svn, 还是 git,
都可以很容易地在unix系统和windows系统之间传代码。

知识所限,只知道这两条路。

2013/5/21 Jack Wu <ecs...@gmail.com>:
> --
> -- You received this message because you are subscribed to the Google Groups
> Shanghai Linux User Group group. To post to this group, send email to
> sh...@googlegroups.com. To unsubscribe from this group, send email to
> shlug+un...@googlegroups.com. For more options, visit this group at
> https://groups.google.com/d/forum/shlug?hl=zh-CN
> ---
> 您收到此邮件是因为您订阅了 Google 网上论坛的“Shanghai Linux User Group”论坛。
> 要退订此论坛并停止接收此论坛的电子邮件,请发送电子邮件到 shlug+un...@googlegroups.com
> 要查看更多选项,请访问 https://groups.google.com/groups/opt_out
>
>

liyaoshi

unread,
May 21, 2013, 2:48:24 AM5/21/13
to sh...@googlegroups.com
 kldload -v smbfs

Jack Wu

unread,
May 21, 2013, 2:50:20 AM5/21/13
to sh...@googlegroups.com
#1 这个我正在努力中,因为生产服务器是定制的FreeBSD,所以在建议本部门的开发机可以换别的,Linux还是比较熟悉的
#2 源码管理有的,这个是部门内部开发环境,就是每个开发人员的开发环境,每人分配一台虚拟机,我看大家都是本地调试好上传,觉得效率有点低,如果可以本机共享,借虚拟机的环境,这样,就省了上传这一环节。



2013/5/21 Chaos Eternal <chaose...@shlug.org>

Jack Wu

unread,
May 21, 2013, 2:52:55 AM5/21/13
to sh...@googlegroups.com
已试, 出错提示  kldload: can't load smbfs: Operation not permitted
问过管理员,这个需要他做,但是据说是影响到宿主机, (这个虚拟机是在 jails里面的) 只好作罢。
谢谢

我想寻求其他途径,不知可行否。。。


2013/5/21 liyaoshi <liya...@gmail.com>

liyaoshi

unread,
May 21, 2013, 3:03:36 AM5/21/13
to sh...@googlegroups.com
sudo passwd root

jack

unread,
May 21, 2013, 3:04:04 AM5/21/13
to sh...@googlegroups.com
本地安装sshfs,然后用sshfs工具去mount吧,走的是ssh协议。


在 2013年5月21日下午2:52,Jack Wu <ecs...@gmail.com>写道:

jack

unread,
May 21, 2013, 3:06:05 AM5/21/13
to sh...@googlegroups.com

Jack Wu

unread,
May 21, 2013, 4:13:41 AM5/21/13
to sh...@googlegroups.com
用了一下,好像反了吧,这个和samba差不多,我现在是想server来mount client的共享


2013/5/21 jack <black...@gmail.com>

jack

unread,
May 21, 2013, 4:28:11 AM5/21/13
to sh...@googlegroups.com
那就在windows端开启nfs服务。

Jack Wu

unread,
May 21, 2013, 4:40:15 AM5/21/13
to sh...@googlegroups.com
NFS的话,服务器端也是mount吧? mount -t nfs ,也是一样不能挂载

哎,实在不行,只能多一步同步动作,考虑到开发效率,想给团队写个客户端,监控本地工作区,有更改就同步过去,貌似只能这样了。。。


2013/5/21 jack <black...@gmail.com>

孑影

unread,
May 21, 2013, 9:58:35 AM5/21/13
to sh...@googlegroups.com
那个应该配置一下,在etc下面某个文件里面配置

#风起看云涌,叶落品人生#

kevin lee

unread,
May 26, 2013, 11:58:46 PM5/26/13
to sh...@googlegroups.com
从服务器mount 客户端 只要把服务器端的配置搬到客户端就可以了呀。把要开启的目录配置到/etc/exports ,然后把相应的服务打开。
Best Regards,
Kevin Lee

依云

unread,
May 27, 2013, 12:29:53 PM5/27/13
to sh...@googlegroups.com
On Tue, May 21, 2013 at 04:40:15PM +0800, Jack Wu wrote:
> NFS的话,服务器端也是mount吧? mount -t nfs ,也是一样不能挂载
>
> 哎,实在不行,只能多一步同步动作,考虑到开发效率,想给团队写个客户端,监控本地工作区,有更改就同步过去,貌似只能这样了。。。

你首先得找找有没有可用的内核模块。smbfs 没有,那 fuse 有不?有的话就可以
用 sshfs。

另外,监控+自动同步也不麻烦。会 Python 的话可以用 watchdog 模块监控文件
改变,然后 rsync 或者 scp 或者 ftp 把改变的文件弄过去。

--
Best regards,
lilydjwg

Linux Vim Python 我的博客:
http://lilydjwg.is-programmer.com/
--
A: Because it obfuscates the reading.
Q: Why is top posting so bad?

Jack Wu

unread,
May 27, 2013, 9:39:22 PM5/27/13
to sh...@googlegroups.com
多谢,正在搞watchdog ,我感觉就这个方案了, fuse 模块也没有


2013/5/28 依云 <lily...@gmail.com>
Reply all
Reply to author
Forward
0 new messages