Kickstart

2012年02月24日 其他 暂无评论 阅读 6,244 views 次

Kickstart

使用到httpd,tftp,dhcpd,

setp1

dhcp 使用67,68端口

#yum install dhcp

#cp /usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample /etc/dhcp/dhcpd.conf

#vim /etc/dhcp/dhcpd.conf

option domain-name "example.org";

filename "pxelinux.0";

添加指定启动的文件,(一定要写的全局配置文件区)

next-server 192.168.1.155;

添加指定PXE服务器地址(两条写在subnet之上)

default-lease-time 600;

max-lease-time 7200;

log-facility local7;

subnet 192.168.0.0 netmask 255.255.0.0 {

range 192.168.3.10 192.168.3.20;

设定好客户端的地址端

range 192.168.4.10 192.168.4.20;

option routers 192.168.1.1;

option broadcast-address 255.255.255.255;

}

#/etc/init.d/dhcpd restart

setp2

tftp 使用69端口

#mount -o loop fedora-16-i386.iso /media

#cp -av/media/fedora-16-i386/* /mnt/fedora-16-i386

#mkdir -p /win/pxe/pxelinux.cfg

#cp /mnt/fedora-16-i386/isolinux/vmlinuz /win/pxe

#cp /mnt/fedora-16-i386/isolinux/initrd /win/pxe

#cp /mnt/fedora-16-i386/isolinux/isolinux.cfg /win/pxe/pxelinux.cfg/defaul重命名为default

#cp /usr/share/syslinux/pxelinux.0 /win/pxe

#yum install tftp*

tftp在xinetd中配置

#vim /etc/xinetd.d/tftp

service tftp

{

socket_type = dgram

protocol = udp

wait = yes

user = root

server = /usr/sbin/in.tftpd

server_args = -s /win/pxe

设置文件路径

disable = no

改为开启

per_source = 11

cps = 100 2

flags = IPv4

}

#/etc/init.d/xinetd restart

#netstat -unl |grep 69

setp3

http

http使用的是apache源码安装

#vim /usr/local/apache/conf/extra/httpd-vhosts.conf

NameServer 192.168.1.155

<VirtualHost 192.168.1.155>

DocumentRoot “/mnt/fedora-16-i386”

</VirtualHost>

#/usr/local/apache/bin/apachectl restart

#chmod -R 777 /mnt/fedora-16-i386

用浏览器http://192.168.1.155可以访问到所有文件列表

setp4

kickstart

#yum install system-config-kickstart 图形工具

#system-config-kickstart

.....配置好,把文件保存到/mnt/fedora-16-i386/

setp5

客户端从网卡启动

给我留言

Copyright © 羽飞博客 保留所有权利.   Ality主题 皖ICP备14013844号-1

用户登录