本文转载自:https://blog.csdn.net/donglicaiju76152/article/details/76651210

背景

按说在Linux下安装tftp server 很简单,之前操作过很多次了。这次也是直接从网上搜索,搜出了很多内容。之前都是在Centos下安装的,这次是第一次在Ubuntu下安装,看那些内容有些不太一样,但是大同小异。


失败方案

下面的操作是按照网上来的:

安装软件

apt-get install xinetd tftp tftpd

修改配置文件

vi /etc/xinetd.d/tftp

service tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = -s /root/tftpboot -c
disable = no
}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

创建目录

mkdir /root/tftpboot
chmod 777 /root/tftpboot

启动服务

/etc/init.d/xinetd restart

查看服务

netstat -an | more | grep udp
udp 0 0 0.0.0.0:69 0.0.0.0:*

测试

tftp 127.0.0.1
tftp> get hello
Error code 2: Access violation

此次出现了错误,网上也众说不一。
最终的解决方案是:vi /etc/inetd.conf
注释掉下面这句话:
tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /root/tftpboot

再次测试

Transfer timed out

直接无语,安装个TFTP这么折腾,再次上网搜索,终于发现了一篇文章。他里面给出的结论是上面的操作也是不成功的,接着给出了新的解决方案。

成功方案

安装软件

apt-get install tftp-hpa tftpd-hpa xinetd

修改配置

vi /etc/default/tftpd-hpa

TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/root/tftpboot"
TFTP_ADDRESS=":69"
TFTP_OPTIONS="--secure -c"
  • 1
  • 2
  • 3
  • 4

重启服务

service tftpd-hpa restart

测试

tftp 127.0.0.1
tftp> get hello
tftp> quit

成功!

NFS

安装软件

apt-get install nfs-kernel-server

修改配置

vi /etc/exports
/root/rootfs *(rw,sync,no_root_squash)
exportfs -a

重启服务

/etc/init.d/rpcbind restart
/etc/init.d/nfs-kernel-server restart

测试

mount -t nfs 192.168.2.104:/root/rootfs /mnt/

参考

http://liucw.blog.51cto.com/6751239/1223695
http://jacoxu.com/ubuntu-14-04%E4%B8%8Bnfs%E5%AE%89%E8%A3%85%E9%85%8D%E7%BD%AE/
https://unix.stackexchange.com/questions/106122/mount-nfs-access-denied-by-server-while-mounting-on-ubuntu-machines

---------------------

本文来自 donglicaiju76152 的CSDN 博客 ,全文地址请点击:https://blog.csdn.net/donglicaiju76152/article/details/76651210?utm_source=copy

Ubuntu 14.04 下安装 TFTP 艰辛之路【转】的更多相关文章

  1. Ubuntu 14.04下安装功能强大的屏幕截图软件 Shutter

    [注释]试用了一下,果然很强大,牛逼 一款功能强大的屏幕截图软件——Shutter,Shutter最基本的就是截图功能了,在设计上可以自由选定区域,同时选定之 后依然可以通过上下左右四个地方来改变选区 ...

  2. 分布式进阶(二)Ubuntu 14.04下安装Dockr图文教程(一)

    当前,完全硬件虚拟化技术(KVM.Xen.Hyper-V 等)能在一个物理主机上很好地运行多个互相独立的操作系统,但这也带来一些问题:性能不佳,资源浪费,系统反应迟缓等.有时候对用户来说,完全的硬件虚 ...

  3. Ubuntu 14.04 下安装 OpenCV

    参考: Installation in Linux Error compiling OpenCV, fatal error: stdlib.h: No such file or directory 图 ...

  4. Ubuntu 14.04 下 安装Protocol Buffers

    参考: Protocol Buffers - Google's data interchange format Ubuntu 14.04 下 安装Protocol Buffers 环境 Ubuntu ...

  5. Ubuntu 14.04 下安装Skype

    操作1: Ubuntu 14.04 下安装Skype,使用 Ctr+Alt+T组合键打开终端Terminal,输入如下即可: wget -O skype.deb http://download.sky ...

  6. 分布式进阶(四)Ubuntu 14.04下安装Tomcat 6

    Ubuntu 10.04下安装Tomcat 6 1,下载apache-tomcat6, 地址链接:http://archive.apache.org/dist/tomcat/tomcat-6/v6.0 ...

  7. [硬件配置]记录Ubuntu 14.04 下安装无线网卡驱动解决无法连接WiFi的过程

    新电脑安装了Ubuntu 14.04,但是网络连接中只有以太网而没有WiFi的选项. 打开System Setting系统设置-Software&Updates软件&更新-Additi ...

  8. Ubuntu 14.04下安装GitLab指南

    摘要 GitLab 是一个用于仓库管理系统的开源项目.使用Git作为代码管理工具,并在此基础上搭建起来的web服务. 在GitLab的官方网站上面对Ubuntu的支持也是很好的,有比较详尽的安装指南. ...

  9. Ubuntu 14.04下安装CUDA8.0

    配置环境如下: 系统:Ubuntu14.04 64bit 显卡:Nvidia K620M 显卡驱动:Nvidia-Linux-x86_64-375.66.run CUDA8.0 +  cudnn8.0 ...

随机推荐

  1. 【Thinkphp5】结合layer弹窗 定制操作结果页面

    1 打开应用公共文件页面    appliction/common.php,编写以下代码 注意: 成功消息的绿色背景部分是iframe 框架写法,如果是普通页面.就吧parent去除,改为: self ...

  2. LeetCode——N-Queens

    Description: The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that n ...

  3. [SCOI2008] 着色方案[高维dp]

    321. [SCOI2008] 着色方案 ★★★   输入文件:color.in   输出文件:color.out   简单对比时间限制:1 s   内存限制:64 MB 题目背景: 有n个木块排成一 ...

  4. 【转】DevOps的前世今生

    转自:http://www.infoq.com/cn/news/2016/09/learn-devops-from-reports 目前在国外,互联网巨头如Google.Facebook.Amazon ...

  5. Portal是用来干什么的?

    portal是指一个门户网站 例如sina就采用了Portal技术 他是.net的一个开源的网站模版什么是Portal?英文字面是“入口”,国内有叫“门户”技术的,但我觉得“集成”技术更能表达它的意思 ...

  6. WCF(二) 使用配置文件实现WCF应用程序

    服务三要素ABCA:Address 在哪里 (包含传输方式的信息)B:Binding 怎么实现(与地址的传输方式要匹配)C:Contract做什么(服务契约) namespace WCFService ...

  7. ehcache加载配置文件ehcache.xml的源码

    package net.sf.ehcache.config; public final class ConfigurationFactory { public static Configuration ...

  8. GROUPING SETS与GROUP_ID

    SELECT E.DEPARTMENT_ID DID, E.JOB_ID JOB, E.MANAGER_ID MID, SUM(E.SALARY) SUM_SAL, COUNT(E.EMPLOYEE_ ...

  9. log4j配置输出到多个日志文件(转)

    參考资料:http://logging.apache.org/log4j/1.2/manual.html 通常我们项目里,有一些重要的日志想单独的输出到指定的文件,而不是全总输出到系统的日志文件中.那 ...

  10. xpath定位方法小结(转载)

    1.实例化一个浏览器WebDriver driver = new FirefoxDriver(); 2.driver.get() get传参数到浏览器中 3.常用定位方法webelement XX=d ...