Chinaunix首页 | 论坛 | 博客
  • 博客访问: 187418
  • 博文数量: 55
  • 博客积分: 1466
  • 博客等级: 上尉
  • 技术积分: 716
  • 用 户 组: 普通用户
  • 注册时间: 2010-08-13 22:34
文章分类

全部博文(55)

文章存档

2011年(27)

2010年(28)

我的朋友

分类: LINUX

2010-08-26 22:41:58

ubuntu 8.04 中tftp服务的配置与安装
一.省去每次都加sudo:
sudo -s -H,输入第一个用户的密码,以后在此终端下执行命令时,就不用在每个命令前面加上
sudo 了。
二.tftp,tftpd
需要在PC 机的根目录下建立tftpboot 目录并赋于此目录相关权限:
sudo mkdir /tftpboot ;sudo chmod 777 /tftpboot
ubuntu 8.04 配置如下:
直接安装以下三个包即可。
sudo apt-get install tftp atftpd xinetd
8.04 的tftp 服务下载文件时的默认目录(/tftpboot)是在/etc/inetd.conf 中定义的。可以更改此目录
中的相关设置,更改后使用sudo /etc/init.d/xinetd restart 重新启动一下服务即可。
测试:
tftp x.x.x.x (自己的ip)
get x(tftpboot下建立的文件)
 
关闭防火墙 ufw disable
 
fedora8 tftp服务器配置
先安装xinetd 服务:yum install xinetd
安装tftp ,tftp-sever:yum install tftp tftp-sever
可以在这个网站搜索下载rpm包直接安装
配置:
更改tftp配置文件 /etc/xinetd.d/tftp
vim /etc/xinetd.d/tftp

# default: off
# description: The tftp server serves files using the trivial file transfer \
# protocol. The tftp protocol is often used to boot diskless \
# workstations, download configuration files to network-aware printers, \
# and to start the installation process for some operating systems.
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot -c
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}

提醒: #-s 后面是tftp服务器的path,-c 允许上传文件。如果没有那个目录,自己需要先建立一个,最好把权限改好chmod 777 /tftpboot 。
service xinetd restart //重启 xinetd 服务
与上面一样测试一下。
结果本机可以测试成功,而其他电脑无法下载文件 transfer time out。
可能是防火墙的问题。
关闭防火墙:
命令下输入setup看一下 tftp服务是否开启,最好关闭防火墙(#/etc/init.d/iptables stop //关闭防火墙),我的设置不知道那里出了问题,最后把selinux都关闭了。在桌面菜单,系统--》管理--》selinux management ,将 Enforcing Mode 设置为 Disabled
阅读(1386) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~