ubuntu10.04中配置tftp,並修改設定檔

來源:互聯網
上載者:User

1、安裝

sudo apt-get install tftp

sudo apt-get install xinetd

 

2、建立共用目錄

sudo mkdir /tftpboot

3、把共用目錄修改為最大許可權

sudo chmod 777 tftpboot

4、修改設定檔(/etc/inetd.conf)

1、我們看下我們預設的設定檔,設定檔如下

# /etc/inetd.conf:  see inetd(8) for further informations.

#

# Internet superserver configuration database

#

#

# Lines starting with "#:LABEL:" or "#<off>#" should not

# be changed unless you know what you are doing!

#

# If you want to disable an entry so it isn't touched during

# package updates just comment it out with a single '#' character.

#

# Packages should modify this file by using update-inetd(8)

#

# <service_name> <sock_type> <proto> <flags> <user> <server_path> <args>

#

#:INTERNAL: Internal services

#discardstreamtcpnowaitrootinternal

#discarddgramudpwaitrootinternal

#daytimestreamtcpnowaitrootinternal

#timestreamtcpnowaitrootinternal

#:STANDARD: These are standard services.

#:BSD: Shell, login, exec and talk are BSD protocols.

#:MAIL: Mail, news and uucp services.

#:INFO: Info services

#:BOOT: TFTP service is provided primarily for booting.  Most sites

#       run this only on machines acting as "boot servers."

tftpdgramudpwaitnobody/usr/sbin/tcpd/usr/sbin/in.tftpd /srv/tftp

#:RPC: RPC based services

#:HAM-RADIO: amateur-radio services

#:OTHER: Other services

 

2、修改設定檔內容(添加我們剛才建立的共用工作資料夾)

把該行tftpdgramudpwaitnobody/usr/sbin/tcpd/usr/sbin/in.tftpd /srv/tftp

改為tftpdgramudpwaitnobody/usr/sbin/tcpd/usr/sbin/in.tftpd /tftpboot

5、啟動tftp伺服器

sudo /etc/init.d/xinetd restart

sudo in.tftpd -l /tftpboot

6、測試

1、在共用資料夾中建立一個檔案

touch test.txt

2、啟動tftp

tftp 192.168.0.148

說明,ip地址是自己的ip地址,查詢方法,ifconfig

3、get test.txt

如果在當前檔案夾看到test.txt則設定成功,否則重新檢查配置

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.