使用pex須要kickstart,(ftp,HTTP,nfs中的一項),tftp,DHCP,Centos6.4系統光盤java
1)ks.cfg文件製做linux
[root@www share]# yum install -y system-config-kickstart
kickstart 基於 /root/anaconda-ks.cfg(本系統安裝時配置的磁盤分配,時區,語言,選擇的rpm包等參數)製做ks.cfg centos
# Partition clearing information 複製anaconda-ks.cfg中分區信息 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
添加軟件包bash
%packages @base @basic-desktop @core @debugging @desktop-debugging @desktop-platform @Desktop Platform Development @Server Platform Development @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)搭建ftp服務器準備RPM軟件包服務器
[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)準備Centos6.4引導文件這是關鍵部分(TFTP)
網絡
安裝並啓動tftpapp
[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 *:*
啓動文件及kernel準備 ide
[root@www ~]# yum istall -y syslinux 此軟件包準備pxelinux.0用於引導網絡安裝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默認安裝界面 [root@www ~]# cp /var/ftp/CentOS_6.4_x86_64/p_w_picpaths/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上文件是否準備完畢 .: 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服務器安裝
工具
[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; 指定tftp用於引導安裝 filename="pxelinux,0"; [root@www ~]# service dhcpd start Starting dhcpd: [ OK ]
5)Client準備調整BIOS啓動順序開發工具
Client從DHCP獲取IP地址
安裝界面展現
建立LVM卷