萬丈高樓平底起:紅帽7系搭建TFTP伺服器

來源:互聯網
上載者:User

標籤:linux   rhce   centos   7   tftp   

TFTP是簡單檔案傳輸通訊協定,PXE部署過程中用來傳輸初始啟動程式、核心及設定檔。

以下實驗在CENTOS 7.2上完成

    

[[email protected] ~]# cat /etc/redhat-release

CentOS Linux release 7.2.1511 (Core)

[[email protected] ~]# uname -r

3.10.0-327.10.1.el7.x86_64

YUM直接安裝

[[email protected] ~]# yum -y install tftp-server

RPM檢查設定檔路徑

[[email protected] ~]# rpm -qc tftp-server

/etc/xinetd.d/tftp

修改設定檔

disable改為no啟用tftp服務

-c 允許tftp寫入

-vvv記錄詳細日誌,此參數在寫在最後

/var/lib/tftpboot是預設tftp主目錄,如果修改此路徑要記得設定selinux相關許可權

disable                 = no

server_args             = -s -c /var/lib/tftpboot -vvv

修改完設定檔後重啟守護進程xinetd生效

[email protected] ~]# systemctl restart xinetd.service

配置開機自動運行xinetd進程

[[email protected] ~]# systemctl enable xinetd.service

檢查xinetd啟動狀態

[[email protected] ~]# systemctl status xinetd.service

● xinetd.service - Xinetd A Powerful Replacement For Inetd

   Loaded: loaded (/usr/lib/systemd/system/xinetd.service; disabled; vendor preset: enabled)

   Active: active (running) since Thu 2016-03-10 08:51:30 EST; 17s ago

防火牆開啟的話允許tftp流量,perment參數表示永久生效,無此參數此防火牆規則在重啟後失效。

 firewall-cmd --add-service=tftp --permenent

重啟防火牆服務,生效上述規則

[[email protected] ~]# systemctl restart firewalld.service

檢查tftp連接埠監聽狀態

ss -ul | grep tftp

[[email protected] ~]# ss -ul | grep tftp

UNCONN     0      0          *:tftp                     *:*

UNCONN     0      0         :::tftp                    :::*

萬丈高樓平底起:紅帽7系搭建TFTP伺服器

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.