Tftp: Difference between revisions
(13 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== RHEL7 == | == TFTP setting (RHEL9) == | ||
yum install tftp tftp-server | |||
Create file ''/etc/systemd/system/tftp.service'': | |||
[Unit] | |||
Description=Tftp Server | |||
Requires=tftp.socket | |||
Documentation=man:in.tftpd | |||
[Service] | |||
ExecStart=/usr/sbin/in.tftpd -s /tftpboot | |||
StandardInput=socket | |||
[Install] | |||
Also=tftp.socket | |||
Start tftp: | |||
systemctl enable tftp | |||
systemctl start tftp | |||
systemctl status tftp | |||
== TFTP setting (RHEL7) == | |||
yum install tftp tftp-server | |||
yum install syslinux-tftpboot syslinux ??? | |||
Bryan (if installing from scratch, not sure if needed): | |||
yum install nfs-utils tftp-server syslinux-tftpboot syslinux | |||
yum install dnsmasq | |||
mkdir /tftpboot | |||
grub2-mknetdir --net-directory=/tftpboot/efi | |||
Create file ''/etc/systemd/system/tftp.service'': | |||
[Unit] | |||
Description=Tftp Server | |||
Requires=tftp.socket | |||
Documentation=man:in.tftpd | |||
##After=network.target network-online.target ??? | |||
[Service] | |||
#ExecStart=/usr/sbin/in.tftpd -s /var/lib/tftpboot | |||
ExecStart=/usr/sbin/in.tftpd -s /tftpboot | |||
StandardInput=socket | |||
[Install] | |||
Also=tftp.socket | |||
Start tftp: | |||
systemctl enable tftp | |||
systemctl start tftp | |||
#systemctl start tftp.socket ?? | |||
Check status: | |||
systemctl status tftp ?? | |||
systemctl status tftp.socket | |||
== OLD RHEL7 == | |||
'''Installation:''' | '''Installation:''' | ||
Line 5: | Line 69: | ||
yum install tftp tftp-server* xinetd* | yum install tftp tftp-server* xinetd* | ||
Edit file ''/etc/xinetd.d/tftp'' | '''DONOTDOIT''' Edit file ''/etc/xinetd.d/tftp'': set 'disable=no', add '-c' to server_args, and change directory to '/tftpboot' | ||
service tftp | service tftp | ||
Line 14: | Line 78: | ||
user = root | user = root | ||
server = /usr/sbin/in.tftpd | server = /usr/sbin/in.tftpd | ||
server_args = -c -s | server_args = -c -s /tftpboot | ||
disable = no | disable = no | ||
per_source = 11 | per_source = 11 | ||
Line 20: | Line 84: | ||
flags = IPv4 | flags = IPv4 | ||
} | } | ||
Edit ''/usr/lib/systemd/system/tftp.service': add '-c' to the list of options, and change directory to '/tftpboot' | |||
[Unit] | |||
Description=Tftp Server | |||
Requires=tftp.socket | |||
Documentation=man:in.tftpd | |||
[Service] | |||
ExecStart=/usr/sbin/in.tftpd -c -s /tftpboot | |||
StandardInput=socket | |||
[Install] | |||
Also=tftp.socket | |||
Enable and Start TFTP Service | |||
systemctl enable xinetd | |||
systemctl enable tftp | |||
systemctl start xinetd | |||
systemctl start tftp | |||
After these two commands, permanent links will be made for xinetd and TFTP services. | |||
== old (solaris) == | == old (solaris) == |
Latest revision as of 17:50, 3 September 2025
TFTP setting (RHEL9)
yum install tftp tftp-server
Create file /etc/systemd/system/tftp.service:
[Unit] Description=Tftp Server Requires=tftp.socket Documentation=man:in.tftpd [Service] ExecStart=/usr/sbin/in.tftpd -s /tftpboot StandardInput=socket [Install] Also=tftp.socket
Start tftp:
systemctl enable tftp systemctl start tftp systemctl status tftp
TFTP setting (RHEL7)
yum install tftp tftp-server yum install syslinux-tftpboot syslinux ???
Bryan (if installing from scratch, not sure if needed):
yum install nfs-utils tftp-server syslinux-tftpboot syslinux yum install dnsmasq mkdir /tftpboot grub2-mknetdir --net-directory=/tftpboot/efi
Create file /etc/systemd/system/tftp.service:
[Unit] Description=Tftp Server Requires=tftp.socket Documentation=man:in.tftpd ##After=network.target network-online.target ??? [Service] #ExecStart=/usr/sbin/in.tftpd -s /var/lib/tftpboot ExecStart=/usr/sbin/in.tftpd -s /tftpboot StandardInput=socket [Install] Also=tftp.socket
Start tftp:
systemctl enable tftp systemctl start tftp #systemctl start tftp.socket ??
Check status:
systemctl status tftp ?? systemctl status tftp.socket
OLD RHEL7
Installation:
yum install tftp tftp-server* xinetd*
DONOTDOIT Edit file /etc/xinetd.d/tftp: set 'disable=no', add '-c' to server_args, and change directory to '/tftpboot'
service tftp { socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -c -s /tftpboot disable = no per_source = 11 cps = 100 2 flags = IPv4 }
Edit /usr/lib/systemd/system/tftp.service': add '-c' to the list of options, and change directory to '/tftpboot'
[Unit] Description=Tftp Server Requires=tftp.socket Documentation=man:in.tftpd [Service] ExecStart=/usr/sbin/in.tftpd -c -s /tftpboot StandardInput=socket [Install] Also=tftp.socket
Enable and Start TFTP Service
systemctl enable xinetd systemctl enable tftp systemctl start xinetd systemctl start tftp
After these two commands, permanent links will be made for xinetd and TFTP services.
old (solaris)
Tftp is used in particular to download images into ROCs, PMCs and IOCs. To activate, uncomment following line in /etc/inetd.conf file:
tftp dgram udp6 wait root /usr/sbin/in.tftpd in.tftpd -s /tftpboot
and run
inetconv
to generate manifest file. Start 'tftp' service:
svcadm enable /network/tftp/udp6
Create directorory /tftpboot. All files you want to download using 'tftp' must be placed in that directory. Normally you will copy all files from another machine running 'tftp' service.