Kickstart Batch Installation of Linux Systems
Kickstart 's working principle must be known, with the PXE protocol to assemble multiple servers at the same time. The general use of time is not much, but to know, use the time can be handy, my environment is as follows:
you need to install the deployment Linux Servers:
Redhat - 6.4
IP Address:192.168.30.34
network card:P3P1
Subnet Mask:255.255.255.0
Gateway:192.168.30.1
dns:202.106.0.20 or 8.8.8.8
Specific operation:
Part I: Operating in the Kickstart Server System
Close SELINUX
Vi/etc/sysconfig/selinux
selinux= changed into disabled
: Wq # Save Exit
But the system needs to be restarted.
Setenforce 0 # make configuration immediate effect no need to restart the system
--------------------------------------------------------------------------------------------------------------- ------------------
View Selnux Status:
/usr/sbin/sestatus–v # #SELINUX The status parameter is enabled is turned on
Selinuxstatus:enabled
SETENFORCE0 # # make configuration effective immediately
--------------------------------------------------------------------------------------------------------------- ------------------2. Configure the firewall to turn on TCP: port,udp:69 Port
Vi/etc/sysconfig/iptables
-arh-firewall-1-input-m State--state new-m tcp-p TCP--dport 80-j accept# #http service requires this port
-arh-firewall-1-input-m State--state new-m udp-p UDP--dport 69-j accept# #tftp service requires this port
/etc/init.d/iptablesrestart # # # Finally restart the firewall for configuration to take effect
3. install the HTTP server
Yum-yinstall httpd # installation
CHKCONFIGHTTPD on # set boot up
SERVICEHTTPD Start # startup
Disclaimer: I installed the server when the HTTPD service has been installed, so there is no installation, here I just write a step, no installation can be installed, has been installed can skip this step directly
4. Mount The system installation image to the httpd Server Site Directory
upload the system installation image file to the /usr/local/src/ directory
Mkdir-p/var/www/html/os # # Create mount directory
Mount-tiso9660-o Loop/usr/local/src/rhel-server-6.4-x86_64-dvd.iso/var/www/html/os # # mount system Image
Uninstall:Umount/var/www/html/os # # But you do not uninstall, because the following will be used
5. installing the TFTP server
Yum-yinstall tftp tftp-server # # Installation
VI/ETC/XINETD.D/TFTP # # Edit
Servicetftp
{
Disable = no
Socket_type = Dgram
protocol = UDP
Wait = yes
user = root
Server =/USR/SBIN/IN.TFTPD
Server_args =-s/var/lib/tftpboot
Per_source = 11
CPS = 100 2
Flags = IPV4
}
:Wq # # Save Exit
servicexinetd Start # # startup
Mkdir-p/var/lib/tftpboot
Cp/var/www/html/os/images/pxeboot/vmlinuz/var/lib/tftpboot
Cp/var/www/html/os/images/pxeboot/initrd.img/var/lib/tftpboot
Mkdir-p/var/lib/tftpboot/pxelinux.cfg
Cp/var/www/html/os/isolinux/isolinux.cfg/var/lib/tftpboot/pxelinux.cfg/default # # copy boot menu
Vi/var/lib/tftpboot/pxelinux.cfg/default # # Edit Modify
Defaultlinux
Prompt 0
timeout600
Displayboot.msg
F1boot.msg
F2options.msg
F3general.msg
F4param.msg
F5rescue.msg
Labellinux
Kernelvmlinuz
Appendinitrd=initrd.img ks=http://192.168.30.34/ks.cfg ksdevice=p3p1 Ip=dhcp
LabelText
Kernelvmlinuz
Appendinitrd=initrd.img text
Label KS
Kernelvmlinuz
Append ksinitrd=initrd.img
Labellocal
Localboot1
Labelmemtest86
Kernelmemtest
append–
: Wq # # Save Exit
chmod 644/var/lib/tftpboot/pxelinux.cfg/default # # Set file Permissions
Yum-yinstall Syslinux # # Install the boot program
cp/usr/share/syslinux/pxelinux.0/var/lib/tftpboot/# # Copy boot file to the TFTP server root directory
6. Install the DHCP server
Yum-yinstall DHCP # # installation
cp/usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample/etc/dhcpd.conf # # Copy profile template
vi/etc/dhcpd.conf # # Edit configuration file
Ddns-update-styleinterim; # # Set DHCP Server Mode
Ignoreclient-updates; # # prohibit client updates
subnet192.168.30.0 netmask 255.255.255.0 {# # set Network segment
Option routers 192.168.30.1; # # Setting up gateways
Option Subnet-mask 255.255.255.0; # # Set Subnet mask
Option Domain-name-servers 8.8.8.8; # # Set DNS server address
Range 192.168.30.35 192.168.30.36; # # Set the DHCP server IP address lease range. If the DHCP version is 3.0 then this line is modified to:range DYNAMIC-BOOTP 192.168.30.35 192.168.30.36;
Default-lease-time 21600; # # Default lease Time
Max-lease-time 43200; # # Maximum lease time
Next-server 192.168.30.34; # #tftp server address
FileName "pxelinux.0"; # #tftp The file name under the server root directory
}
: Wq # # Save Exit
VI/ETC/SYSCONFIG/DHCPD # # Specifies the DHCP network interface
Dhcpdargs=p3p1
: Wq # # Save Exit
DHCPD # # Test DHCP server configuration is correct
Service DHCPD Start # # starts the DHCP service
Chkconfig dhcpd on # # set boot start
7. Configure Kickstart automatic installation files
Yum-y Install System-config-kickstart # # Installation Kit
Disclaimer: If you want to connect a graphical interface, you first need to install it locally: Xme4_20140318180407-3 (Xshell)
and then run Xmanager–passive will have a xmanager in the lower right corner 4[0.0]
Next we open the terminal input in the graphical interface:
Export display=192.168.30.xx:0.0 # #192.168.30.xx for native IP
System-config-kickstart # # Popup interface
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/47/BD/wKioL1P_H-Cx1eYhAAJtZTmWdpc305.jpg "title=" Kickstart.jpg "alt=" Wkiol1p_h-cx1eyhaajtztmwdpc305.jpg "/>
We set the default installed language, time zone, root password, and then tick the following to reboot after installation. Then select the installation method
Next
We configure the HTTP Server installation method, choose to perform a new installation, and then click the boot loader option
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/47/BB/wKiom1P_HubizxiQAAGu0E4gLvs852.jpg "title=" Kickstart1.jpg "alt=" Wkiom1p_hubizxiqaagu0e4glvs852.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/47/BD/wKioL1P_IGTjSKxxAAHQC89L-ik985.jpg "title=" Kickstart2.jpg "alt=" Wkiol1p_igtjskxxaahqc89l-ik985.jpg "/>
Grub can be set to a password, not set or
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/47/BB/wKiom1P_H2mDY4u6AAKv9fb-I0Y556.jpg "title=" Kickstart3.jpg "alt=" Wkiom1p_h2mdy4u6aakv9fb-i0y556.jpg "/>
You can refer to my diagram:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/47/BD/wKioL1P_IKCi6K5IAAIdYXTqLkQ339.jpg "title=" Kickstart4.jpg "alt=" Wkiol1p_ikci6k5iaaidyxtqlkq339.jpg "/>
This option adds network devices Network device name write p3p1 OK.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/47/BD/wKioL1P_ILiSo1umAAGUncSBISk098.jpg "title=" Kickstart5.jpg "alt=" Wkiol1p_iliso1umaaguncsbisk098.jpg "/>
This verifies the selection MD5
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/47/BD/wKioL1P_IMmxIgKKAAHVWN0Qw6Q210.jpg "title=" Kickstart6.jpg "alt=" Wkiol1p_immxigkkaahvwn0qw6q210.jpg "/>
The default is the line personal habits, want to change can also
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/47/BB/wKiom1P_H-biap8LAAFjOWDNkVs020.jpg "title=" Kickstart7.jpg "alt=" Wkiom1p_h-biap8laafjowdnkvs020.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/47/BD/wKioL1P_IRSBujHeAAI32VGGl4Q696.jpg "title=" Kickstart8.jpg "alt=" Wkiol1p_irsbujheaai32vggl4q696.jpg "/>
This is the package you need to choose from, according to your own requirements to choose
Then choose Save, Save the path
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/47/BD/wKioL1P_ISijVpaUAAHXTUQYObA914.jpg "title=" Kickstart9.jpg "alt=" Wkiol1p_isijvpauaahxtuqyoba914.jpg "/>
then plug the other machine into the same switch as this one, and select the network to boot.
powering on F12 into BIOS:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/47/BD/wKioL1P_I3_iqh7iABDIXv_PXcY822.jpg "title=" Kickstart11.jpg "alt=" Wkiol1p_i3_iqh7iabdixv_pxcy822.jpg "/>
Select Wake on Lan->lan with PXE Boot
reboot into Bios:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/47/BB/wKiom1P_Iwbi4ObUAAqZJCEGxN8653.jpg "title=" Kickstart10.jpg "alt=" Wkiom1p_iwbi4obuaaqzjcegxn8653.jpg "/>
If the installation process occurs:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/47/BC/wKiom1P_I1PBCFe2AAMPs_RUktY593.jpg "title=" Kickstart12.jpg "alt=" Wkiom1p_i1pbcfe2aamps_rukty593.jpg "/>
you need to remove the relevant package from the/var/www/html/ks.cfg file.
So far, thank you.
Kickstart batch installation of Linux systems