Ubuntu安装配置tftp服务器

实验环境:ubuntu-1604 x64


(一)安装配置

建立tftp目录:

sudo mkdir /tftpboot
sudo chmod 777 /tftpboot

安装客户端和服务器:

sudo apt-get install tftp-hpa tftpd-hpa
sudo apt-get install xinetd

配置服务器:

vim /etc/default/tftpd-hpa

修改为:

TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/tftpboot"
TFTP_ADDRESS=":69"
TFTP_OPTIONS="-l -c -s

说明:

  • TFTP_USERNAME:名称
  • TFTP_DIRECTORY:服务器目录
  • TFTP_ADDRESS:地址
  • TFTP_OPTIONS:属性,-c:可以上传文件 -s:指定服务器目录,上面已经指定

重启tftp服务:

sudo service tftpd-hpa restart

(二)测试

touch /tftpboot/test.txt
tftp localhost
get test.txt

Ubuntu安装配置tftp服务器_上传文件


ends…