1.软件安装
apt-get install tftp-hpa //client
apt-get install tftpd-hpa //server
2.修改server端配置文件
vim /etc/default/tftpd-hpa
# /etc/default/tftpd-hpa
## *this is the config file for server*
TFTP_USERNAME="tftp"
#set the directory of server to provide file service
#here I build a new derectory in /, and chmod 755
TFTP_DIRECTORY="/tftpFileRepertory"
TFTP_ADDRESS="0.0.0.0:69"
#default: "--secure" invoid upload file
TFTP_OPTIONS="-l -c -s"
3.手动启动停止服务:需要先启动服务
sudo service tftpd-hpa stop
sudo service tftpd-hpa start
sudo service tftpd-hpa start
sudo service tftpd-hpa restart //get the PID
4.登陆服务器
~$ tftp localhost //从当前用户家目录登陆到本地server
~/work$ tftp serverIP //从当前用户的work目录下登录到指定ip服务器
5.上传下载文件
tftp> get filename //下载服务器文件到登陆前目录文件夹
tftp> put filename //从登陆前目录文件夹上上传文件到服务器
注意:网络通信时,必须确定在同一网段