Kickstart
如果是Centos7系统的话,client端内存必须保证2G以上
一.安装列出来的rpm包
1.安装dhcp服务器
# rpm -qa |grep dhcp
dhcp-4.1.1-34.P1.el6.centos.i686
dhcp-common-4.1.1-34.P1.el6.centos.i686
//dhcp-devel-4.1.1-34.P1.el6.centos.i686
2.安装TFTP服务器
# rpm -qa |grep tftp
tftp-server-0.49-7.el6.i686
安装时可能出现xinetd is needed by tftp-server-0.49-7.el6.i686
则需安装xinetd
# rpm -qa |grep xinetd
xinetd-2.3.14-38.el6.i686
3.安装VSFTP服务器
# rpm -qa |grep vsftp
vsftpd-2.2.2-11.el6_3.1.i686
4.安装kickstart
# rpm -qa |grep system-config-kickstart
system-config-kickstart-2.8.6.5-1.el6.noarch
建议用yum安装
yum install -y system-config-kickstart
二.修改服务器配置文件
1.Dhcp
2.Tftp
3.ftp
4.default
5.Ks.cfg
三.准备工作:
-------------------------------本地IP地址--------------------------------
[root@catt ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:A4:F2:56
inet addr:192.168.133.148 Bcast:192.168.133.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fea4:f256/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:259915 errors:0 dropped:0 overruns:0 frame:0
TX packets:565798 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:17213848 (16.4 MiB) TX bytes:812666141 (775.0 MiB)
-------------------------------本地IP地址--------------------------------
首先要把镜像中的所有文件cp到/var/ftp/pub文件下
mkdir -pv /tftpboot/pxelinux.cfg
cp /usr/share/syslinux/pxelinux.0 /tftpboot/
cp /var/ftp/pub/isolinux/isolinux.cfg /tftpboot/pxelinux.cfg/default
cp /var/ftp/pub/images/pxeboot/initrd.img /tftpboot
cp /var/ftp/pub/images/pxeboot/vmlinuz /tftpboot
cp /usr/share/syslinux/vesamenu.c32 /tftpboot/
chmod 644 /tftpboot/pxelinux.cfg/default
四.配置文件参数
1. vi /etc/dhcp/dhcpd.conf
#
# DHCP Server Configuration file.
# see /usr/share/doc/dhcp*/dhcpd.conf.sample
# see 'man 5 dhcpd.conf'
#
ddns-update-style interim;
ignore client-updates;
subnet 192.168.133.0 netmask 255.255.255.0 {
option routers 192.168.133.100;
option subnet-mask 255.255.255.0;
filename "/pxelinux.0";
next-server 192.168.133.148;
option domain-name-servers 192.168.133.148;
range dynamic-bootp 192.168.133.20 192.168.133.40;
default-lease-time 14400;
max-lease-time 28800;
}
2.vi /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 = -u nobody -s /tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}
3.vi /etc/vsftp/vsftpd.conf
无需改动
4.vi /tftpboot/pxelinux.cfg/default
label linux
menu label ^Install or upgrade an existing system
menu default
kernel vmlinuz
append initrd=initrd.img ks=ftp://192.168.133.148/ks.cfg
--------------开机必须启动的选项---------------
service iptables stop
chkconfig iptables off
service vsftpd start
chkconfig vsftpd on
service xinetd start
chkconfig xinetd on
service dhcpd start
chkconfig dhcpd on
-------------------------------------------------
5. /var/ftp/ks.cfg (注意权限此建议755)
6.生成ks.cfg文件
root用户执行
system-config-kickstart命令
这一步需要和项目组的确认各个磁盘大小:
完成之后就可以开始启动了:
开启的另一太机器自动找到