TFTP Server On Debian
posted on 13 Aug 2009 21:43 by jexplorer
apt-get install xinetd tftpd tftp -y
- สร้างไฟล์ config tftp ด้วยคำสั่ง
vim /etc/xinetd.d/tftp
โดยเพิ่มข้อความดังนี้
service tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /tftpboot
disable = no
}
- จัดเจตีรยม Directory สำหรับเก็บข้อมูล
mkdir /tftpboot
chmod -R 777 /tftpboot
chown -R nobody /tftpboot
- Restart xinetd ซักทีเพื่อใช้งาน tftp
/etc/init.d/xinetd restart
- ทดสอบการทำงานกันเริ่มจาก สร้างไฟล์ทดสอบก่อน
[code]echo test > /tftpboot/aaa[/code]
- ทดสอบ tftp (192.168.1.30 คือ ip ของ server)
tftp 192.168.1.30
tftp> get aaa
Received 6 bytes in 0.0 seconds
tftp> quit
- ถ้าบน window ก็ลองโดยใช้คำสั่งเช่น
tftp -i 192.168.1.30 get zImageN35
จะได้ดังนี้
![]()
เป็นอันใช้งานได้แล้วเย้!