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

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

posted on 2013-04-12 18:47  akwang  阅读(723)  评论(0)    收藏  举报