2008年6月26日 星期四

Ubuntu install tftp Server

安裝Tftp Server 有兩種方法
第1種
1. sudo apt-get install tftp-hpa
2. vi /etc/default/tftp-hpa
#Defaults for tftpd-hpa
RUN_DAEMON="yes"
OPTIONS="-l -s /var/lib/tftpboot"
3. reboot
4. netstat -a | grep tftp
if you get this -sudo /etc/init.d/xinetd restart> udp 0 0 *:tftp *:*
It means the tftp server daemon is up.
5. Now you can put the files into /var/lib/tftpboot directory and start to download from client.

第2種
1、安装軟體
apt-get install tftpd (Server)
apt-get install tftp (Client)
apt-get install xinetd

2、Configuration for tftp server
sudo vim /etc/xinetd.d/tftp

=====edit===
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpserver
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}
==========================


3、Creat folder for tftp server
mkdir /tftpserver
sudo chmod -R 777 /tftpserver

4、Restart xinetd service
/etc/init.d/xinetd restart

沒有留言: