Linux tftp服务器搭建
[21:17:37 root@centos8 ~]#yum -y install tftp-server [21:22:19 root@centos8 ~]#systemctl enable --now tftp [21:22:37 root@centos8 ~]#ss -nulp | grep tftp UNCONN 0 0 *:69 *:* users:(("in.tftpd",pid=1584,fd=0),("systemd",pid=1,fd=56)) [21:23:02 root@centos8 ~]#ls 2021-04-11.log anaconda-ks.cfg hostname.log test3.sh [21:23:10 root@centos8 ~]#cp test3.sh /var/lib/tftpboot/ [21:23:26 root@centos8 ~]#ls /var/lib/tftpboot/ test3.sh [21:23:34 root@centos8 ~]#mkdir /var/lib/tftpboot/dir [21:23:51 root@centos8 ~]#cp hostname.log /var/var/lib/tftpboot/dir cp: cannot create regular file '/var/var/lib/tftpboot/dir': No such file or directory [21:24:10 root@centos8 ~]#cp hostname.log /var/lib/tftpboot/dir [21:24:15 root@centos8 ~]#cat test3.sh 1 1 1 1 2 #客户端 [21:07:29 root@centos7 ~]#yum -y install tftp [21:24:37 root@centos7 ~]#tftp 10.0.0.3 tftp> help tftp-hpa 5.2 Commands may be abbreviated. Commands are: connect connect to remote tftp mode set file transfer mode put send file get receive file quit exit tftp verbose toggle verbose mode trace toggle packet tracing literal toggle literal mode, ignore ':' in file name status show current status binary set mode to octet ascii set mode to netascii rexmt set per-packet transmission timeout timeout set total retransmission timeout ? print help information help print help information tftp> get test3.sh tftp> quit [21:25:14 root@centos7 ~]#ls anaconda-ks.cfg test3.sh [21:25:32 root@centos7 ~]#cat test3.sh 1 1 1 1 2