This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| 
                    использование_протокола_tftp [2009/10/28 09:59] val  | 
                — (current) | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Использование протокола TFTP ====== | ||
| - | ===== Штатный сервер TFTP ===== | ||
| - | <code> | ||
| - | [gate:~] # grep tftp /etc/inetd.conf  | ||
| - | tftp dgram udp  wait  root /usr/libexec/tftpd  tftpd -l -s /tftpboot | ||
| - | [gate:~] # mkdir /tftpboot | ||
| - | [gate:~] # cat /tftpboot/test.txt | ||
| - | Hello | ||
| - | World | ||
| - | |||
| - | [gate:~] # /etc/rc.d/inetd rcvar | ||
| - | |||
| - | [gate:~] # cat /etc/rc.conf | ||
| - | ... | ||
| - | inetd_enable=YES | ||
| - | ... | ||
| - | |||
| - | [gate:~] # /etc/rc.d/inetd start | ||
| - | Starting inetd. | ||
| - | </code> | ||
| - | |||
| - | Разрешаем создание файлов (разобраться с правами на каталог) | ||
| - | <code> | ||
| - | [gate:~] # grep tftp /etc/inetd.conf  | ||
| - | tftp dgram udp  wait  root /usr/libexec/tftpd  tftpd -l -w -s /tftpboot | ||
| - | </code> | ||
| - | |||
| - | ===== Сервер UTFTP ===== | ||
| - | <code> | ||
| - | # pkg_add -r utftpd | ||
| - | |||
| - | # cd /usr/local/etc/ | ||
| - | |||
| - | # cat utftpd.conf | ||
| - | client default { | ||
| - | uid=nobody; | ||
| - | dir="/tftpboot"; | ||
| - | read="/"; | ||
| - | write="/"; | ||
| - | create="/"; | ||
| - | } | ||
| - | |||
| - | # chown -R nobody /tftpboot/ | ||
| - | |||
| - | # rehash | ||
| - | |||
| - | # utftpd_make utftpd.conf.cdb utftpd.conf.tmp utftpd.conf | ||
| - | |||
| - | # grep tftp /etc/inetd.conf | ||
| - | tftp dgram udp  wait  root /usr/local/sbin/utftpd  utftpd -c /usr/local/etc/utftpd.conf.cdb | ||
| - | |||
| - | # /etc/rc.d/inetd restart | ||
| - | </code> | ||