1.安装 yum install tftp ; yum install tftp-server
2. 修改配置文件 /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
{
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot -c
per_source = 11
cps = 100 2
flags = IPv4
}
3.重起xinetd服务 , service xinetd restart
4.修改SELinux参数,执行 setup 将安全级别降为 "允许"或"禁用",
或者修改文件
/etc/sysconfig/selinux
SELINUX=permissive
或
SELINUX=disabled
5.修改防火墙配置,放开UDP协议的69端口访问,编辑/etc/sysconfig/iptables,增加
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 69 -j ACCEPT
service iptables restart
6.创建许可文件名,touch /tftpboot/file,并且修改文件权限,chown 777 /tftpboot/file
7.上传文件,tftp localhost
tftp> put file
tftp>quit
阅读(994) | 评论(0) | 转发(0) |