centos7でも入れたけどcentos8でも必要そう
実施は RHEL8
# dnf -y install tftp tftp-server xinetd
Updating Subscription Management repositories.
メタデータの期限切れの最終確認: 0:24:13 時間前の 2019年09月05日 15時31分43秒 に 実施しました。
依存関係が解決しました。
================================================================================
パッケージ アーキテクチャー
バージョン リポジトリ サイズ
================================================================================
Installing:
tftp-server x86_64 5.2-24.el8 rhel-8-for-x86_64-appstream-rpms 50 k
xinetd x86_64 2:2.3.15-23.el8 rhel-8-for-x86_64-appstream-rpms 135 k
tftp x86_64 5.2-24.el8 rhel-8-for-x86_64-appstream-rpms 42 k
トランザクションの概要
================================================================================
インストール 3 パッケージ
ダウンロードサイズの合計: 227 k
インストール済みのサイズ: 397 k
パッケージのダウンロード中です:
(1/3): tftp-server-5.2-24.el8.x86_64.rpm 156 kB/s | 50 kB 00:00
(2/3): tftp-5.2-24.el8.x86_64.rpm 125 kB/s | 42 kB 00:00
(3/3): xinetd-2.3.15-23.el8.x86_64.rpm 375 kB/s | 135 kB 00:00
--------------------------------------------------------------------------------
合計 621 kB/s | 227 kB 00:00
トランザクションの確認を実行中
トランザクションの確認に成功しました。
トランザクションのテストを実行中
トランザクションのテストに成功しました。
トランザクションを実行中
準備 : 1/1
Installing : tftp-5.2-24.el8.x86_64 1/3
Installing : xinetd-2:2.3.15-23.el8.x86_64 2/3
scriptletの実行中: xinetd-2:2.3.15-23.el8.x86_64 2/3
Installing : tftp-server-5.2-24.el8.x86_64 3/3
scriptletの実行中: tftp-server-5.2-24.el8.x86_64 3/3
検証 : tftp-server-5.2-24.el8.x86_64 1/3
検証 : xinetd-2:2.3.15-23.el8.x86_64 2/3
検証 : tftp-5.2-24.el8.x86_64 3/3
Installed products updated.
インストール済み:
tftp-server-5.2-24.el8.x86_64 xinetd-2:2.3.15-23.el8.x86_64
tftp-5.2-24.el8.x86_64
完了しました!
次に設定が/etc/xinetd.d/に入らないので作る。
# cat <<EOM >/etc/xinetd.d/tftp service tftp { disable = no socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -c -u root -s /var/lib/tftpboot per_source = 11 cps = 100 2 flags = IPv4 } EOM #
穴あけと起動実施は RHEL8
# firewall-cmd --add-service=tftp --zone=public --permanent # firewall-cmd --reload # systemctl start xinet # systemctl enable xinet
xinetが無いと怒られる様になっていたらtftpを直接指定してあげる。
# systemctl start tftp # systemctl enable tftp
待ち受けている確認
# lsof -i:69
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
xinetd 24899 root 5u IPv4 3025844 0t0 UDP *:tftp