linux下用curlftps rhel6 实现

来源:互联网 发布:武汉淘宝商学院学费 编辑:程序博客网 时间:2024/06/14 11:37

Linux下用curlftpfs挂载FTP服务器 [CentOS]

作者:master 发表于:2011年11月30日 19:17分类:Linux,操作系统 1146 views

A、安装curlftpfs

A.1、安装DAG repository

Fedora可以直接yum install curlftpfs,CentOS不行,得用DAG repository,所以得先安装DAG repository。

rpm -Uhv http://apt.sw.be/RedHat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm

A.2、安装 curlftpfs

yum install curlftpfs

 

rhel 下载源码包后,编译安装  下载地址

http://nchc.dl.sourceforge.net/project/curlftpfs/curlftpfs/0.9.2/curlftpfs-0.9.2.tar.gz

B、挂载FTP服务器

B.1、用curlftpfs命令挂载

curlftpfs -o codepage=utf8 ftp://username:password@192.168.192.168 /ftp

codepage: 编码

username: FTP用户名

password: FTP密码
192.168.1.111: FTP地址
/ftp: 准备挂载到的路径

B.2、卸载挂载

fusermount -u /ftp

umount /ftp

B.3、开放权限

这样其它用户也能读写了,uid和gid改成你自己的id

sudo curlftpfs –o rw,allow_other,uid=0,gid=0 ftp:// username: password @192.168.1.111 /ftp

B.4、开机自动挂载
echo "curlftpfs#username:password@192.168.1.111 /ftp fuse allow_other,uid=0,gid=0 0 0" >> /etc/fstab

本文固定链接: http://www.val.so/2011/11/344.html | Val So

原创粉丝点击