本文转载自: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. chkconfig --add失败的处理方法

    author: headsen  chen datet:2018-08-30   11:57:49 1,在/etc/init.d/下面添加两个文件,并授予 +X 的权限,效果如下: 2,添加到开启自启 ...

  2. 【Mac】Docker安装及基础使用

    Docker 安装 在 Mac OS X 系统中,首先你要下载安装包安装:Docker Toolbox 安装过程中,可以选择是否安装 Docker Machine,Docker Compose 等,默 ...

  3. 微信小程序 --- page.json文件

    page.json 文件用于配置当前目录.page.json文件里的配置可以修改 app.json 配置里面的 window:不能覆盖app.json文件里面的 tabBar / 网络超时/ debu ...

  4. ThinkPHP简单结构介绍!

    thinkPHP简单结构介绍: application : 应用 extend:扩展 扩展内库 public:入口文件 index.php 在里面 runtime:缓存文件(里面的文件可以随便删除) ...

  5. [Android Tips] 30.如何在 Android Studio 中一次性格式化所有代码

    在目录上面右击,有 Reformat Code Ctrl + Alt + L 参考 如何在IntelliJ IDEA或Android Studio中一次性格式化所有代码?

  6. 170717、springboot编程之mybatis数据库开发和aop拦截

    一.springboot整合mybaits (1)新建maven project; 新建一个maven project,取名为:spring-boot-mybatis (2)在pom.xml文件中引入 ...

  7. Grafana+Prometheus监控

    添加模板一定要看说明以及依赖 监控redis https://blog.52itstyle.com/archives/2049/ http://www.cnblogs.com/sfnz/p/65669 ...

  8. Integer.valueof 和 Integer.parseInt

    System.out.println(Integer.valueOf("127")==Integer.valueOf("127")); System.out.p ...

  9. Python开发【模块】:logging日志

    logging模块 很多程序都有记录日志的需求,并且日志中包含的信息即有正常的程序访问日志,还可能有错误.警告等信息输出,python的logging模块提供了标准的日志接口,你可以通过它存储各种格式 ...

  10. Linux 系统默认运行级别设定

    #vi /etc/inittab,将 id:5:initdefault: 改为 id:3:initdefault: Linux 系统任何时候都运行在一个指定的运行级上,并且不同的运行级的程序和服务都不 ...