Pxe+dhcp+apache+kickstart Unattended Installation System
Mount system disk,
Mkdir/mnt/cdrommount/dev/cdrom/mnt/cdrom
Turn off SELinux, turn off firewall
Setenforce 0/etc/init.d/iptables Stop
Installing the Apache Service (installed by default)
Yum Install Apache-y
Copy the contents of the disc to the site Directory
cp-rf/mnt/cdrom/*/var/www/html/
Installing the Tftp-server Service
Yum Install Tftp-server-y
Modify/etc/xinetd.d/tftp
cat /etc/xinetd.d/tftp
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}
Restart Tftp-server,tftp is the service under Xinet, so restart xinetd to
/etc/init.d/xinetd restart
New Tftp-server Folder
Mkdir/tftpboot
Installing syslinux, copying files to the TFTP directory
Yum Install syslinux-ycp/usr/share/syslinux/pxelinux.0/tftpboot/cp/var/www/html/images/pxeboot/initrd.img/ TFTPBOOT/CP/VAR/WWW/HTML/IMAGES/PXEBOOT/VMLINUZ/TFTPBOOT/CP/VAR/WWW/HTML/ISOLINUX/*.MSG/TFTPBOOT/CD/ Tftpbootmkdir Pxelinux.cfgcp/var/www/html/isolinux/isolinux.cfg/tftpboot/pxelinux.cfg/default
Install the DHCP service and modify the configuration file
Yum Install dhcp-ycat/etc/dhcp/dhcpd.conf
ddns-update-style interim;ignore client-updates;next-server 192.168.1.10;filename "/ pxelinux.0 ";subnet 192.168.1.0 netmask 255.255.255.0{ option routers 192.168.1.1; option subnet-mask 255.255.255.0; option nis-domain " AAA.com "; option domain-name " aaa.com "; option domain-name-servers 192.168.1.10; option time-offset -18000; range dynamic-bootp 192.168.1.50 192.168.1.100; default-lease-time 21600; max-lease-time 43200;}
/ETC/INIT.D/DHCPD restart
Installing the System-config-kickstart Service
Yum Install System-config-kickstart-y
Use the System-config-kickstart command to customize system generated ks.cfg files saved under/var/www/html
Cat/var/www/html/ks.cfg
#platform =x86, amd64, or Intel EM64T#version=DEVEL# Firewall Configurationfirewall --disabled# install os instead of upgradeinstall# use network installationurl --url= "http://192.168.1.10/" # root passwordrootpw -- iscrypted $1$0wsimqf8$pi4illuovquihpbopjyyy/# system authorization informationauth --useshadow --passalgo=sha512# use graphical installgraphicalfirstboot -- Disable# system keyboardkeyboard us# system languagelang en_us# selinux configurationselinux --enforcing# installation logging levellogging --level= info# reboot after installationreboot# system timezonetimezone asia/ Shanghai# network informationnetwork --bootproto=dhcp --device=eth0 --onboot=on # system bootloader configurationBootloader --location=mbr# clear the master boot recordzerombr# partition clearing informationclearpart --all --initlabel # Disk partitioning Informationpart /boot --asprimary --fstype= "Ext4" --size=300part / --asprimary --fstype= "Ext4" --grow --size=1part swap --asprimary --fstype= "swap" -- size=1024% Packages@basic-desktop@desktop-debugging@desktop-platform@fonts@general-desktop@graphical-admin-tools@input-methods@kde-d Esktop@legacy-x@remote-desktop-clients@x11%end
cat /tftpboot/pxelinux.cfg/default
default vesamenu.c32default texttimeout 600display boot.msgmenu background splash.jpgmenu title welcome to centos 6.3!menu color border 0 # ffffffff #00000000menu color sel 7 #ffffffff #ff000000menu color title 0 #ffffffff #00000000menu color tabmsg 0 #ffffffff #00000000menu color unsel 0 #ffffffff #00000000menu color hotsel 0 #ff000000 #ffffffffmenu color hotkey 7 #ffffffff #ff000000menu color scrollbar 0 #ffffffff #00000000label linux menu label ^Install or upgrade an existing system menu default kernel vmlinuz append initrd=initrd.imglabel vesa menu label Install system With ^basic video driver kernel vmlinuz append initrd=initrd.img xdriver=vesa nomodesetlabel rescue menu label ^rescue installed system kernel vmlinuz append initrd=initrd.img rescuelabel local menu label boot from ^local drive localboot 0xfffflabel memtest86 menu label ^memory test kernel memtest append -label text kernel vmlinuz append initrd=initrd.img ks=http://192.168.1.10/ks.cfg
This article is from the "Openatrium" blog, make sure to keep this source http://5381589.blog.51cto.com/5371589/1641871
Pxe+dhcp+apache+kickstart Unattended Installation System CentOS