Although we have explained a lot about the settings of the tftp server, we have not explained much about the specific configurations of a system version. Here we will explain the configuration of the Debian Linux tftp server. My system environment is debian 5.0.
First, install the tftp client and server, because debian5.0 is not installed by default.
Sudo apt-get install tftp tftpd
Then, install xinetd, because openbsd-inetd is used by default, and tftp requires the support of the network management background program xinetd.
Sudo apt-get install xinetd
Debian Linux tftp server configuration inetd. conf
Delete some comments about tftp in/etc/inetd. conf:
- #: BOOT: TFTP service is provided primarily for booting. Most sites
-
- # Run this only on machines acting as "boot servers ."
-
- # Tftp dgram udp wait nobody/usr/sbin/tcpd/usr/sbin/in. tftpd/home/creater/image # Delete the note of this sentence
Here,/home/creater/image is the directory of the file to be downloaded.
Next, create a tftp file under/etc/xinetd. d:
- sudo vim /etc/xinetd.d/tftp
Add the following content to Debian Linux tftp Server Configuration:
- Service tftp
-
- {
-
- Socket_type = dgram
-
- Protocol = udp
-
- Wait = yes
-
- User = root
-
- Server =/usr/sbin/in. tftpd
-
- Server_args =-s/home/creater/image # Replace it with your directory. Pay attention to the permissions.
-
- Disable = no
-
- Per_source = 11
-
- Cps = 1002
-
- Flags = IPv4
-
- }
Restart xinetd:
- sudo /etc/init.d/xinetd reload
-
- sudo /etc/init.d/xinetd restart
Test:
- Tftp localhost
-
- Tftp> get u-boot.bin # A u-boot.bin at the beginning under the image
-
- Received 97353 bytes in 0.1 seconds
By now, the configuration of the Debian Linux tftp server has been completed.