TFTP的安装和使用

网上对于TFTP的见解有很多,有兴趣的可以查看下,我就不多说了,我就聊下关于安装TFTP的一些细节

  1. 检查服务器的环境(我的是centos7)
    1.1 关闭防火墙
    systemctl stop iptables
    [root@server-16 test]# cat /etc/selinux/config
    SELINUX=disabled
    SELINUXTYPE=targeted
    然后重启服务器生效配置
  2. 安装TFTP服务器
    我的是通过yum装:
    yum install xinetd
    yum install tftp
    yum install tftp-server
  3. 配置TFTP的配置文件
    如下是我的配置请参考:
    [root@server-16 test]# cat /etc/xinetd.d/tftp
    service tftp
    {
    socket_type = dgram
    protocol = udp
    port = 69
    wait = yes
    user = root
    server = /usr/sbin/in.tftpd
    server_args = -s /data/tftpboot -c #这里可以改为你的tftp-server目录
    disable = no
    per_source = 11
    cps = 100 2
    flags = IPv4
    }
  4. 启动服务器
    [root@server-16 ~]# in.tftpd -s /data/tftpboot/ -c
    查看tftp进程
    [root@server-16 ~]# ps -aux | grep tftp
    root 1827 0.5 0.0 11004 844 pts/1 S+ 16:11 0:00 in.tftpd -s /data/tftpboot/ -c
    root 1830 0.0 0.0 112728 992 pts/2 R+ 16:11 0:00 grep --color=auto tftp
    接着启动TFTP:
    [root@oracledb tftpboot]# systemctl start xinetd
    [root@oracledb tftpboot]# systemctl start tftp
    [root@oracledb tftpboot]# systemctl start tftp.service
    [root@oracledb tftpboot]# netstat -a | grep tftp
    udp 0 0 0.0.0.0:tftp 0.0.0.0:*
    udp6 0 0 [::]:tftp [::]😗
    以上就完成了
  5. tftp上传/下载文件
    [root@oracledb tftpboot]# tftp 192.168.132.114
    tftp> get
    1.txt 1.txt] my.cnf
    tftp> get my.cnf
    tftp> put my.cnf
    以上就是TFTP整个安装使用过程
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值