2.TFTP
由于必须支持TSIZE协议,所以不能安装最原始的TFTP包。我选择使用 tftp-hpa 。
编辑文件 /etc/xinetd.d/tftp (若没有,则添加tftp文件)(若不存在xinetd.d,请安装 xinetd 包)
# 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
{
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
}
这里将 /tftpboot 定义为 tftp 服务的默认目录,您可以自行修改。
保存之后重启 /etc/init.d/xinetd 服务,即可开启 tftp 服务。
如何测试 tftp 是否成功开启?
在 tftp 目录下创建一个文件,比如 1.txt 。
在 Shell 中连接 tftp 服务:
tftp 127.0.0.1
tftp>get 1.txt
若服务成功开启,则能看到成功下载文件的提示。并在当前目录下找到1.txt文件。
接着复制光盘中 isolinux 目录下的 vmlinuz、initrd.img 文件到 /tftpboot 目录下。
