fedora安装tftp server

来源:互联网 发布:智百威软件官网 编辑:程序博客网 时间:2024/06/04 03:39

由于要在板子上实现tftp client, 所以现在pc实现tftp server, 直接用sudo dnf install tftp-server安装,显示搜不到package,所以从网上下载了安装包,https://fedora.pkgs.org/26/fedora-x86_64/tftp-server-5.2-20.fc26.x86_64.rpm.html
2.安装完之后,server的目录为/var/lib/tftpboot目录。
3.使用tftp命令 : 
a. tftp 127.0.0.1
b. put file //可以将当前目录传到服务器目录
c. get file  //从服务器目录获取某个文件
在b步骤时,会出现不能找到文件的错误,这是因为tftp一般只支持从服务器获取文件,如果要向服务器推送文件,也必须在服务器目录下有这个文件,然后你用推送的文件覆盖它。所以,需要在服务器目录下创建同名的文件,将其mode设置为777,然后就可以覆盖了。

3.查看tftp是否启动:
netstat -a | grep tftp
4.enable tftp
sudo systemctl enable tftp
5.start tftp
sudo systemctl restart tftp
4.一般需要关闭本机防火墙
sudo systemctl stop firewalld.service