Environment
System centos6.6 No graphical interface
IP 192.168.2.1
System centos7.2 with graphical interface
The following command executes on the centos6.6
1, yum-y install dhcp* tftp* vsftpd* syslinux #安装一些软件
2. Vim dhcpd.conf
Subnet192.168.2.0Netmask255.255.255.0 {Range DYNAMIC-BOOTP192.168.2.50 192.168.2.200;Next-server192.168.2.1;FileName"pxelinux.0";default-lease- Time -;max-lease- Time 7200;}
3. Service DHCPD Start
4, Find/-name pxelinux* find the location under pxelinux.0
5, Mkdir-v/var/lib/tftpboot/pxelinux.cfg/#创建使用的目录树
6, cp/usr/share/syslinux/pxelinux.0/var/lib/tftpboot/
7, mount/dev/cdrom/mnt/#挂载系统镜像
8, cp-rf/mnt/isolinux/*/var/lib/tftpboot/
9, cp-rf/mnt/*/var/ftp/pub/
10, cp/var/lib/tftpboot/Isolinux.cfg/var/lib/tftpboot/pxelinux.cfg/default
11, Vim/etc/xinetd.d/tftp
Service tftp{Socket_type=Dgram Protocol=UDPwait=Yes user=Root server=/usr/sbin/inch. TFTPD Server_args=-s/var/lib/tftpboot Disable=No default is yes, change to No is good per_source= OneCPS= - 2Flags=IPv4}
12. Chkconfig xinetd on
13. Service VSFTPD Start
14, yum-y Install System-config-kickstart
command line execution in the graphics of CentOS 7.2
15, Ssh-x [email protected]
16, System-config-kickstart #使用system-config-kickstart configuration ks.cfg
以下选项必选:
基本配置密码 重新引导系统 文本安装
安装方法
ftp
分区 清除主引导记录
网络配置添加
禁用防火墙
The following command executes on the centos6.6
17, cp/root/ks.cfg/var/ftp/pub/
18. Vim Pxelinux.cfg/default
label Linux ^Install or upgrade an existing system menu default kernel vmlinuz ks=ftp:// 192.168.2.1/pub/ks.cfg ksdevice=eth0 #如果多块网卡需设置ksdevice, otherwise you can remove append initrd=initrd.img
19. Check the status of FTP and DHCP to start the machine test
Note: This connection is written in more detail than I http://5323197.blog.51cto.com/5313197/1786744
Linux deployment pxe+kickstart Batch install Linux operating system