1. Installation
$ apt-get install TFTP-HPA TFTPD-HPA
TFTP-HPA is the client
TFTPD-HPA is the server
2. Create a Directory
$ mkdir/tftpboot
This is the Create TFTP transfer directory
777 /tftpboot
Add permissions to a directory
$ cd/tftpboot$ sudo touch test.txt
Create a Test.txt file under the directory
3. Configuration
# vi/etc/default/tftpd-hpatftp_username="tftp"tftp_directory ="/tftpboot" tftp_address="0.0.0.0:69" tftp_options="-l-c-S"
This changes the directory to the directory you just created.
Here is the option,-C is the parameter that can upload the file,-S is the specified TFTPD-HPA service directory, the above has been specified
4. Restart the service
$ sudo service tftpd-hpa restart
# Start the service, here to pay attention to the use of the independent service form.
5. Testing
# CD/home# sudo touch test1.txt# tftp localhosttftp>get test.txttftp>put Test1.txttftp
After exiting, there will be a test.txt file under the/home directory, there will be test1.txt in the/tftpboot directory, indicating that the TFTP server installation was successful!
ubuntu16.04.2 Installing the TFTP server