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

39 lines
517 B
Markdown
Raw Normal View History

# TFTP 服务安装和配置
## 安装
```sh
# Ubuntu
sudo apt-get install tftpd-hpa
```
## 配置
```sh
sudo vim /etc/default/tftpd-hpa
```
修改为如下内容
```sh
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="<your tftp share directory>"
TFTP_ADDRESS=":69"
TFTP_OPTIONS="-l -c -s"
#TFTP_OPTIONS="--secure"
```
## 使能/启动 TFTP 服务
```sh
sudo systemctl enable tftp-hpa
sudo systemctl start tftp-hpa
```
## 停止/禁用 TFTP 服务
```sh
sudo systemctl stop tftp-hpa
sudo systemctl disable tftp-hpa
```