1、安装tftpd组件
yum install tftp-server.x86_64 tftp xinetd.x86_64 -y
2、配置tftpd参数
vi /etc/xinetd.d/tftp
3、把配置文件里的disable = yes,改为disable = no
# default: off
# description: The tftp server serves files using the trivial file transfer \
# protocol. The tftp protocol is often used to boot diskless \
# workstations, download configuration files to network-aware printers, \
# and to start the installation process for some operating systems.
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /var/lib/tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}
4、修改TFTP文件权限为777
chmod 777 /var/lib/tftpboot
5、启动tftp服务
systemctl restart xinetd
systemctl restart tftp
6、设置tftp服务开机自启
systemctl enable xinetd
systemctl enable tftp