Ubuntu安装tftp服务器
Ubuntu安装tftp服务器
Ubuntu 14.04
安装:
sudo apt-get install tftpd-hpa tftp-hpa -y
安装成功后,修改其配置文件/etc/default/tftpd-hpa,具体如下:
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/tftpboot/"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="-l -c -s"
这里修改TFTP_DIRECTORY为自己对应的tftp路径。
重启,使服务生效:
sudo service tftpd-hpa restart
卸载:
sudo apt-get remove tftpd-hpa tftp-hpa
Ubuntu 16.04
应该是≥16.04的都可以这么安装:
sudo apt-get install tftpd tftp xinetd -y
修改其配置文件/etc/xinetd.d/tftp,如果没有这份文件的话,则新建:
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = -s /home/ubuntu/tftp/
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}
同理,这里修改server_args为自己对应的tftp路径。
重启服务,使其生效:
sudo /etc/init.d/xinetd restart

浙公网安备 33010602011771号