Linux tftp服务配置

1、安装tftp服务

yum install -y xinetd tftp tftp-server


2、修改配置文件

vi /etc/xinetd.d/tftp 修改下面2行

disable=no #设置为启用
server_args=-s /tftpboot/ -c   #设置tftp server目录



3、创建tftp目录

mkdir /tftpboot

chmod -R 777 /tftpboot


4、开启服务
service xinetd restart

service iptables stop  #或加入69端口到iptables规则配置中

setenforce 0


5、上传下载

进入交互式命令:tftp 远程主机ip

上传下载以本机根目录为起点,连接的ip主机为/tftpboot为起点

下载:get  要下载的远程主机/tftpboot 下文件名 (下载到本机的根目录)

上传:put  要上传的本机根目录文件名 (上传到远程主机/tftpboot 下)