ubuntu16.04 64位安装tftp服务器

mac2022-06-30  31

1、安装tftpd-hpa和xinetd  sudo apt-get install tftpd-hpa xined2、针对64位操作系统安装openbsd-inetd  apt-get install openbsd-inetd

3、创建/修改配置文件:/etc/xinetd.d/tftp  /etc/default/tftpd-hpa

1 { 2 socket_type = dgram 3 protocol = udp 4 wait = yes 5 user = binge //登陆名 6 server = /usr/sbin/in.tftpd 7 server_args = -s /home/binge/user/tftpboot -c //共享的目录 8 disable = no 9 per_source = 11 10 cps = 100 2 11 flags = IPv4 12 } /etc/xinted.dtftp 1 # /etc/default/tftpd-hpa 2 3 TFTP_USERNAME="tftp" 4 TFTP_DIRECTORY="/home/binge/user/tftpboot" 5 TFTP_ADDRESS="0.0.0.0:69" 6 TFTP_OPTIONS="-1 -c -s" /etc/default/tftpd-hpa

 注意:      -c参数是允许上传用的,参数/tftpboot则是你的tftp目录,修改成你的目录即可;  disabled选项,如果是yes,TFTP服务器是关闭的,修改为no启动TFTP服务器。

4、创建tftp目录并修改权限:  sudo mkdir /home/binge/user/tftpboot  sudo chmod 777 /home/binge/user/tftpboot

5、服务重启:

  sudo /etc/init.d/openbsd-inetd reload  sudo  /etc/init.d/openbsd-inetd restart //重启openbsd-inetd  sudo service tftpd-hpa restart      //重启tftp服务器  sudo /etc/init.d/xinetd reload  sudo /etc/init.d/xinetd restart

6、测试服务器是否启动  netstat -a|grep tftp      //显示下面内容则启动成功  udp  0  0 *:tftp   *:*

转载于:https://www.cnblogs.com/embeded-linux/p/10620525.html

最新回复(0)