1、查看是否有安装tftp-server服务
rpm -q tftp-server
2、安装tftp-server服务
yum install tftp-server
3、查看tftp文件配置
[root@localhost ~]# cat /etc/xinetd.d/tftp
# 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 = yes ------默认是yes,开启tftp服务需设置为no
per_source = 11
cps = 100 2
flags = IPv4
}
4、创建和修改存储目录
cd /var/
mkdir network
chmod o+w network
vi /etc/xinetd.d/tftp
修改如下参数
server_args = -s /var/network -c
说明:修改项server_args= -s <path> -c,其中<path>处可以改为你的tftp-server的根目录,参数-s指定chroot,-c指定了可以创建文件。
disable = no
5、重启tftp服务
service xinetd status
6、查看监听端口
netstat -a | grep tftp
ss -ntul