Difference between revisions of "Installing TFTP server"

From wiki.emacinc.com
Jump to: navigation, search
m (Added note and marked Buggy.)
m (Installing tftpd on Ubuntu: Fixed to use mbox instead of imbox, like everything else.)
 
(25 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{todo|Finalize (12.12.13-11:11->MW+);(12.16.13-01:35->MD-)|Michael Welling|project=oe 4,oe 5,mw,Buggy,md}}
+
{{todo|SEOKWREV (12.12.13-11:11->MW+);(12.16.13-01:35->MD-);(12.27.13-13:45->MW+);(12.27.13-14:10->MG+);(12.30.13-15:25->MD+);(12.31.13-17:40->MW+);(12.31.13-17:45->MD+);(03.06.14-15:15->BS-);(04.11.14-14:20->BS+)|Michael Welling|project=oe 4,oe 5,mw,md,mg,bs,SEOKWREV}}
  
 +
{{#seo:
 +
|title=Installing TFTP server
 +
|titlemode=append
 +
|keywords=Ubuntu TFTP server,Install TFTP server,TFTP server windows
 +
|description=There are several TFTP server alternatives in Ubuntu. The tftpd or tftpd-hpa packages are recommended for installation.
 +
}}
 
=== Background Information ===
 
=== Background Information ===
 
The Trivial File Transfer Protocal, or TFTP, is used to transfer files from machine to machine with less overhead than other protocols. For more information about TFTP, see the following page: http://en.wikipedia.org/wiki/Trivial_File_Transfer_Protocol
 
The Trivial File Transfer Protocal, or TFTP, is used to transfer files from machine to machine with less overhead than other protocols. For more information about TFTP, see the following page: http://en.wikipedia.org/wiki/Trivial_File_Transfer_Protocol
Line 9: Line 15:
 
There are several TFTP server alternatives in Ubuntu. The tftpd or tftpd-hpa packages are recommended for installation.
 
There are several TFTP server alternatives in Ubuntu. The tftpd or tftpd-hpa packages are recommended for installation.
  
==== Installing tftpd ====
+
==== Installing tftpd on Ubuntu ====
 
+
{{ mbox | type=notice | text=This following procedure works on Debian and should work on other Debian based Linux distributions. }}
'''NOTE: This doesn't say anything about distribution (which it must), doesn't explain anything about the permissions, and looks like it was written hastily.'''
 
 
 
 
To install the tftpd package, run the following:
 
To install the tftpd package, run the following:
  sudo apt-get install tftpd
+
  user@ldc:~# sudo apt-get install tftpd
  
 
To configure the the TFTP server, create <code>/etc/xinetd.d/tftp</code> with the following contents:
 
To configure the the TFTP server, create <code>/etc/xinetd.d/tftp</code> with the following contents:
Line 29: Line 33:
 
  }
 
  }
  
Run the following to create the TFTP server's base directory:  
+
Run the following to create the TFTP server's base directory and allow anyone to access it:  
  sudo mkdir /tftpboot
+
  user@ldc:~# sudo mkdir /tftpboot
  sudo chmod -R 777 tftpboot
+
  user@ldc:~# sudo chmod -R 777 tftpboot
  sudo chown -R nobody /tftpboot
+
  user@ldc:~# sudo chown -R nobody /tftpboot
  
Once the configuration is complete the xinetd start should be restarted to enable the server:
+
Once the configuration is complete the xinetd deamon should be restarted to enable the server:
  sudo /etc/init.d/xinetd restart
+
  user@ldc:~# sudo /etc/init.d/xinetd restart
  
The TFTP server is then ready to send/recieve files from /tftpboot.
+
The TFTP server is then ready to send/recieve files from <code>/tftpboot</code>.
  
{{ imbox | type=notice | text=Notes that the used directory can be changed to your needs by editing the server_args variable in /etc/xinet.d/tftp file. }}
+
{{ mbox | type=notice | text=The directory used for the TFTP server can be changed using the <code>server_args</code> variable in the <code>/etc/xinet.d/tftp</code> file. }}
  
 
=== Installing a TFTP server on Windows ===
 
=== Installing a TFTP server on Windows ===
  
'''This is not an acceptable explanation.'''
+
For Windows based systems, EMAC recommends the [http://tftpd32.jounin.net/ Tftpd32] server.
 +
<cl>
 +
1. Download the latest version of the program from the download page at:
 +
http://tftpd32.jounin.net/tftpd32_download.html
 +
 
 +
* When the installer is finished downloading, run the .exe to start the installation. Note that Windows may ask for approval to run the installer.
 +
 
 +
* When the license agreement window appears click '''I Agree'''.
 +
[[file:Tftpd32-license.png|Thumb|350px|left]]<br clear=all>
 +
 
 +
* Next the options windows will appear. Leave the default options and click '''Next'''.
 +
[[file:Tftpd32-options.png|Thumb|350px|left]]<br clear=all>
 +
 
 +
* When the installation directory windows appears click '''Install'''.
 +
[[file:Tftpd32-folder.png|Thumb|350px|left]]<br clear=all>
 +
 
 +
* Upon sucessful installation, click '''Close'''.
 +
[[file:Tftpd32-complete.png|Thumb|350px|left]]<br clear=all>
 +
</cl>
 +
 
 +
The TFTP server is now installed on your Windows machine. Select the program from the start menu or Desktop to launch the server.
 +
<cl>
 +
1. The following firewall message may appear; click '''Allow access''' to continue.
 +
[[file:Tftpd32-firewall.png|Thumb|350px|left]]<br clear=all>
 +
 
 +
* The main window for the TFTP server should appear.
 +
[[file:Tftpd32-main.png|Thumb|350px|left]]<br clear=all>
 +
 
 +
* Click the '''Settings''' button to configure the server. In the GLOBAL tab unselect the DHCP Server check box.
 +
[[file:Tftpd32-config.png|Thumb|350px|left]]<br clear=all>
 +
 
 +
* Next click the TFTP tab to configure the TFTP server. The '''Base Directory''' should be changed to the directory which will contain the files to be transferred. Clicking '''Browse''' under '''Base Directory''' will bring up a window to select the appropriate directory. Once the directory is set click '''Okay''' to return to the main window.
 +
[[file:Tftpd32-config2.png|Thumb|350px|left]]<br clear=all>
  
For Window's based systems, EMAC recommends the [http://tftpd32.jounin.net/ Tftpd32] server. The installation procedure is typical and should be self explanatory.
+
* Place the files that are to be transferred into the selected base directory. Upon successful transfer, the '''Tftp server''' tab will temporarily display the transfer.
 +
[[file:Tftpd32-success.png|Thumb|350px|left]]<br clear=all>
 +
</cl>

Latest revision as of 17:03, 14 November 2014

TODO: {{#todo:SEOKWREV (12.12.13-11:11->MW+);(12.16.13-01:35->MD-);(12.27.13-13:45->MW+);(12.27.13-14:10->MG+);(12.30.13-15:25->MD+);(12.31.13-17:40->MW+);(12.31.13-17:45->MD+);(03.06.14-15:15->BS-);(04.11.14-14:20->BS+)|Michael Welling|oe 4,oe 5,mw,md,mg,bs,SEOKWREV}}

Background Information

The Trivial File Transfer Protocal, or TFTP, is used to transfer files from machine to machine with less overhead than other protocols. For more information about TFTP, see the following page: http://en.wikipedia.org/wiki/Trivial_File_Transfer_Protocol

Nearly all of the EMAC ARM based systems require a TFTP server to transfer the Linux kernel and file system to the board from a host PC. The boot loader will connect to the server to retrieve specific files and relocate them to SDRAM, which enables them to be programmed onto the target's flash.

Installing a TFTP server on Ubuntu

There are several TFTP server alternatives in Ubuntu. The tftpd or tftpd-hpa packages are recommended for installation.

Installing tftpd on Ubuntu

To install the tftpd package, run the following:

user@ldc:~# sudo apt-get install tftpd

To configure the the TFTP server, create /etc/xinetd.d/tftp with the following contents:

service tftp
{
protocol        = udp
port            = 69
socket_type     = dgram
wait            = yes
user            = nobody
server          = /usr/sbin/in.tftpd
server_args     = /tftpboot
disable         = no
}

Run the following to create the TFTP server's base directory and allow anyone to access it:

user@ldc:~# sudo mkdir /tftpboot
user@ldc:~# sudo chmod -R 777 tftpboot
user@ldc:~# sudo chown -R nobody /tftpboot

Once the configuration is complete the xinetd deamon should be restarted to enable the server:

user@ldc:~# sudo /etc/init.d/xinetd restart

The TFTP server is then ready to send/recieve files from /tftpboot.

Installing a TFTP server on Windows

For Windows based systems, EMAC recommends the Tftpd32 server.

  1. Download the latest version of the program from the download page at: http://tftpd32.jounin.net/tftpd32_download.html

  2. When the installer is finished downloading, run the .exe to start the installation. Note that Windows may ask for approval to run the installer.

  3. When the license agreement window appears click I Agree.

    Thumb

  4. Next the options windows will appear. Leave the default options and click Next.

    Thumb

  5. When the installation directory windows appears click Install.

    Thumb

  6. Upon sucessful installation, click Close.

    Thumb

The TFTP server is now installed on your Windows machine. Select the program from the start menu or Desktop to launch the server.

  1. The following firewall message may appear; click Allow access to continue.

    Thumb

  2. The main window for the TFTP server should appear.

    Thumb

  3. Click the Settings button to configure the server. In the GLOBAL tab unselect the DHCP Server check box.

    Thumb

  4. Next click the TFTP tab to configure the TFTP server. The Base Directory should be changed to the directory which will contain the files to be transferred. Clicking Browse under Base Directory will bring up a window to select the appropriate directory. Once the directory is set click Okay to return to the main window.

    Thumb

  5. Place the files that are to be transferred into the selected base directory. Upon successful transfer, the Tftp server tab will temporarily display the transfer.

    Thumb