linux系统挂载ftp服务器

安装curlftpfs, 需要安装对应的依赖项

  1. libffi-3.2.1.tar.gz
  2. glib-2.46.2.tar.xz
  3. fuse-2.9.4.tar.gz
  4. curl-7.46.0.tar.gz
  5. curlftpfs-0.9.2.tar.gz

下载libffi编译安装

./configure
make
make install

下载安装glib

./configure
make
make install

./configure阶段可能会报如下错误

No package ‘libffi’ found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBFFI_CFLAGS
and LIBFFI_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.

这个设置环境变量并没有达到预期的效果,所以将libffi从新安装了一下

./configure --prefix=/usr
make
make install
这个问题解决

重新./configure glib编译通过,之后make make install 一切顺利

下载并安装fuse configure编译时报错

configure: running /bin/bash ./configure ‘–prefix=/usr/local’ –cache-file=/dev/null –srcdir=.
checking for a BSD-compatible install… /usr/bin/install -c
checking kernel source directory… /usr/src/linux-headers-3.13.0-39-generic
checking kernel build directory… /usr/src/linux-headers-3.13.0-39-generic
checking kernel source version… Not found
configure: error:

  • Cannot determine the version of the linux kernel source. Please
  • prepare the kernel before running this script
    configure: error: ./configure failed for kernel

查看系统内核版本: root@ubuntu:~/mountftp/fuse-2.7.0# cat /proc/version
Linux version 3.13.0-39-generic (buildd@toyol) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #66-Ubuntu SMP Tue Oct 28 13:30:27 UTC 2014
查看linux机器内核版本和fuse版本不一致,下载最新的fuse版本编译通过
下载fuse版本:fuse-2.9.4
之后make make install 一切顺利

下载并安装curl: configure make make install 一切顺利

下载安装curlftpfs ./configure make make install 一切顺利

此时curlftpfs已经安装成功,可以直接使用了

curlftpfs使用范例:

curlftpfs -o codepage=utf8 ftp://user:passwd@ip:port ./ftp
指定编码格式 指定用户名 密码 地址端口 和挂载位置
取消挂载umount ./ftp
挂载时候也可以直接挂在具体的位置
curlftpfs -o codepage=utf8 ftp://user:passwd@ip:port/path ./ftp

博文的更详细内容请关注我的个人微信公众号 “云时代IT运维”,本公众号旨在共享互联网运维新技术,新趋势; 包括IT运维行业的咨询,运维技术文档分享。重点关注devops、jenkins、zabbix监控、kubernetes、ELK、各种中间件的使用,比如redis、MQ等;shell和python等运维编程语言;本人从事IT运维相关的工作有十多年。2008年开始专职从事Linux/Unix系统运维工作;对运维相关技术有一定程度的理解。本公众号所有博文均是我的实际工作经验总结,基本都是原创博文。我很乐意将我积累的经验、心得、技术与大家分享交流!希望和大家在IT运维职业道路上一起成长和进步;

linux系统挂载ftp服务器

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值