安装图形

yum groupinstall -y "Desktop"

解决乱码

 yum groupinstall -y "Chinese Support"


192.168.1.124 服务器


mkdir -p /var/ftp/pxe

umount /dev/sr0 

df

mount /dev/sr0 /media/

cp -rf /media/* /var/ftp/pxe

 rm -rf /etc/yum.repos.d/*

vim /etc/yum.repos.d/dvd.repo

[dvd]

name=install dvd

baseurl=file:///var/ftp/pxe

enabled=1

gpgcheck=0


yum makecache


安装vsftp

rpm -ivh /media/Packages/vsftpd

service vsftpd start

chkconfig vsftpd on

安装tftp

yum install -y tftp-server

vim /etc/xinetd.d/tftp

disable     = no

service xinetd start

chkconfig xinetd on


安装dhcp

yum install -y dhcp

vim /etc/dhcp/dhcpd.conf

subnet 192.168.1.0 netmask 255.255.255.0 {

range 192.168.1.126 192.168.1.128;

next-server 192.168.1.124;

filename "pxelinux.0";

}

service dhcpd start

chkconfig dhcpd on


复制核心文件到 tftpboot

 yum install -y syslinux

 cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/

cp /media/isolinux/{initrd.img,vmlinuz} /var/lib/tftpboot/


mkdir /var/lib/tftpboot/pxelinux.cfg

vim /var/lib/tftpboot/pxelinux.cfg/default

default auto

prompt 0

label auto

kernel vmlinuz

append ks=ftp://192.168.1.124/pxe/ks.cfg initrd=initrd.img devfs=nomount ramdisk_size=8192 initrd=initrd.img devfs=nomount ramdisk_size=8192

label linux text

kernel vmlinuz

append initrd=initrd.img devfs=nomount ramdisk_size=8192

label linux rescue

kernel vmlinuz

append initrd=initrd.img devfs=nomount ramdisk_size=8192


yum install -y system-config-kickstart


ftp://192.168.1.124

pxe

初始化标签


cp /root/ks.cfg /vat/lib/ftp/pxe/ks.cfg