|
Need to use PXE kickstart, (ftp, HTTP, nfs in one), tftp, DHCP, CentOS 6.4 system CD
1) ks.cfg document production
[Root @ www share] # yum install -y system-config-kickstart
kickstart based /root/anaconda-ks.cfg (disk allocation system installation configuration, time zone, language, select the rpm package and other parameters) produced ks.cfg
# Partition clearing information copy anaconda-ks.cfg the partition information
clearpart --all --initlabel
part / boot --fstype = ext4 --size = 500
part pv.008002 --grow --size = 1
volgroup vg_centos --pesize = 4096 pv.008002
logvol / --fstype = ext4 --name = lv_root --vgname = vg_centos --grow --size = 1024 --maxsize = 51200
logvol swap --name = lv_swap --vgname = vg_centos --grow --size = 1984 --maxsize = 1984
Adding Packages
% Packages
@base
@ Basic-desktop
@core
@debugging
@ Desktop-debugging
@ Desktop-platform
@Desktop Platform Development
@Server Platform Development
Group @Development tools package installed to use the compiler development tools
@ Directory-client
@fonts
@ Input-methods
@ Internet-browser
@ Java-platform
@ Legacy-x
@ Network-file-system-client
@ Print-client
@ Remote-desktop-clients
@ Server-platform
@ Server-policy
@ X11
% End
2) set up ftp server ready RPM packages
[Root @ www ~] # yum install -y vsftpd
[Root @ www ftp] #mkdir CentOS_6.4_x86_64
[Root @ www ftp] # mount -r / dev / sr0 /var/ftp/CentOS_6.4_x86_64
[Root @ www ~] # cp ks.cfg /var/ftp/kickstart/ks.cfg
3) Prepare Centos6.4 This is a key part of the boot file (TFTP)
Install and start tftp
[Root @ www ~] # rpm -ivh tftp-0.49-7.el6.x86_64.rpm
Preparing ... ########################################### [100% ]
1: tftp ########################################### [100%]
[Root @ www ~] # rpm -ivh tftp-server-0.49-7.el6.x86_64.rpm
Preparing ... ########################################### [100% ]
1: tftp-server ########################################### [100 %]
[Root @ www ~] # chkconfig tftp on
[Root @ www ~] # service xinetd restart
Stopping xinetd: [OK]
Starting xinetd: [OK]
[Root @ www ~] # ss -uan | grep 69
UNCONN 0 0 *: 69 *: *
Boot files and kernel ready
[Root @ www ~] # yum istall -y syslinux this package ready pxelinux.0 network installation guide for Linux
[Root @ www ~] # cp /usr/share/syslinux/pxelinux.0 / var / lib / tftpboot /
[Root @ www ~] # cp /var/ftp/CentOS_6.4_x86_64/isolinux/{boot.msg,splash.jpg,vesamenu.c32} / var / lib / tftpboot / CentOS 6.4 default installation interface definitions
[Root @ www ~] # cp /var/ftp/CentOS_6.4_x86_64/images/pxeboot/{initrd.img,vmlinuz} / var / lib / tftpboot /
[Root @ www tftpboot] # mkdir pxelinux.cfg
[Root @ www pxelinux.cfg] # cp /var/ftp/CentOS_6.4_x86_64/isolinux/isolinux.cfg ./default
label linux
menu label ^ Install or upgrade an existing system
menu default
kernel vmlinuz
append initrd = initrd.img ks =
[Root @ www tftpboot] # ls -lR tftp verify the file is ready
:
total 36032
-r - r - r-- 1 root root 84 Nov 14 03:48 boot.msg
-r - r - r-- 1 root root 32495283 Nov 14 03:49 initrd.img
-rw-r - r-- 1 root root 26595 Nov 14 03:42 pxelinux.0
drwxr-xr-x 2 root root 4096 Nov 15 01:58 pxelinux.cfg
-r - r - r-- 1 root root 151230 Nov 14 03:48 splash.jpg
-r - r - r-- 1 root root 162860 Nov 14 03:48 vesamenu.c32
-r-xr-xr-x 1 root root 4043888 Nov 14 03:49 vmlinuz
./pxelinux.cfg:
total 4
-rw-r - r-- 1 root root 991 Nov 14 04:01 default
4) DHCP server installation
[Root @ www ~] # rpm -ivh dhcp-common-4.1.1-38.P1.el6.centos.x86_64.rpm
Preparing ... ########################################### [100% ]
1: dhcp-common ########################################### [100 %]
[Root @ www ~] # rpm -ivh dhcp-4.1.1-38.P1.el6.centos.x86_64.rpm
Preparing ... ########################################### [100% ]
1: dhcp ########################################### [100%]
[Root @ www ~] # cp /usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample /etc/dhcp/dhcpd.conf
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.200 192.168.1.225;
option routers 192.168.1.1;
}
next-server 192.168.1.150; specify tftp for booting the installation
filename = "pxelinux, 0";
[Root @ www ~] # service dhcpd start
Starting dhcpd: [OK]
5) Client ready to adjust the BIOS boot order |
|
|
|