ubuntu13.10下到tftp的配置與使用

由於與紅帽不同不要使用這樣到方法安裝sudo apt-get install tftpd tftp xinetd,請使用以下到方法安裝


1、安裝軟件包

      sudo apt-get install tftpd-hpa tftp-hpa

      其中tftpd-hpa是服務程序,tftp-hpa是客戶端。


2、修改配置文件

      vim /etc/default/tftpd-hpa

      # /etc/default/tftpd-hpa

      TFTP_USERNAME="tftp"
      TFTP_DIRECTORY="/home/xxx/tftpboot"
      TFTP_ADDRESS="0.0.0.0:69"
      TFTP_OPTIONS="-l -c -s"

      前三條不解釋,一看就明白,TFTP_OPTIONS的三個選項的解釋如下:

      -l, --listen
              Run the server in standalone (listen) mode, rather than run from inetd.  In listen mode, the  --timeout  option  is  ignored,  and  the --address option can be used to specify a specific local address or port to listen to.

      --create, -c
              Allow new files to be created.  By default, tftpd will only allow upload of files that already exist.  Files are created  with  default permissions allowing anyone to read or write them, unless the --permissive or --umask options are specified.

      --secure, -s
              Change  root  directory  on startup.  This means the remote host does not need to pass along the directory as part of the transfer, and may add security.  When --secure is specified, exactly one directory should be specified on the command line.  The use of  this  option is recommended for security as well as compatibility with some boot ROMs which cannot be easily made to include a directory name in its request.


  3.系統默認tftp的服務是隨機啓動的,如需手動開啓、關閉、重啓tftp服務,分別執行以下命令即可:

             sudo service tftpd-hpa start

             sudo service tftpd-hpa stop

             sudo service tftpd-hpa restart
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章