一 安装
yum -y install dhcp tftp-* vsftpd pykickstart-*
二 配置 dhcpd.conf
vim /etc/dhcpd.conf
ddns-update-style interim;
ignore client-updates;
subnet 192.168.18.0 netmask 255.255.255.0 {
option routers 192.168.18.1;
option subnet-mask 255.255.255.0;
option domain-name-servers 192.168.18.153;
range dynamic-bootp 192.168.18.100 192.168.18.200;
default-lease-time 21600;
max-lease-time 21600;
filename "pxelinux.0";
next-server 192.168.18.153;
}
三 启动
service dhcpd restart
[root@localhost ~]# service dhcpd restart
关闭 dhcpd: [确定]
启动 dhcpd: [确定]
四 配置 tftp
vim /etc/xinetd.d/tftp
# default: off
# description: The tftp server serves files using the trivial file transfer \
# protocol. The tftp protocol is often used to boot diskless \
# workstations, download configuration files to network-aware printers, \
# and to start the installation process for some operating systems.
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}
[root@localhost ~]# cd /tftpboot/
[root@localhost ~]# cd /usr/lib/syslinux/
[root@localhost ~]# cp pxelinux.0 /tftpboot/
[root@localhost ~]# cd /mnt/isolinux/
[root@localhost ~]# cp vmlinuz /tftpboot/
[root@localhost ~]# cp initrd.img /tftpboot/
[root@localhost tftpboot]# ls
initrd.img menu.c32 pxelinux.0 pxelinux.cfg vmlinuz
[root@localhost ~]# mkdir /tftpboot/pxelinux.cfg
[root@localhost ~]# cp isolinux.cfg /tftpboot/pxelinux.cfg/
[root@localhost ~]# cd pxelinux.cfg/
[root@localhost ~]# mv isolinux.cfg default
[root@localhost ~]# cd pxelinux.cfg/
配置
[root@localhost ~]# vim default
default menu.c32
#prompt 1
timeout 600
MENU TITLE welcome to wangbo.
label linux
kernel vmlinuz
append initrd=initrd.img
label text
kernel vmlinuz
append initrd=initrd.img text
label ks
kernel vmlinuz
append ks initrd=initrd.img ks=ftp://192.168.18.153/ks.cfg
label local
localboot 1
label memtest86
kernel memtest
append -
安装图形kickstart
[root@localhost ~]# yum install -y system-config-kickstart
[root@localhost ~]# system-config-kickstart
[root@localhost ~]# cp /root/ks.cfg /var/ftp/
[root@localhost ~]# chmod 644 ks.cfg
[root@localhost ~]# service vsftpd restart
关闭 vsftpd: [确定]
为 vsftpd 启动 vsftpd: [确定]
[root@localhost ftp]# service xinetd restart
停止 xinetd: [确定]
启动 xinetd: [确定]
挂载
[root@localhost ~]#mount /dev/hdc /var/ftp/pub/
[root@localhost ~]#mount
[root@localhost ~]# mount /dev/cdrom /var/ftp/pub/
mount: block device /dev/cdrom is write-protected, mounting read-only
[root@localhost ~]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
none on /proc/fs/vmblock/mountPoint type vmblock (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/hdc on /media/RHEL_5.5 i386 DVD type iso9660 (ro,noexec,nosuid,nodev,uid=0)
/dev/hdc on /mnt type iso9660 (ro)
/dev/hdc on /var/ftp/pub type iso9660 (ro)
测试
安装成功