1. Get root Privileges
Ubuntu defaults to using the user login, and most of the development needs to use root permissions, the use of commands to switch users to super-privileged user root
sudo su
2. Download the installation package
To build a TFTPD server, you need to use the TFTPD-HPA, xinetd, tftp three packages, using Ubuntu's own installation package tool Apt-get download installation.
Apt-get Install TFTPD-HPA tftp xinetd
3. Configuring the TFTPD Server
Open configuration file
Vim/etc/default/tftpd-hpa
#/ETC/DEFAULT/TFTPD-HPA
</pre><pre code_snippet_id= "552268" snippet_file_name= "blog_20141215_3_4866489" name= "code" class= "CPP" >tftp_username= "TFTP"
tftp_directory= "/tftproot"
Tftp_address= "0.0.0.0:69"
Tftp_options= "-l-c-S"
Modify the Tftp_directory parameter to your TFTP directory.
4. Establish TFTPD root directory
Establishing the TFTPD root directory
Mkdir/tftproot
Configure TFTPD Root access permissions
chmod-r 777/tftpd
5. Restart the TFTPD server
Service xinetd Restart
Service TFTPD-HPA Restart
6. Verify that the TFTPD server is built successfully
Switch directories to non-TFTPD root directories, such as the/root directory, create a new file readme, and write the test data
echo "Tftpd Test text!" >>readme
Using TFTP clients to access the TFTP server
[Email protected]#]tftp localhost
>put Readme #上传文件到tftp服务器
>get Readme #从tftp服务器下载文件
>quit #退出
If the error is not indicated, the build is successful.
If the put command prompt permission is insufficient, it means that the file under the server directory does not have write permission, it needs to configure access at the TFTP root directory;
If the GET, put command prompt times out, it means that the server is not configured successfully;
Reference: Http://blog.163.com/[email protected]/blog/static/16674347920108204318430/
Build an embedded Linux development environment using vagrant on the Windows platform (2) TFTPD Server Setup