First, automatic installation system Tools
1, Cobbler
Another automated installation tool;
2, Kickstart
Second, the use of Kickstart automated installation system
Server-installed software:
1. DHCP Service
[email protected] ~]# Yum install dhcp-y
Configuration file for dhcpd:
1 Subnet 192.168.10.0 netmask 255.255.255.0 {
2 range 192.168.10.100 192.168.10.120;
3 option domain-name-servers 8.8.8.8;
4 option Domain-name "linuxidc.seagate.com";
5 option routers 192.168.10.10;
6 option broadcast-address 192.168.10.255;
7 next-server 192.168.10.10; Set the address of the TFTPD server
8 filename "pxelinux.0"; TFTPD the file name of the server
9 Default-lease-time 600;
Ten max-lease-time 7200;
11}
2. TFTPD Service
[email protected] dhcp]# Yum install Tftp-server
File directory for TFTPD services:
[Email protected] tftpboot]# pwd
/var/lib/tftpboot
Modify/ETC/XINETD.D/TFTP Enable TFTPD service:
6 Service TFTP
7 {
8 Socket_type = Dgram
9 protocol = UDP
Ten wait = yes
One user = root
Server =/USR/SBIN/IN.TFTPD
Server_args =-s/var/lib/tftpboot
Disable = no
Per_source = 11
CPS = 100 2
* Flags = IPV4
18}
3, install the Syslinux service, extract the boot file pxelinux.0 file to the tftpd file directory:
[email protected] tftpboot]# Yum provides */pxelinux.0
Syslinux-4.05-8.el7.x86_64:simple kernel loader which boots from a FAT filesystem
Repo:mine
Matched from:
Filename:/usr/share/syslinux/pxelinux.0
[email protected] tftpboot]# Yum install syslinux-4.05-8.el7.x86_64-y
[email protected] syslinux]# CP pxelinux.0/var/lib/tftpboot/
4. Copy the Initrd.img,vmlinuz file to the tftpd file directory from the/images/pxeboot directory of the installation CD image
[email protected] pxeboot]# CP initrd.img vmlinuz/var/lib/tftpboot/
5. Create the Pxelinux directory below the tftpd file directory
[Email protected] tftpboot]# mkdir pxelinux.cfg
6, copy the installation disc image/isolinux/directory under the isolinux.cfg,boot.msg to tftpd file directory, and named Default, write permissions to the user
[email protected] isolinux]# CP Isolinux.cfg/var/lib/tftpboot/pxelinux.cfg/default
[Email protected] isolinux]# chmod u+w/var/lib/tftpboot/pxelinux.cfg/default
[email protected] isolinux]# CP boot.msg/var/lib/tftpboot/
7. Install HTTP service, configure HTTP installation source
[email protected] pxelinux.cfg]# Yum install httpd-y
In the root directory of HTTP/var/www/html create the ISO directory, copy all the files of the installation CD image ISO to the ISO directory, configure the/var/www/html/iso directory:
<directory "/var/www/html/iso" >
131 AllowOverride None
# Allow open access:
133 Require All granted
134 </Directory>
8. Create Kickstart automatic installation script
It can be referenced from the anaconda-ks.cfg under the root home directory on a machine that has been installed, and there are several commands that must be written in the script:
Bootloader
Keyboard
Lang:
Part or partition:
ROOTPW:
TimeZone
Installation package Selection:
Start with%package, end with%end, middle package at @ Start, package definition in *comps-server.x86_64.xml definition under ISO installation image Repodata directory
%packages
@base
@core
-debugging @desktop
@dial-up
@fonts
Panax Notoginseng @gnome-desktop
@guest-agents
-desktop-agents @guest
@input-methods
@internet-browser
@multimedia
@print-client
@x11
45
%end
Pre-installation script: Start with%pre, end with%end;
Post-Installation script: Start with%post and end with%end/;
9. Generate the Kickstart script and place it in the HTTP root/var/www/html below:
Auth--enableshadow--passalgo=sha512
Install
URL-- URL http://192.168.10.10/iso
firstboot--enable
Ignoredisk--only-use=sda
Keyboard--vckeymap=us-- Xlayouts= ' Us '
Lang en_US. utf-8
network --bootproto=dhcp--device=ens33--onboot=off--ipv6=auto
network -- hostname=localhost.localdomain
Rootpw--plaintext redhat
TimeZone asia/chongqing--ISUTC-- nontp
xconfig --startxonboot
bootloader--location=mbr--boot-drive=sda
Part/-- FSTYPE=XFS--size=5000
Part swap--fstype=swap--size=512
Clearpart--none--initlabel
%packages
@base
@core
1234567891011121314151617181920212223 @desktop-debugging
@dial-up
@fonts
@gnome-desktop
@guest-agents
@guest-desktop-agents
@input-methods
@internet-browser
@multimedia
@print-client
@x11
%end
%post
Useradd Redhat
echo Redhat |passwd--stdin Redhat
Cat >/etc/yum.repos.d/test.repo<<eof
[Test]
Name=test
Baseurl=file:///iso
Gpgcheck=0
<<eof
%end
Reboot
10. Modify the KS installation source in the/var/lib/tftpboot/pxelinux.0/default file
Append initrd=initrd.img inst.ks=http://192.168.10.10/ks.cfg
11. Create a new virtual machine, start the virtual machine, boot from the PXE network, and the system will be installed automatically
-----------------------------Split Line-----------------------------
Unattended installation with Pxe+dhcp+apache+kickstart CentOS5.8 x86_64 http://www.linuxidc.com/Linux/2012-12/76913p4.htm
Linux PXE Unattended installation appears pxe-e32:tftp OPen Timeout Solution http://www.linuxidc.com/Linux/2014-03/98986.htm
Automatically install Linux systems using PXE combined with Kickstart http://www.linuxidc.com/Linux/2014-03/98014.htm
RHCE Certified Unattended Installation Linux system (FTP+TFTP+DHCP+KICKSTART+PXE) http://www.linuxidc.com/Linux/2013-10/91013.htm
PXE network installed (unattended and unattended installation) http://www.linuxidc.com/Linux/2013-07/87456.htm
-----------------------------Split Line-----------------------------
This article permanently updates the link address : http://www.linuxidc.com/Linux/2015-03/115204.htm
RHCE7 Certification Learning Note 17--kickstart installation system