在CentOS 5.3下安裝配置tftp服務

本人在centOS6.2下配置成功。

原文鏈接:http://www.2cto.com/os/201102/84016.html

向作者致敬!

以下照抄!

==================================================

 

在CentOS 5.3下安裝配置tftp服務 過程如下:
1. 掛載CDROM
[root@localhost mnt]# ls /dev/cdrom
/dev/cdrom
[root@localhost mnt]# mount /dev/cdrom /mnt/cdrom/

2. 安裝xinetd
[root@localhost cdrom]# cd CentOS/


[root@localhost CentOS]# ls *inet*
xinetd-2.3.14-10.el5.i386.rpm
[root@localhost CentOS]# rpm -ivh xinetd-2.3.14-10.el5.i386.rpm


3. 安裝tftp
[root@localhost CentOS]# ls *ftp*
ftp-0.17-35.el5.i386.rpm tftp-0.42-3.1.el5.centos.i386.rpm
gftp-2.0.18-3.2.2.i386.rpm tftp-server-0.42-3.1.el5.centos.i386.rpm
lftp-3.5.1-2.fc6.i386.rpm vsftpd-2.0.5-12.el5.i386.rpm
[root@localhost CentOS]# rpm -ivh tftp-server-0.42-3.1.el5.centos.i386.rpm
[root@localhost CentOS]# rpm -ivh tftp-0.42-3.1.el5.centos.i386.rpm

4. 安裝完成,查看一下
[root@localhost CentOS]# rpm -qa|grep tftp
tftp-server-0.42-3.1.el5.centos
tftp-0.42-3.1.el5.centos

5. 修改配置文件
[root@localhost CentOS]# 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
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}

6. 重啓xinetd,並配置tftp開機啓動
[root@localhost CentOS]# service xinetd restart
[root@localhost CentOS]# setup
修改權限:
[root@localhost /]# chmod 777 /tftpboot/
重啓:
[root@localhost ~]# service xinetd restart

7.測試
[root@localhost ~]# cd /tftpboot/
[root@localhost tftpboot]# ls
a.txt ramdisk_sjx_0.7.3.gz
[root@localhost tftpboot]# vim a.txt
[root@localhost tftpboot]# cd
[root@localhost ~]# tftp 10.10.143.103
tftp> get a.txt
tftp> q
[root@localhost ~]# ls
a.txt install.log remove20090915 work
[root@localhost ~]# more a.txt
aaaaaaaaaaaaaa

成功!
 

發佈了30 篇原創文章 · 獲贊 6 · 訪問量 13萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章