利用sshfs实现Linux远程硬盘挂载

来源:互联网 发布:2016怎么做好淘宝 编辑:程序博客网 时间:2024/06/05 09:02

1、  软件以及下载地址

a)         SSHFS http://fuse.sourceforge.net/sshfs.html

b)         FUSE  http://sourceforge.net/projects/fuse/files/fuse-2.X/

c)         util-linux-ng-2.17.tar.gz http://ftp.sjtu.edu.cn/sites/ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/

 

2、  安装顺序

a)         先安装fuse

                         i.              ./configure

                       ii.              Make

                      iii.              Make install

b)         然后sshfs

                         i.              ./configure

                       ii.              Make

                      iii.              Make install

 

c)         如果出现“/bin/mount:无法识别的选项“--no-canonicalize””则安装util-linux-ng-2.17.tar.gz

                         i.              ./configure --prefix=/usr/local/util-linux-ng

                       ii.              make && make install

                      iii.              mv /bin/mount{,.off}

                      iv.              ln -s /usr/local/util-linux-ng/bin/mount /bin

d)         如果出现error while loading shared libraries: libfuse.so.2: cannot open shared object file: No such file or directory,需要添加软链接

                         i.              ln -sv /usr/local/lib/libfuse.so.2 /usr/lib/libfuse.so.2

                       ii.              ldconfig

 

3、  使用 sshfs root@211.69.201.10:/home /home/kk

a)         上述命令就是将.10主机的/home 挂载到了本地的/home/kk处

 

参考网址

1、  http://fuse.sourceforge.net/sshfs.html

2、  http://www.jsxubar.info/mfs-install.html

3、  http://ftp.sjtu.edu.cn/sites/ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/

4、  http://dogdogcom.blog.51cto.com/2402458/577024

5、  http://www.fwolf.com/blog/post/329


<script type="text/javascript"><!--google_ad_client = "ca-pub-1944176156128447";/* cnblogs 首页横幅 */google_ad_slot = "5419468456";google_ad_width = 728;google_ad_height = 90;//--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
原创粉丝点击