在Linux下配置tftp服务器和nfs服务器
提示:该实验平台是在RedHat Linux 6下进行的
配置成功的前提有三个:
(1):在Windows下能ping的通linux
(2):关闭Linux 防火墙 执行指令:/etc/init.d/iptables stop
(3):使SElinux处于宽容模式 执行指令:setenforce permissive
一、配置tftp服务器步骤
(1):挂载磁盘,安装tptp-server软件包
mount /dev/cdrom /mnt/ ..............................................................挂载磁盘文件系统
cd /mnt/Packages/ .............................................................进入磁盘目录
find ./ -name tftp*
find: 路径必须在表达式之前: tftp-server-0.49-7.el6.i686.rpm
用法: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
[root@localhost Packages]# rpm -ivh tftp-server-0.49-7.el6.i686.rpm ..........................................................................安装tpft-server软件包
warning: tftp-server-0.49-7.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
error: Failed dependencies: ..............................................................安装失败,需要首先安装xinetd开头的软件包
xinetd is needed by tftp-server-0.49-7.el6.i686
[root@localhost Packages]# rpm -ivh /mnt/Packages/xinetd ....................................................tab键自动补齐
error: open of /mnt/Packages/xinetd failed: 没有那个文件或目录
[root@localhost Packages]# rpm -ivh /mnt/Packages/xinetd-2.3.14-34.el6.i686.rpm ...............................................安装依赖文件
warning: /mnt/Packages/xinetd-2.3.14-34.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:xinetd ########################################### [100%]
[root@localhost Packages]# rpm -ivh tftp-server-0.49-7.el6.i686.rpm ..........................................................................安装tpft-server软件包
warning: tftp-server-0.49-7.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:tftp-server ########################################### [100%] ..............................安装成功
[root@localhost Packages]#
(2):配置tftp服务器:执行指令:vim /etc/xinetd.d/tftp
[root@localhost Packages]# vim /etc/xinetd.d/tftp
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /home ...............................................将服务器的访问目录设为 /home
disable = no ....................................................使能tftp服务器
per_source = 11
cps = 100 2
flags = IPv4
}
--------------------------------------分割线 --------------------------------------
相关阅读:
--------------------------------------分割线 --------------------------------------
(3)重启tftp服务 /etc/init.d/xinetd restart
(4)测试tftp设置是否成功 :方法:用ftfp客户端测试程序,来从linux下的tftp服务器下下载文件