现在的位置: 首页技术分享>正文
使用sshfs将sourceforge空间挂载到本地
发表于8年前 技术分享 评论数 1 ⁄ 被围观 2,223 次+

          sourceforge提供免费php空间,本人非常喜欢,无限空间,无限流量,无限mysql,可以sftp登录管理文件等等......

          sourceforge空间无限大,那么我们是不是可以拿来作网盘?而且将sourceforge空间挂载到本地当作本地硬盘使用呢?这样岂不是更方便管理?答案是肯定的,那就是通过sshfs来实现这一功能;

          首先,安装sshfs

yum install sshfs

================================================================================
Package            Arch         Version                 Repository        Size
================================================================================
Installing:
fuse-sshfs         i386         2.2-1.el5.rf            rpmforge          49 k
Installing for dependencies:
fuse               i386         2.7.4-8.el5             base              83 k
fuse-libs          i386         2.7.4-8.el5             base              72 k

Transaction Summary
================================================================================
Install       3 Package(s)
Upgrade       0 Package(s)

Total download size: 204 k
Is this ok [y/N]: y
Downloading Packages:
(1/3): fuse-sshfs-2.2-1.el5.rf.i386.rpm                  |  49 kB     00:00    
(2/3): fuse-libs-2.7.4-8.el5.i386.rpm                    |  72 kB     00:00    
(3/3): fuse-2.7.4-8.el5.i386.rpm                         |  83 kB     00:00    
--------------------------------------------------------------------------------
Total                                           1.1 MB/s | 204 kB     00:00    
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : fuse-libs                                                1/3
  Installing     : fuse                                                     2/3
  Installing     : fuse-sshfs                                               3/3

Installed:
  fuse-sshfs.i386 0:2.2-1.el5.rf                                               

Dependency Installed:
  fuse.i386 0:2.7.4-8.el5              fuse-libs.i386 0:2.7.4-8.el5            

Complete!

然后,通过sshfs命令将sourceforge空间挂载到本地

sshfs tangyou,tangyou@web.sf.net:/home/project-web/tangyou/ /sourceforge/tangyou/

sshfs tangyoume,tangyoume@web.sf.net:/home/project-web/tangyoume/ /sourceforge/tangyoume/

来看看效果

[root@host30 htdocs]# df -h
文件系统              容量  已用 可用 已用% 挂载点
/dev/sda3              71G   50G   17G  75% /
/dev/sda1              99M   76M   18M  81% /boot
tmpfs                 982M     0  982M   0% /dev/shm
/dev/hdb1              76G   62G  9.8G  87% /opt2
/opt2/OS/CentOS-5.3-x86_64-bin-DVD.iso
                      4.3G  4.3G     0 100% /mnt/os
/opt2/OS/CentOS-5.5-i386-bin-DVD/CentOS-5.5-i386-bin-DVD.iso
                      3.9G  3.9G     0 100% /mnt/os2
//192.168.5.31/kuaipan/
                       11G  4.6G  5.7G  45% /opt3
sshfs#tangyoutangyou@web.sf.net:/home/project-web/tangyou/
                      207G  4.9G  191G   3% /sourceforge/tangyou
sshfs#tangyoumetangyoume@web.sf.net:/home/project-web/tangyoume/
                      207G  4.9G  191G   3% /sourceforge/tangyoume
[root@host30 htdocs]#

如此,就可以当作硬盘使用,非常方便,

目前有 1 条留言 其中:访客:0 条, 博主:0 条 引用: 1

    给我留言

    留言无头像?