Ubuntu 11.04下安装 TFTP Server的步骤

发布时间:2020-07-24编辑:脚本学堂
Ubuntu 11.04下安装 TFTP Server的步骤

Ubuntu 11.04下安装 TFTP Server的步骤,由脚本学堂收集整理,本文应该是英译的,大家注意文中的用词。

安装来新的Ubuntu 11.04版本:
root@ubuntu:/etc/init.d# uname -r
2.6.38-8-generic
root@ubuntu:/etc/init.d# uname -a
linux ubuntu 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 2011 i686 i686 i386 GNU/Linux
root@ubuntu:/etc/init.d# cat /etc/issue
Ubuntu 11.04 n l
root@ubuntu:/etc/init.d# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=11.04
DISTRIB_CODENAME=natty
DISTRIB_DESCRIPTION="Ubuntu 11.04"
 
I have started my trails with TFTP as follows:
 
1. Installed tftpd and related packages.
root@ubuntu: sudo apt-get install xinetd tftpd tftp

2. edit the file entry in /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
}

3. I Made /tftpboot directory
root@ubuntusudo: mkdir -p /tftpboot
root@ubuntusudo: chmod 777 /tftpboot
root@ubuntusudo: chown nobody /tftpboot

4. Stop and Started tftpd through xinetd
root@ubuntu:/etc/init.d# sudo /etc/init.d/xinetd stop
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service xinetd stop
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) utility, e.g. stop xinetd
xinetd stop/waiting
$ sudo /etc/init.d/xinetd start
root@ubuntu:/etc/init.d# sudo /etc/init.d/xinetd start
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service xinetd start
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start xinetd

5. checked the Xinetd & tftp status
root@ubuntu:/etc/init.d# ps -e | grep xinetd
root@ubuntu:/etc/init.d# chkconfig | grep xinetd
tftp                        xinetd
xinetd                      off
root@ubuntu:/etc/init.d# chkconfig | grep tftp
atftpd                      on
tftp                        xinetd

6. 在/tftpboot目录下,创建一个文件,名为:test.
执行 tftp localhost
tftp> get test
tftp> q
albert@albert-virtual-machine:~/src/app_linux/pld_service$ ls
test
测试成功!