[root@localhost ~]# yum install dhcp tftp-* vsftpd
Pykickstart
Service vsftpd restart
Mount /dev/cdrom /var/ftp/pub
Mount /dev/cdrom /mnt
2 更改dhcp配置文件
vim /etc/named.conf
ddns-update-style interim;
ignore client-updates;
default-lease-time 12600;
max-lease-time 7200;
subnet 192.168.18.0 netmask 255.255.255.0 {
range dynamic-bootp 192.168.18.100 192.168.18.200;
option subnet-mask 255.255.255.0;
option routers 192.168.18.99;
filename "pxelinux.0";
next-server 192.168.18.66;
}
3 更改xinetd 配置文件
vim /etc/xinetd.d/tftp
disable =no
service xinetd restart
4 find / -name pxelinux.0
5 find / -name pxelinux.0
cd /usr/lib/syslinux/
ls
cp menu.c32 /tftpboot/
cp pxelinux.0 /tftpboot/
cd /mnt/
cd isolinux/
ls
cp vmlinuz /tftpboot/
cp initrd.img /tftpboot/
mkdir -pv /tftpboot/pxelinux.cfg
cd /tftpboot/pxelinux.cfg/
ls
cd
cd /tftpboot/
ls
rm -rf linux-install/
cp isolinux.cfg /tftpboot/pxelinux.cfg/
6 cd /tftpboot/pxelinux.cfg
mv isolinux.cfg default 改名
ll 查看default的权限 保证能读
chmod 644 default
修改default
default menu.c32
# prompt 1
timeout 600
display boot.msg
MENU TITLE welcome to linux
label linux
menu lable ^Install or upgrade an existing system for ks
menu default
kernel vmlinuz
append initrd=initrd.img ks=ftp://192.168.1.7 /ks.cfg
label local
menu lable1 Boot from ^local drive
localboot 1
7 cd /var/ftp
Vim ks.cfg
yum -y install system-config-kickstart
在终端中 system-config-kickstart
ftp服务器填写 ftp://192.168.1.7
目录 /pub
部分截图超过200k传不上了
保存到/var/ftp/ks.cfs
#platform=x86, AMD64, 或 Intel EM64T
# System authorization information
auth --useshadow --enablemd5
# System bootloader configuration
bootloader --append="rhgb quiet" --location=mbr --driveorder=sda
# 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 zh_CN
# Installation logging level
logging --level=info
# Use network installation
url --url=ftp://192.168.1.7/pub
# Network information
network --bootproto=dhcp --device=eth0 --onboot=on
# Reboot after installation
reboot
#Root password
rootpw 111111
# SELinux configuration
selinux --disabled
# System timezone
timezone --isUtc Asia/Shanghai
# Install OS instead of upgrade
install
# X Window System configuration information
xconfig --defaultdesktop=GNOME --depth=8 --resolution=640x480 --startxonboot
# Disk partitioning information
part swap --bytes-per-inode=4096 --fstype="swap" --size=1000
part /boot --bytes-per-inode=4096 --fstype="ext3" --size=100
part / --bytes-per-inode=4096 --fstype="ext3" --grow --size=1
%packages
@admin-tools
@base
@chinese-support
@core
@dialup
@editors
@gnome-desktop
@games
@graphical-internet
@graphics
@java
@legacy-software-support
@office
@printing
@sound-and-video
@text-internet
@base-x
kexec-tools
iscsi-initiator-utils
fipscheck
device-mapper-multipath
sgpio
emacs
libsane-hpaio
xorg-x11-utils
xorg-x11-server-Xnest