1. 下载bftpd-4.4 https://sourceforge.net/projects/bftpd/files/bftpd/bftpd-4.4/ 2. 下载xinetd ftp://anduin.linuxfromscratch.org/BLFS/xinetd/xinetd-2.3.15.tar.gz 3. 编译 bftpd tar -zxvf bftpd-4.4.tar.gz cd bftpd-4.4 ./configure --prefix=/opt/bftp --host=arm-linux --enable-libz for H3: ./configure --prefix=/opt/bftp --host=arm-linux-gnueabihf- make CC=/usr/local/arm/gcc-linaro-arm-linux-gnueabihf-2012.05-20120523_linux/bin/arm-linux-gnueabihf-gcc make install 4. 部署 bftpd 将/opt/bftpd/sbin/目录下所有文件复制到开发板/usr/sbin/目录下 cp /opt/bftpd/sbin/* /usr/sbin/ 将/opt/bftpd/etc/目录下所有文件复制到开发板/etc目录下 cp /opt/bftpd/etc/* /etc/ 将/opt/bftpd/var/log/目录下所有文件及目录复制到开发板/var/log/目录下 cp -arf /opt/bftpd/var/log/* /var/log/ 将/opt/bftpd/var/run/目录下所有文件及目录复制到开发板/var/run/目录下 cp -arf /opt/bftpd/var/run/* /var/run/ 5. 编译 xinetd tar -zxvf xinetd-2.3.15.tar.gz cd xinetd-2.3.15 ./configure --prefix=/opt/xinetd --host=arm-linux-gnueabihf --with-loadavg CC=/usr/local/arm/gcc-linaro-arm-linux-gnueabihf-2012.05-20120523_linux/bin/arm-linux-gnueabihf-gcc make make install 6. 部署 xinetd 将/opt/xinetd/sbin/目录下所有文件复制到开发板/usr/sbin/目录下 7. 配置xinetd服务,在开发板上新建 /etc/xinetd.conf 文件,文件内容如下: service echo { socket_type = stream protocol = tcp wait = no user = root type = INTERNAL id = echo-stream } service echo { socket_type = dgram protocol = udp wait = yes user = root type = INTERNAL id = echo-dgram } service daytime { socket_type = stream protocol = tcp wait = no user = root type = INTERNAL id = daytime-stream } service daytime { socket_type = dgram protocol = udp wait = yes user = root type = INTERNAL id = daytime-dgram } service time { socket_type = stream protocol = tcp wait = no user = root type = INTERNAL id = time-stream } service time { socket_type = dgram protocol = udp wait = yes user = root type = INTERNAL id = time-dgram } service ftp { socket_type = stream protocol = tcp wait = no user = root server = /usr/sbin/bftpd } #service telnet #{ # socket_type = stream # protocol = tcp # wait = no # user = root # server = /usr/sbin/telnetd # server_args = -i #} 8. 启动xinetd服务 /usr/sbin/xinetd