Difference between revisions of "TFTP"

From ArchWiki
Jump to: navigation, search
(the real problem would be "disabling" ipv6 by simply removing the module)
m (Configuration: /etc is /usr/lib here)
(4 intermediate revisions by 3 users not shown)
Line 11: Line 11:
 
Create a copy of the {{ic|tftpd.service}} unit, and modify {{ic|ExecStart}} with the appropriate directory to use as the tftp root.
 
Create a copy of the {{ic|tftpd.service}} unit, and modify {{ic|ExecStart}} with the appropriate directory to use as the tftp root.
  
{{hc|# vim /etc/systemd/system/tftpd.service|2=
+
{{hc|# vim /usr/lib/systemd/system/tftpd.service|2=
 
[Unit]
 
[Unit]
 
Description=hpa's original TFTP daemon
 
Description=hpa's original TFTP daemon
Line 20: Line 20:
 
StandardOutput=inherit
 
StandardOutput=inherit
 
StandardError=journal}}
 
StandardError=journal}}
 +
 +
[[Systemd#Editing_provided_unit_files]] talks in more detail about customizing unit files.
  
 
== Run ==
 
== Run ==
Line 25: Line 27:
 
Start tftpd:
 
Start tftpd:
  
{{bc|1=
+
# systemctl start tftpd.socket tftpd.service
# systemctl start tftpd.socket tftpd.service}}
+
  
 
To start tftpd on boot:
 
To start tftpd on boot:
  
{{bc|# systemctl enable tftpd.socket}}
+
# systemctl enable tftpd.socket
 +
 
 +
See [[Systemd#Using_units]] for more information on manipulating services.

Revision as of 20:20, 22 July 2013

The Trivial File Transfer Protocol (TFTP) provides a minimalistic means for transferring files. It is generally used as a part of PXE booting or for updating configuration and firmware on devices which have limited memory such as routers and printers.

This article describes how to set up a tftpd server under Arch Linux using the tftp-hpa package.

Installation

Install the package tftp-hpa which can be found in the official repositories.

Configuration

Create a copy of the tftpd.service unit, and modify ExecStart with the appropriate directory to use as the tftp root.

# vim /usr/lib/systemd/system/tftpd.service
[Unit]
Description=hpa's original TFTP daemon

[Service]
ExecStart=/usr/sbin/in.tftpd -s /srv/tftp/
StandardInput=socket
StandardOutput=inherit
StandardError=journal

Systemd#Editing_provided_unit_files talks in more detail about customizing unit files.

Run

Start tftpd:

# systemctl start tftpd.socket tftpd.service

To start tftpd on boot:

# systemctl enable tftpd.socket

See Systemd#Using_units for more information on manipulating services.