Ubuntu9.04s & amp; Tftpd32 (tftpclient): There are three tftp servers in Ubuntu: atftpd, tftpd, hpa; installation hpa process: self-built tftp Directory: sudomkdir/home/tftp modify directory attributes: sudochmod777/home/tftptftpd-hpa is an enhanced TFTP server. It provides many enhanced TFTP functions.
Ubuntu 9.04 s & Tftpd32 (tftp client ):
Ubuntu has three tftp servers: atftpd, tftpd, and hpa;
Hpa installation process:
User-created tftp Directory: sudo mkdir/home/tftp
Modify directory attributes: sudo chmod 777/home/tftp
Tftpd-hpa is an enhanced TFTP server. It provides many TFTP enhancements and has been transplanted to most modern UNIX systems.
Install
Run the following command to place the tftpd-hpa Server:
$ Sudo apt-get install tftpd-hpa
NOTE: If xinetd is not installed on the server, openbsd-inetd will be automatically downloaded and installed in Ubuntu9.04. Errors in the use of tftp are often caused by xinetd version issues;
Configuration
The configuration file of tftp-hpa is/etc/default/tftpd-hpa.
RUN_DAEMON = "no"
OPTIONS = "-l-c-s/tftpboot"
-C indicates that a new file can be created. If this parameter is not set, an error message may appear in the put command. In this case, only the original file can be overwritten and a new file cannot be created;
No matter how you configure the tftp-server-c parameter to determine whether data can be written normally. Here, specify the directory used by tftpd as/tftpboot. Be sure to modify the Directory attribute: chmod 777 tftpboot.
Start and Stop
Start
#/Etc/init. d/tftpd-hpa start
Stop
#/Etc/init. d/tftpd-hpa stop
(If NO xinetd is available, openbsd-inetd will be automatically downloaded and installed when the tftpd-hpa package is downloaded. If xinetd is used in other documents, an error occurs mainly due to the xinetd version)
After normal installation is complete, edit the/etc/default/tftpd-hpa file:
# Defaults for tftpd-hpa
RUN_DAEMON = "yes" # The default value is "no". tftp cannot be started;
OPTIONS = "-l-c-s/home/tftp"
#/Home/tftp sets the directory for you.-c can create new files. The-c parameter is missing in the commands executed in many documents or the tftp file, for example, sudo in. tftpd-l-c-s/home/tftp, The put command will prompt an error;
Start: sudo/etc/init. d/tftpd-hpa start
Verification: ps-A | grep tftp
The/home/tftp directory permission can be modified normally;
Delete service: sudo apt-get remove tftpd-hpa tftp-hpa -- purge
Option reference
OPTIONS
-L Run the server in standalone (listen) mode, rather than run from
Inetd. In listen mode, the-t option is ignored, and the-
Option can be used to specify a specific local address or port
To listen.
-A [address] [: port]
Specify a specific address and port to listen to when called
With the-l option. The default is to listen to the tftp port
Specified in/etc/services on all local addresses.
Ip address and Port of listen
-C Allow new files to be created. By default, tftpd will only
Allow upload of files that already exist. Files are created
With default permissions allowing anyone to read or write them,
Unless the-p or-U options are specified.
-S (determines the tftp root directory) Change root directory on startup. This means the remote host
Does not need to pass along the directory as part of the trans-
Fer, and may add security. When-s is specified, exactly one
Directory shocould be specified on the command line. The use
This option is recommended for security as well as compatibility
With some boot ROMs which cannot be easily made to include
Directory name in its request.