linux搭建TFTP server及客户端
(2014-04-25 11:46:30)分类: w~linux |
用yum -y install tftp
安装客户端命令
用yum -y install tftp-server
安装TFPT服务器
配置TFPT服务器配置文件
/etc/xinetd.d/tftp
service tftp
{
server_args
}
创建tftp根目录,关闭防火墙,启动tftp-server #mkdir -m 777 /tftpboot
#/etc/init.d/iptables stop//关闭防火墙 #service xinetd restart //重启 xinetd 服务重启xinetd服务,因为TFTP服务受控与xinetd, xinetd是管服务的服务,它是不开端口的。
添加防火墙规则放通TFTP
vi /etc/sysconfig/iptables
-A INPUT -p udp -m state --state NEW -m udp --dport 69 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
重启iptables服务
service iptables restart
测试:
tftp -g -r 文件名 IP 端口
从服务器获取文件
2个Cenos之间通行提示:Error code 0: Permission denied
win XP的cmd里的tftp提示:Error on server : Permission denied
[root@localhost ~]# setenforce 0
tftp -p -r 文件名 IP 端口
上传文件到服务器
错误
tftp:server error:(0) permission denied
修TFTP目录所属组权限
chown -R nobody /tftpboot
或者错误
tftp:tftp:server error:(2)File must have globle write permissions
chmod -R 777 /tftpboot
参考:
http://www.centoscn.com/image-text/config/2013/1105/2062.html
http://zhidao.baidu.com/question/538407639
http://wiki.centos.org/HowTos/Network/IPTables
linux 配置 TFTP服务
2014-08-05 15:06:04
Linux下FTP和TFTP服务配置
2014-01-28 13:17:03