Ubuntu下配置tftp服务器

1、安装

[bash]
sudo apt-get install tftp tftpd xinetd
[/bash]

2、新建目录

[bash]
mkdir /home/liheyuan/tftpd/
chmod 777 /home/liheyuan/tftpd/
sudo chown -R nobody /home/liheyuan/tftpd/
[/bash]

3、配置

创建/etc/xinetd.d/tftp
内容如下:
[bash]
service tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = -s /home/liheyuan/tftpd
disable = no
}
[/bash]

编辑/etc/inetd.conf
更改为:
[bash]
tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd -s /srv/tftp
[/bash]

4、启动和停止
[bash]
sudo /etc/init.d/xinetd start
[/bash]

Leave a Reply

Your email address will not be published. Required fields are marked *