ubuntu11.10下tftp服务器配置宝典

ubuntu系统升级为11.10后,在tftp服务器总是出现这样那样的问题。网上找了很多,没有找到一个完整的没有错误的。这是我自己经测试完全通过。

微笑  

1  ctrl+alt+t  进入终端

su root   切换 并装四个文件
sudo apt-get install tftp-hpa
sudo apt-get install tftpd-hpa
sudo apt-get install openbsd-inetd
sudo apt-get install xinetd


2  去建立一个根目录,然后设置对应的访问属性
  sudo mkdir /tftpboot
  chmod 777 /tftpboot -R
3  更改配置文件
  root@ubuntu:/tftpboot# sudo vi /etc/default/tftpd-hpa




 TFTP_USERNAME="root"
 TFTP_DIRECTORY="/tftpboot"
 TFTP_ADDRESS="0.0.0.0:69"
 TFTP_OPTIONS="--secure -c"
4 启动ftp服务 和测试 
 root@ubuntu:/home/zk# sudo /etc/init.d/xinetd restart
 Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service xinetd restart


Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) and then start(8) utilities,
e.g. stop xinetd ; start xinetd. The restart(8) utility is also available.
xinetd stop/waiting
xinetd start/running, process 4013
root@ubuntu:/home/zk# tftp localhost
tftp> put zk.c
tftp> quit


root@ubuntu:/# cd / tftpboot
root@ubuntu:/tftpboot# ls
 zk.c












root@ubuntu:/home/zk# sudo /etc/init.d/xinetd restart
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service xinetd restart


Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) and then start(8) utilities,
e.g. stop xinetd ; start xinetd. The restart(8) utility is also available.
xinetd stop/waiting
xinetd start/running, process 4013
root@ubuntu:/home/zk# netstat -a|grep tftp
udp        0      0 *:tftp                  *:*    

微笑

root@ubuntu:/home/zk# tftp localhost
tftp> put zk.c
tftp> quit
root@ubuntu:/home/zk# cd /
root@ubuntu:/# ls
bin    dir     hello1.tar  initrd.img.old  mnt   sbin     tftpboot  vmlinuz
boot   dir1    home        lib             opt   selinux  tmp       vmlinuz.old
cdrom  etc     host        lost+found      proc  srv      usr       zk
dev    hello1  initrd.img  media           root  sys      var
root@ubuntu:/# cd tftpboot/
root@ubuntu:/tftpboot# ls
hello.c  zk.c
root@ubuntu:/tftpboot# 




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值