移植vsftpd到ARM开发板
来源:互联网 发布:java实现群发短信 编辑:程序博客网 时间:2024/06/06 01:41
1. 下载源码
https://security.appspot.com/downloads/vsftpd-3.0.3.tar.gz
2. 解压并编译
2.1 解压
tar -zxvf /home/chy/work/tar/vsftpd-3.0.3.tar.gz -C ./
2.2 设置交叉编译环境
$ export PATH=/opt/ARM/mys-4279/bin:$PATH
$ export CC=arm-linux-gnueabihf-gcc
2.3 编译
$ make
最好不要执行make install。
2.4 编译可能出现的问题
sysdeputil.o:在函数‘vsf_sysdep_has_capabilities’中:
sysdeputil.c:(.text+0x22a):对‘cap_get_proc’未定义的引用
sysdeputil.c:(.text+0x235):对‘cap_free’未定义的引用
sysdeputil.o:在函数‘vsf_sysdep_adopt_capabilities’中:
sysdeputil.c:(.text+0x26b):对‘cap_init’未定义的引用
sysdeputil.c:(.text+0x285):对‘cap_set_proc’未定义的引用
sysdeputil.c:(.text+0x29d):对‘cap_free’未定义的引用
sysdeputil.c:(.text+0x2d1):对‘cap_set_flag’未定义的引用
sysdeputil.c:(.text+0x2ec):对‘cap_set_flag’未定义的引用
sysdeputil.c:(.text+0x319):对‘cap_set_flag’未定义的引用
sysdeputil.c:(.text+0x334):对‘cap_set_flag’未定义的引用
collect2: error: ld returned 1 exit status
Makefile:29: recipe for target 'vsftpd' failed
make: *** [vsftpd] Error 1
在Makefile的LDFLAGS = -fPIE -pie -Wl,-z,relro -Wl,-z,now后添加,-lcap,执行make clean然后执行make。
3. 移植到开发板
3.1 检查依赖的共享库
$ arm-linux-gnueabihf-readelf ./vsftpd -a | grep "共享库"
图一
3.2 复制vsftpd、vsftpd.conf 到开发板
把vsftpd放到/usr/sbin/目录下,并添加可执行权限,vsftpd.conf放到/etc/目录下。可以使用nfs方式挂载根文件系统,或打包到根文件系统再烧入开发板,或通过tftp传输到开发板。
3.3 修改配置文件
#anonymous_enable=YES
local_enable=YES
主要修改上面两行,禁止陌生人登陆,允许本地用户登陆。更详细配置参考:http://blog.csdn.net/c1194758555/article/details/63683641
4. 尝试连接
C:\Users\chenhongyu>ftp 172.20.27.128
连接到 172.20.27.128。
500 OOPS: vsftpd: not found: directory given in 'secure_chroot_dir':/usr/share/empty
500 OOPS: priv_sock_get_cmd
远程主机关闭连接。
出现上面的错误,则需要建立/usr/share/empty目录。
5. 开机自启
$ link -s /usr/sbin/vsftpd /etc/init.d/vsftpd
在/etc/init.d/rcS中加入
/etc/init.d/vsftpd &
6. 运行效果
图二
- 移植vsftpd到ARM开发板
- vsftpd移植到arm问题
- vsftpd移植到ARM Linux教程
- Yocto IMX6 vsftpd 移植到ARM
- vsftpd-2.3.4移植到8621开发板
- 移植BlueZ到ARM开发板【转】
- 移植pcap库到ARM开发板
- Mplayer移植到Arm开发板
- 移植 sshd到arm开发板
- Mplayer移植到Arm开发板
- 移植SQLite3到ARM开发板
- 移植iptables命令到ARM开发板
- 移植ubuntu core到Arm开发板
- qwt移植到arm开发板
- qwt移植到arm开发板
- 移植madplay到arm开发板
- 移植qwt库到arm开发板!!!
- 移植SQLite到ARM开发板
- Codeforces 4C Registration system 题解
- synchronized的用法以及常见的使用错误
- 网络编程send和recv
- Java之this关键词的使用详解
- poj1088滑雪
- 移植vsftpd到ARM开发板
- 编译原理填空题
- SAPUI5教程——can not load launchpad Tile问题解决方案
- Python 刷题日记:LeetCode 624. Maximum Distance in Arrays
- 网络字节序与字节内比特序
- C++入门知识
- java入门02篇(续)
- app内支付宝支付php版所遇到几大坑
- 非常使用的mongodb的聚合函数(使用SpringDataMongoDb)