CentOS下配置tftp服务器

1、安装
[shell]
rpm -qa|grep tftp
[/shell]

如果没有,安装
[shell]
yum install tftp.x86_64 tftp-server.x86_64
yum install tftp.x86_64 tftp-server.x86_64
[/shell]

2、配置

[shell]
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
}
[/shell]

添加目录
[shell]
mkdir /tftpboot
chmod -R 777 /root/tftpboot
/etc/init.d/iptables stop
service xinetd restart
[/shell]

3、启动
[shell]
service xinetd restart
[/shell]

4、使用
[shell]
tftp localhost
>get

>put
[/shell]

Leave a Reply

Your email address will not be published.