NotePublic/Software/Applications/TFTP/TFTP_服务安装和配置.md

856 B

TFTP 服务安装和配置

安装

# Ubuntu
sudo apt-get install tftpd-hpa
# Manjaro
sudo pacman -S tftp-hpa

配置

# Ubuntu
sudo vim /etc/default/tftpd-hpa
# Manjaro
sudo vim /etc/conf.d/tftpd

Ubuntu 系统修改为如下内容:

TFTP_USERNAME="tftp"
TFTP_DIRECTORY="<your tftp share directory>"
TFTP_ADDRESS=":69"
TFTP_OPTIONS="-l -c -s"
#TFTP_OPTIONS="--secure"

Manjaro 系统修改为如下内容:

TFTPD_ARGS="-l -c -s /home/rick/Share/tftp"

使能/启动 TFTP 服务

# Ubuntu
sudo systemctl enable tftp-hpa
sudo systemctl start tftp-hpa
# Manjaro
sudo systemctl enable tftpd
sudo systemctl start tftpd

停止/禁用 TFTP 服务

# Ubuntu
sudo systemctl stop tftp-hpa
sudo systemctl disable tftp-hpa
# Manjaro
sudo systemctl stop tftpd
sudo systemctl disable tftpd