**:
為了方便配置,最好用root帳戶
安裝tftp-hpa tftpd-hpa xinetd
sudo apt-get install tftp-hpa tftpd-hpa xinetd
在根目錄下建立資料夾/tftpboot/root
修改目錄許可權chmod -r 777 /tftpboot/root
修改tftp配置檔案,如果沒有就建立
#gedit /etc/xinetd.d/tftp
service tftp
修改inetd.conf檔案
# gedit /etc/inetd.conf
tftp dgram udp wait nobody /usr/sbin/tcpd
/usr/sbin/in.tftpd /tftpboot/root
其中/tftpboot/root為 tftp共享目錄
修改tftpd-hpa檔案
# vim /etc/default/tftpd-hpa
#run_daemon="no"
#options="-s /tftpboot/root -c -p -u tftpd"
tftp_username="tftp"
tftp_directory="/tftpboot/root"
tftp_address="0.0.0.0:69"
tftp_options="-l -c -s"
4、從新啟動服務
/etc/init.d/xinetd restart
檢查tptp是否開啟:chkconfig --list 如果沒有開啟,則用這個命令也可以開啟:chkconfig tftp on
或者用ps -a | grep tftp看是否有tftpd的服務~
在/tftpboot/root下建立測試檔案***
#cd /tftpboot/root
#touch ***
#chmod 777 ***
測試一下 tftp服務:
#cd /
#tftp 127.0.0.1
tftp>get ***
tftp>q
#ls檢視當前目錄,發現***檔案已在當前目錄
如果上述設定還不行的話,那麼就要把selinux禁用掉:
#gedit /etc/selinux/config //如果沒有selinux/config這個檔案,則建立。
# this file controls the state of selinux on the system.
# selinux= can take one of these three values:
# enforcing - selinux security policy is enforced.
# permissive - selinux prints warnings instead of enforcing.
# disabled - selinux is fully disabled.
selinux=enforcing
# selinuxtype= type of policy in use. possible values are:
# targeted - only targeted network daemons are protected.
# strict - full selinux protection.
selinuxtype=targeted
把上面的selinux=enforcing 改為:selinux=disable 禁用selinux
然後reboot重啟pc
重啟後再進行tftp測試。
ubuntu tftp服務安裝和配置
1 安裝相關軟體包 ubuntu tftp 服務端 tftp 客戶端 xinetd sudo apt get install tftpd tftp xinetd 2 建立配置檔案 在 etc xinetd.d 下建立乙個配置檔案tftp sudo vim tftp在檔案中輸入以下內容 service...
ubuntu tftp服務的配置
ubuntu tftp服務的配置步驟 sudo apt get install tftpd tftp xinetd 2 建立配置檔案 在 etc xinetd.d 下建立乙個配置檔案tftp sudo vim tftp 在檔案中輸入以下內容 service tftp 儲存退出 sudo mkdir ...
Ubuntu tftp服務的步驟配置
配置ubuntu tftp服務的步驟 ubuntu tftp 服務端 tftp 客戶端 xinetd sudo apt get install tftpd tftp xinetd 2 建立配置檔案 在 etc xinetd.d 下建立乙個配置檔案 tftp sudo vi tftp 在檔案中輸入以下...