TFTP Installation

از ویکی پارس پویش
پرش به: ناوبری, جستجو

Installing and setting TFTPD in Ubuntu

1. Install tftpd and related packages.

apt-get install xinetd tftpd tftp

2. Create /etc/xinetd.d/tftp and put this entry:

service tftp
{           
protocol        = udp
port            = 69 
socket_type     = dgram
wait            = yes  
user            = nobody
server          = /usr/sbin/in.tftpd
server_args     = /tftpboot         
disable         = no
}

3. Make /tftpboot directory

mkdir /tftpboot
chmod -R 777 /tftpboot
chown -R nobody /tftpboot

4. Start tftpd through xinetd

/etc/init.d/xinetd start

5. Testing. Tranfering file hda.txt from 192.168.1.100 (Client using tftp) to 192.168.1.100 (Server 192.168.1.100). Get an example file to transfer (eg. hda.txt)

$ touch /tftpboot/hda.txt
$ chmod 777 /tftpboot/hda.txt
$ ls -l /tftpboot/
total 0
-rwxrwxrwx 1 davids davids 0 2006-03-27 23:04 hda.txt
$ tftp 192.168.1.100
tftp> put hda.txt
Sent 722 bytes in 0.0 seconds
tftp> quit
$ ls -l /tftpboot/
total 4
-rwxrwxrwx 1 davids davids 707 2006-03-27 23:07 hda.txt


another way of installation:

apt-get install tftpd-hpa

edit the following file:

vi /etc/default/tftpd-hpa

RUN_DAEMON="yes"
OPTIONS="-l -s /tftpboot"

start the tftpd service:

/etc/init.d/tftpd-hpa restart
ابزارهای شخصی

گویش‌ها
فضاهای نام
عملکردها
گشتن
جعبه‌ابزار