安装TFTP: [root@localhost ~]# yum install tftp-server -y 修改配置文件 [root@localhost ~]# 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 /var/lib/tftpboot disable = yes #打开禁用状态 per_source = 11 cps = 1002 flags = IPv4 }
3.3 FTP服务
FTP是file Transfer Protocol的简写,及文件传输协议。目前市面上有很多可以实现FTP协议的软件, vsftp就是一种利用FTP协议进行数据共享的软件,vsftp主要特色就是提供一种安全的数据共享服务。我 们可以使用它作为Centos系统文件的共享服务平台,当客户端从网络从网络启动正式进入到安装界面 后,还需要读取Centos光盘中的系统文件,已完成最后的安装。这些文件就通过vsftp共享给网络用 户。
vim /var/lib/tftpboot/pxelinux.cfg/default default vesamenu.c32 timeout 60 display boot.msg menu background splash.jpg #背景,可以自己改,但尺寸要把握好 menu title Centos of Bingo #标题
label centos7 64 <Auto Installation> menu label Install CentOS Linux ^7 x86_64 <Auto> kernel centos7u6/vmlinuz append initrd=centos7u6/initrd.img inst.stage2=ftp://192.168.79.171/centos7u6 inst.repo=ftp://192.168.79.171/centos7u6 inst.ks=ftp://192.168.79.171/centos-7-ks.cfg
label centos7 64 <Manual Installation> menu label Install CentOS Linux ^7 x86_64 <Manual> kernel centos7u6/vmlinuz append initrd=centos7u6/initrd.img inst.stage2=ftp://192.168.79.171/centos7u6
label local menu default menu label Boot from ^local drive localboot 0xffff menu end
[root@localhost ~]# cat ks.cfg #platform=x86, AMD64, 或 Intel EM64T #version=DEVEL # Install OS instead of upgrade install # Keyboard layouts keyboard 'us' # Root password rootpw --iscrypted $1$JoUhw4BT$/G6kcw2tEbOrfqY2DxywO. # Use network installation url --url="ftp://192.168.79.171/centos7u6" # System language lang zh_CN # System authorization information auth --useshadow --passalgo=sha512 # Use text mode install text # SELinux configuration selinux --disabled # Do not configure the X Window System skipx
# Firewall configuration firewall --disabled # Reboot after installation reboot # System timezone timezone Asia/Shanghai # System bootloader configuration bootloader --location=mbr # Clear the Master Boot Record zerombr # Partition clearing information clearpart --all --initlabel # Disk partitioning information part /boot --fstype="xfs" --size=200 part swap --fstype="swap" --size=1000 part / --fstype="xfs" --grow --size=1