Ubuntu 14.04 下安装 TFTP 艰辛之路【转】
本文转载自: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 艰辛之路【转】的更多相关文章
- Ubuntu 14.04下安装功能强大的屏幕截图软件 Shutter
		
[注释]试用了一下,果然很强大,牛逼 一款功能强大的屏幕截图软件——Shutter,Shutter最基本的就是截图功能了,在设计上可以自由选定区域,同时选定之 后依然可以通过上下左右四个地方来改变选区 ...
 - 分布式进阶(二)Ubuntu 14.04下安装Dockr图文教程(一)
		
当前,完全硬件虚拟化技术(KVM.Xen.Hyper-V 等)能在一个物理主机上很好地运行多个互相独立的操作系统,但这也带来一些问题:性能不佳,资源浪费,系统反应迟缓等.有时候对用户来说,完全的硬件虚 ...
 - Ubuntu 14.04 下安装 OpenCV
		
参考: Installation in Linux Error compiling OpenCV, fatal error: stdlib.h: No such file or directory 图 ...
 - Ubuntu 14.04 下 安装Protocol Buffers
		
参考: Protocol Buffers - Google's data interchange format Ubuntu 14.04 下 安装Protocol Buffers 环境 Ubuntu ...
 - Ubuntu 14.04 下安装Skype
		
操作1: Ubuntu 14.04 下安装Skype,使用 Ctr+Alt+T组合键打开终端Terminal,输入如下即可: wget -O skype.deb http://download.sky ...
 - 分布式进阶(四)Ubuntu 14.04下安装Tomcat 6
		
Ubuntu 10.04下安装Tomcat 6 1,下载apache-tomcat6, 地址链接:http://archive.apache.org/dist/tomcat/tomcat-6/v6.0 ...
 - [硬件配置]记录Ubuntu 14.04 下安装无线网卡驱动解决无法连接WiFi的过程
		
新电脑安装了Ubuntu 14.04,但是网络连接中只有以太网而没有WiFi的选项. 打开System Setting系统设置-Software&Updates软件&更新-Additi ...
 - Ubuntu 14.04下安装GitLab指南
		
摘要 GitLab 是一个用于仓库管理系统的开源项目.使用Git作为代码管理工具,并在此基础上搭建起来的web服务. 在GitLab的官方网站上面对Ubuntu的支持也是很好的,有比较详尽的安装指南. ...
 - Ubuntu 14.04下安装CUDA8.0
		
配置环境如下: 系统:Ubuntu14.04 64bit 显卡:Nvidia K620M 显卡驱动:Nvidia-Linux-x86_64-375.66.run CUDA8.0 + cudnn8.0 ...
 
随机推荐
- Java三方---->pdf框架之IText的使用
			
在企业的信息系统中,报表处理一直占比较重要的作用t.通过在服务器端使用Jsp或JavaBean生成PDF报表,客户端采用超链接显示或下载得到生成的报表,这样就很好的解决了B/S系统的报表处理问题.今天 ...
 - Android 判断是否是Rtl
			
第一种方法: private boolean isRtl() { return TextUtils.getLayoutDirectionFromLocale(Locale.getDefault()) ...
 - log buffer space事件(转)
			
看了这篇文章: Oracle常见的等待事件说明http://database.ctocio.com.cn/tips/38/6669538.shtml 对于Log Buffer Space-日志缓冲空间 ...
 - 关于Visual Studio 20**自动添加头部注释信息
			
作为一个万年潜水党,不管这一篇文章技术含量如何,也算是一个好的开始吧. 在日常的开发中我们经常需要为类库添加注释和版权等信息,这样我们就需要每次去拷贝粘贴同样的文字,为了减少这种重复性的工作,我们 ...
 - MariaDB登陆
			
设置root密码 “mariabd”是新密码 [root@master /]# mysqladmin -u root password mariadb [root@master /]# mysql - ...
 - 最舒适的路(并查集+枚举)(hdu1598)
			
hdu1598 find the most comfortable road Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768 ...
 - 最小生成树的变形(次小生成树hdu4081)
			
hdu4081 Qin Shi Huang's National Road System Time Limit: 2000/1000 MS (Java/Others) Memory Limit: ...
 - 310实验室OTL问题(2)
			
1.PyOptimization代码学习心得 (1).该部分由三个分块组成(按完成的相应的任务).第一部分,运行函数. 以optimization.py为入口程序,其思路是:首先获取路径,然后,初始化 ...
 - Eclipse git pull 报Nothing to fetch 异常原因
			
eclipse git pull 报错 // 使用这个配置就可以正常pull了 [core] symlinks = false repositoryform ...
 - 8.ajax查询数据
			
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <m ...