Linux服务器---安装tftp-server

简介:
安装tftp-server
1、安装tftp-server
      [root@localhost weijie]#  yum install -y tftp-server
      Loaded plugins: fastestmirror, refresh-packagekit, security
      Running Transaction
        Installing : tftp-server-0.49-8.el6.i686                                  1/1 
        Verifying  : tftp-server-0.49-8.el6.i686                                  1/1 
      Installed:
        tftp-server.i686 0:0.49-8.el6                                                 
      Complete!

2、打开配置文件“/etc/xinetd.d/tftp“  
      [root@localhost weijie]#  gedit /etc/xinetd.d/tftp  
      service tftp
       {
             socket_type = dgram
      protocol = udp
      wait = yes
      user = root
      server = /usr/sbin/in.tftpd
      server_args = -s /var/lib/tftpboot          //默认目录
      disable = no                                //是否启动
      per_source = 11
      cps = 100 2
      flags = IPv4
      }


3、修改防火墙,允许udp端口号69
      [root@localhost weijie]#  gedit /etc/sysconfig/iptables
       -A INPUT -m state --state NEW -m udp -p udp --dport 69 -j ACCEPT

4、重启服务
      [root@localhost weijie]#  service iptables restart               //重启防火墙
      iptables:将链设置为政策 ACCEPT:filter nat                [确定]
      iptables:清除防火墙规则:                                 [确定]
      iptables:正在卸载模块:                                   [确定]
      iptables:应用防火墙规则:                                 [确定]
      iptables:载入额外模块:nf_conntrack_ftp                   [确定]
      You have new mail in /var/spool/mail/root
      [root@localhost weijie]#  service xinetd restart              //重启xinetd,tftp依赖xinetd服务
      停止 xinetd:                                              [确定]
      正在启动 xinetd:                                          [确定]

5、测试
      [root@localhost weijie]#  tftp 192.168.1.8           //连接服务器
       tftp> get 11.c                                           //获取文件
      tftp> quit                                                //退出

      You have new mail in /var/spool/mail/root
      [root@localhost weijie]#  ls                           //查看文件,已经获取到
      1   11.c  1.zip  2.c.bz2  4.c  6.c~  rec000012.c.bz2
      1.  1.c   2.c    3.c      5.c  col   res.zip
相关文章
|
5天前
|
NoSQL Linux 测试技术
Redis的安装(Linux版)
Redis的安装(Linux版)
42 1
|
1天前
|
监控 安全 Linux
Linux系统之安装ServerBee服务器监控工具
【4月更文挑战第22天】Linux系统之安装ServerBee服务器监控工具
18 2
|
1天前
|
存储 分布式计算 NoSQL
MongoDB的简介和安装(在服务器上)
MongoDB的简介和安装(在服务器上)
8 0
|
1天前
|
Linux 开发工具 Android开发
Docker系列(1)安装Linux系统编译Android源码
Docker系列(1)安装Linux系统编译Android源码
3 0
|
1天前
|
Ubuntu Linux 开发工具
WSL2(3)安装Linux headers完美解决方案
WSL2(3)安装Linux headers完美解决方案
3 0
|
2天前
|
Linux 开发工具 C语言
Linux 安装 gcc 编译运行 C程序
Linux 安装 gcc 编译运行 C程序
14 0
|
2天前
|
Ubuntu Linux Python
Linux(15)Ubuntu安装ninja构建工具
Linux(15)Ubuntu安装ninja构建工具
10 0
|
2天前
|
Ubuntu Linux 数据安全/隐私保护
Linux(7)Ubuntu20.04 arm64安装Docker
Linux(7)Ubuntu20.04 arm64安装Docker
12 0
|
5天前
|
网络协议 安全 Linux
IDEA通过内网穿透实现固定公网地址远程SSH连接本地Linux服务器
IDEA通过内网穿透实现固定公网地址远程SSH连接本地Linux服务器
|
5天前
|
Linux
ZooKeeper的安装(Linux版)
ZooKeeper的安装(Linux版)
17 1