The TFTP protocol is a simple file transfer protocol based on UDP protocol and does not have file management or user control functions. TFTP is divided into two types: server-side programs and client programs. The TFTP server and client are usually configured on the host.
Build a tftp service in Ubuntu
TFTP Server Configuration
Configure the TFTP download server in Ubuntu Linux
Configure tftp Server in Ubuntu 11.10
The default Ubuntu system does not contain the TFTP server and client. You can use the command line to download and install it as follows:
(1) install the client.
Root @ www.bkjia.com :~ # Apt-get install tftp
(2) install the server.
Root @ www.bkjia.com :~ # Apt-get install tftpd
(3) install inetd.
Root @ www.bkjia.com :~ # Apt-get install openbsd-inetd
Inetd is a daemon that monitors network requests and calls corresponding service processes according to network requests.
(4) Create a New tftpboot directory under the "/" Directory (system root directory) and change the attribute to 777. This directory stores the files transmitted by tftp (including uploaded and downloaded files)
(5) add it in/etc/inetd. conf.
Tftp dgram udp wait root/usr/sbin/in. tftpd/usr/sbin/in. tfptd-s/tftpboot
Inetd. conf is the configuration file of inetd. The inetd. conf file tells inetd which network ports are listened for and which service is started for each port.
(6) Reload the inetd process.
/Etc/init. d/openbsd-inetd reload
(7) disable the firewall.
Ufw disable
(8) Test the TFTP server.
■ Download files from the server:
1. log on to the server: tftp 127.0.0.1
2. get the file from the server: get command
■ Upload files to the server:
When uploading a file, you must note that there must be a file under/tftpboot with the same name as the file you uploaded. The file can be a null file, but the file must have the readable and writable permissions, otherwise, the error "Errorcode 2: Access violation" appears.
Before uploading a file, create an empty file with the same file name and modify the readable and writable permissions.
After uploading the file, you can see that the kk file contains new content, that is, the file is overwritten.