CentOS下配置tftp服务器

1、安装

rpm -qa|grep tftp

如果没有,安装

yum install tftp.x86_64 tftp-server.x86_64
yum install tftp.x86_64 tftp-server.x86_64

2、配置

vim /etc/xinetd.d/tftp
#修改为
#注意-c 否则不能创建文件
service tftp
{
	socket_type		= dgram
	protocol		= udp
	wait			= yes
	user			= root
	server			= /usr/sbin/in.tftpd
	server_args		= -s /root/tftpboot -c
	disable			= no
	per_source		= 11
	cps			= 100 2
	flags			= IPv4
}

添加目录

mkdir /tftpboot
chmod -R 777 /root/tftpboot
/etc/init.d/iptables stop
service xinetd restart

3、启动

service xinetd restart

4、使用

tftp localhost
>get
...
>put

Leave a Reply

Your email address will not be published.