如果用下面一條命令能夠看到服務已經啟動, 則不用安裝, 否則需要按 1 或 2 點安裝 tftp-server 服務器. [arm@localhost arm]#netstat -a | grep tftp
udp 0 0 *:tftp *:*
1. 從 RPM 包安裝 tftp-server
從對應 Linux 操作系統版本的安裝光盤上找到 tftp-server 的安裝包.
下面 tftp-server-0.32-4.i386.rpm 包為例,把 rpm 包拷貝到 dev_home/btools/下. [arm@localhost arm]#cp tftp-server-0.32-4.i386.rpm /home/arm/dev_home/btools/ [arm@localhost arm]#su root
[root@localhost arm]#rpm -q tftp-server
如果沒有安裝 tftp-server,就要用下面命令安裝,否則,直接進入第 2 步配置服務. [root@localhost arm]#cd /home/arm/dev_home/btools/ [root@localhost btools]#rpm -ivh tftp-server-0.32-4.i386.rpm
建立 tftp 的主工作目錄
[root@localhost btools]#mkdir /tftpboot
2. 修改配置文件並啟動服務 備份配置文件
[root@localhost btools]#if [ -f /etc/xinetd.d/tftp ]
> then
> cp /etc/xinetd.d/tftp /etc/xinetd.d/tftp.old
> fi
修改配置文件
[root@localhost btools]#vi /etc/xinetd.d/tftp service tftp
{
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
per_source = 11
cps = 100 2
flags = IPv4
}
檢查 tftp 服務是否打開
[root@localhost btools]#chkconfig --list
如果 tftp 的服務沒有打開,則用下面命令打開 tftp 服務開關 [root@localhost btools]#chkconfig tftp on
重啟服務
#/etc/init.d/xinetd restart
#netstat -a | grep tftp
udp 0 0 *:tftp *:*
