2013年5月8日 星期三

[Archlinux][tftpd] ArchLinux tftpd setup - tftp-hpa


1. Install package
pacman -S --noconfirm tftp-hpa

2.
# vim /etc/systemd/system/tftpd.service

[Unit]
Description=hpas original TFTP daemon

[Service]
ExecStart=/usr/sbin/in.tftpd -c -s /root/tftp
# ExecStart=/usr/sbin/in.tftpd --listen --address 0.0.0.0:69 -l -c -s /home/freeman/tftp/
StandardInput=socket
StandardOutput=inherit
StandardError=journal

3. start tftpd Start tftpd:
# systemctl start tftpd.socket tftpd.service

method 2
sudo /usr/sbin/in.tftpd --listen --address 0.0.0.0:69 -l -c -s /home/xxx/tftp/

To start tftpd on boot:
# systemctl enable tftpd.socket

4. Test
A. Download
mkdir -pv /root/tftp
touch /root/tftp/a.txt
cd /root
tftp 127.0.0.1 -l -v -c get a.txt
Check a.txt is under /root or not.

B. Upload
cd /root
touch b.txt
tftp 127.0.0.1 -l -v -c put c.txt
cd /root/tftp
Check b.txt is under /root/tftp or not.

Reference:


Related Posts:

0 意見:

張貼留言