标签:ks
yum install -y tftp* xinetd "*dhcp*" nfs-utils-*
配置DHCP服务器的配置文件
[root@localhost tftpboot]# vi /etc/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;
filename "/pxelinux.0";
next-server 10.240.240.210;
allow booting;
allow bootp;
subnet 10.240.240.0 netmask 255.255.255.0 {
# --- default gateway
option routers 10.240.240.1;
option subnet-mask 255.255.255.0;
option nis-domain "jiayuan.com";
option domain-name "jiayuan.com";
option domain-name-servers 10.240.210.98;
option time-offset -18000; # Eastern Standard Time
# option ntp-servers 10.240.210.98;
# option netbios-name-servers 10.240.210.98;
# --- Selects point-to-point node (default is hybrid). Don‘t change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;
range dynamic-bootp 10.240.240.220 10.240.240.240;
default-lease-time 21600;
max-lease-time 43200;
# we want the nameserver to appear at a fixed address
host ns {
next-server marvin.redhat.com;
hardware ethernet 12:34:56:78:AB:CD;
fixed-address 207.175.42.254;
}
}
配置tftp服务器的配置文件
[root@localhost tftpboot]# 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 #将yes改为no
per_source = 11
cps = 100 2
flags = IPv4
}
配置NFS服务器,添加共享目录
[root@localhost ~]# vi /etc/exports
/mnt/cdrom *(ro,sync)
/tftpboot *(ro,sync)
安装syslinux包
yum install -y syslinux
syslinux包安装完后会在/usr/share/syslinux/
先 cp -r /usr/share/syslinux/ /usr/lib/
新建一个/mnt/cdrom目录,把镜像的iso文件挂载到/mnt/cdrom下
如果没有/tftpboot/目录先建立一个
mkdir /tftpboot/
cp /usr/lib/syslinux/pxelinux.0 /tftpboot/
cp /mnt/cdrom/images/pxeboot/{initrd.img,vmlinuz} /tftpboot/
cp /mnt/cdrom/isolinux/*.msg /tftpboot
配置default文件
mkdir /tftpboot/pxelinux.cfg
touch /tftpboot/pxelinux.cfg/default
vi /tftpboot/pxelinux.cfg/default
default linux
prompt 1
timeout 600
display boot.msg
label linux
kernel vmlinuz
append initrd=initrd.img nofb text ks=nfs:10.240.240.210:/tftpboot/ks.cfg
label text
kernel vmlinuz
append initrdinitrd=initrd.img text
label ks
kernel vmlinuz
append ks initrdinitrd=initrd.img
label local
localboot 1
label memtest86
kernel memtest
append -
kicstart的配置文件可以通过图形界面获取安装信息
(1)、yum install system-config-kickstart* #安装kickstart图形管理界面
(2)、安装x server功能的Xming组件结合CRT使用执行下面的命令就会出现图形界面
system-config-kickstart
把/tftpboot/ 目录的权限修改为最大
chmod 777 /tftpboot/ -R
关闭防火墙并启动相关的服务
1、关闭防火墙
service iptables stop
2、关闭selinux (关闭后重启机器)
vi /etc/selinux/config
SELINUX=disabled
3、启动服务
service dhcpd start
service xinetd start
service rpcbind start
service nfslock start
service nfs start
4、把上面的服务写到启动项
vi /etc/rc.local
service iptables stop
service dhcpd start
service xinetd start
service rpcbind start
service nfslock start
service nfs start
标签:ks
原文地址:http://boris05.blog.51cto.com/1073705/1439872