一、PXE部分
0.环境准备
ip,hostname,iptables stop,selinux disabled
1. 安装软件包
# yum -y install dhcp tftp-server
2. dhcp配置
# vim /etc/dhcpd.conf
subnet 192.168.0.0 netmask 255.255.255.0 {
...
filename "pxelinux.0";//告诉客户端pxelinux.0文件的位置
next-server 192.168.0.2;//告诉客户端tftp-server地址
}
# service dhcpd start
# chkconfig dhcpd on
3. tftp server tftp共享根目录/tftpboot
# cp /usr/lib/syslinux/pxelinux.0 /tftpboot/
# mount /dev/cdrom /mnt/
# cp -rf /mnt/isolinux/* /tftpboot/
# cd /tftpboot/
# mkdir pxelinux.cfg
# cp isolinux.cfg pxelinux.cfg/default
# chkconfig tftp on
# service xinetd restart
4. 共享安装树(NFS,FTP,HTTP)
假如安装树位于目录/mnt
# vim /etc/exports
/mnt *(ro)
# service nfs restart
# chkconfig nfs on
二、安装方法
手工(默认)
======================================================
Installation Method:
NFS
自动
1. 生成ks文件
# yum -y install system-config-kickstart
# system-config-kickstart
修改ks文件
key --skip//跳过key
reboot//安装后自动重启
clearpart --all --initlabel//清空分区表,初始化
%packages
@core
@base
httpd
2. 通过nfs共享
# mkdir /kickstart
# ls /kickstart
ks.cfg
# vim /etc/exports
/kickstart*(ro)
# service nfs restart
3. 使用ks.cfg
# vim /tftpboot/pxelinux.cfg/default
timeout 1//设置等待时间
append initrd=initrd.img ks=nfs:192.168.0.2:/kickstart/ks.cfg
append initrd=initrd.img text ks=nfs:192.168.0.02:/kickstart/ks.cfg
ks.cfg sample~
#platform=x86, AMD64, 或 Intel EM64T # System authorization information auth --useshadow --enablemd5 # System bootloader configuration bootloader --location=mbr # Partition clearing information clearpart --all --initlabel # Use text mode install text # Firewall configuration firewall --disabled # Run the Setup Agent on first boot firstboot --disable key --skip # System keyboard keyboard us # System language lang en_US # Installation logging level logging --level=info # Use NFS installation media nfs --server=192.168.0.2 --dir=/mnt # Network information network --bootproto=dhcp --device=eth0 --onboot=on # Reboot after installation reboot #Root password rootpw --iscrypted $1$WkqQnZqP$pd9DhrSz/4c7B40NM9agt/ # SELinux configuration selinux --disabled # System timezone timezone Asia/Shanghai # Install OS instead of upgrade install # X Window System configuration information xconfig --defaultdesktop=GNOME --depth=8 --resolution=640x480 # Disk partitioning information part /boot --bytes-per-inode=4096 --fstype="ext3" --size=200 part /home --bytes-per-inode=4096 --fstype="ext3" --size=1000 part swap --bytes-per-inode=4096 --fstype="swap" --size=1024 part / --bytes-per-inode=4096 --fstype="ext3" --grow --size=1 %packages @core @base httpd
转载于:https://blog.51cto.com/13763261/2170651