tftp インストール手順
http://extstrg.asabiya.net/pukiwiki/index.php?tftp%20%A5%A4%A5%F3%A5%B9%A5%C8%A1%BC%A5%EB%BC%EA%BD%E7サーバ関連
目次
概要 †
TFTPサービスのインストール手順。
環境情報 †
OS | Rocky Linux release 8.9 |
TFTP | tftp-server-5.2-26.el8.x86_64 |
インストール手順 †
- パッケージインストール
dnf install -y tftp-server tftp
- 実行結果
==================================================================================================================================== パッケージ アーキテクチャー バージョン リポジトリー サイズ ==================================================================================================================================== インストール: tftp x86_64 5.2-26.el8 appstream 41 k tftp-server x86_64 5.2-26.el8 appstream 49 k トランザクションの概要 ==================================================================================================================================== インストール 2 パッケージ ダウンロードサイズの合計: 91 k インストール後のサイズ: 115 k パッケージのダウンロード: scriptletの実行中: tftp-server-5.2-26.el8.x86_64 1/2 インストール中 : tftp-5.2-26.el8.x86_64 2/2 scriptletの実行中: tftp-5.2-26.el8.x86_64 2/2 検証 : tftp-5.2-26.el8.x86_64 1/2 検証 : tftp-server-5.2-26.el8.x86_64 2/2 インストール済み: tftp-5.2-26.el8.x86_64 tftp-server-5.2-26.el8.x86_64 完了しました!
- 実行結果
- 設定ファイルの作成
cp /usr/lib/systemd/system/tftp.service /etc/systemd/system/tftp-server.service cp /usr/lib/systemd/system/tftp.socket /etc/systemd/system/tftp-server.socket
- 起動設定の投入
tee /etc/systemd/system/tftp-server.service<<EOF [Unit] Description=Tftp Server Requires=tftp-server.socket Documentation=man:in.tftpd [Service] ExecStart=/usr/sbin/in.tftpd -c -p -s /var/lib/tftpboot StandardInput=socket [Install] WantedBy=multi-user.target Also=tftp-server.socket EOF
- サービスの起動
systemctl daemon-reload systemctl enable --now tftp-server
- 実行結果
Created symlink /etc/systemd/system/multi-user.target.wants/tftp-server.service → /etc/systemd/system/tftp-server.service. Created symlink /etc/systemd/system/sockets.target.wants/tftp-server.socket → /etc/systemd/system/tftp-server.socket.
- 実行結果
- サービスの動作確認
systemctl status tftp-server
- 実行結果
● tftp-server.service - Tftp Server Loaded: loaded (/etc/systemd/system/tftp-server.service; enabled; vendor preset: disabled) Active: active (running) since Mon 2024-01-08 11:39:39 JST; 5s ago Docs: man:in.tftpd Main PID: 3992 (in.tftpd) Tasks: 1 (limit: 23012) Memory: 180.0K CGroup: /system.slice/tftp-server.service └─3992 /usr/sbin/in.tftpd -c -p -s /var/lib/tftpboot 1月 08 11:39:39 mgt-sv systemd[1]: Started Tftp Server.
- 実行結果
- ディレクトリの権限変更
chmod 777 /var/lib/tftpboot
- Firewallポリシーの追加(必要な場合)
firewall-cmd --add-service=tftp --permanent firewall-cmd --reload
操作 †
基本操作 †
- 接続
tftp [SERVER IP]
- ファイルの取得
tftp> get [FILENAME]
Last-modified: 2024-01-08 (月) 11:57:26 (110d)