kickstart部署centos6.2 x86_64
2014-03-12 16:14
417 查看
本人近期一直在练习kickstart自动部署centos,整理了一篇经过n次实践的文档分享一下!
centos6.2 with kickstart网络启动自动安装centos6.2 x64(KickStart+PXE+httpd+DHCP+TFTP)
参考文章 http://blog.csdn.net/silent1/article/details/7635646
进入正题:
kickstart服务器,操作系统是centos6.2 x64
yum install dhcp tftp* xinetd httpd syslinux
vim /etc/xinetd.d/tftp
disable=no
将/var/lib/tftpboot链接到/tftpboot
ln -s /var/lib/tftpboot /tftpboot
建立安装源
挂载centos盘
mount -o loop -t iso9660 centos.iso /misc/cd
复制安装centos所需启动菜单和内核、ramdisk镜像文件到tftp
cp /usr/share/syslinux/pxelinux.0 /usr/share/syslinux/vesamenu.c32 /misc/cd/images/pxeboot/vmlinuz /misc/cd/images/pxeboot/initrd.img /misc/cd/isolinux/*.msg /misc/cd/isolinux/memtest /misc/cd/isolinux/splash.jpg /tftpboot
建立pxelinux.cfg目录
mkdir -p /tftpboot/pxelinux.cfg
制造启动菜单
cp /misc/cd/isolinux/isolinux.cfg /tftpboot/pxelinux.cfg/default
修改内容
vim /tftpboot/pxelinux.cfg/default
# /tftpboot/pxelinux.cfg/default(/misc/cd/isolinux/isolinux.cfg)
default vesamenu.c32
#prompt 1
timeout 30
display boot.msg
menu background splash.jpg
menu title Come on,let's get it started!
menu color border 0 #ffffffff #00000000
menu color sel 7 #ffffffff #ff000000
menu color title 0 #ffffffff #00000000
menu color tabmsg 0 #ffffffff #00000000
menu color unsel 0 #ffffffff #00000000
menu color hotsel 0 #ff000000 #ffffffff
menu color hotkey 7 #ffffffff #ff000000
menu color scrollbar 0 #ffffffff #00000000
label CentOS Linux 6.2 x64
menu label ^Install CentOS 6.2 x64
menu default
kernel vmlinuz
append ks=http://192.168.44.250/ks/centos6/ks.cfg initrd=initrd.img ksdevice=eth0
label CentOS Linux 6.2 x64 vesa mode
menu label Install system with ^basic video driver
kernel vmlinuz
append ks=http://192.168.44.250/ks/centos6/ks.cfg initrd=initrd.img ksdevice=eth0 xdriver=vesa nomodeset
label rescue
menu label ^Rescue installed system
kernel vmlinuz
append initrd=initrd.img rescue
label local
menu label Boot from ^local drive
localboot 0xffff
label memtest86
menu label ^Memory test
kernel memtest
append -
在apache的发布目录中放上安装源
cp -a /misc/cd/* /var/www/html/ks/centos6
配置dhcp
vim /etc/dhcpd.conf
ddns-update-style interim;
ignore client-updates;
next-server 192.168.44.250;
filename "pxelinux.0";
allow booting;
allow bootp;
subnet 192.168.44.0 netmask 255.255.255.0 {
# — default gateway
option routers 192.168.44.1;
option subnet-mask 255.255.255.0;
# option nis-domain “domain.org”;
option domain-name "admaster.com.cn";
option domain-name-servers 202.106.195.68;
option time-offset -18000; # Eastern Standard Time
range 192.168.44.100 192.168.44.120;
}
制造ks.cfg
vim /var/www/html/ks/centos6/ks.cfg
# centos6/ks.cfg
firewall --disabled
install
url --url http://192.168.44.250/ks/centos6 text
firstboot --disable
rootpw admaster
auth --useshadow --enablemd5
lang en_US
keyboard us
selinux --disabled
logging --level=info
reboot
timezone --isUtc Asia/Shanghai
network --bootproto=dhcp --device=eth0 --onboot=on
zerombr
bootloader --location=mbr
clearpart --all --initlabel
part swap --fstype="swap" --size=4096
part /boot --fstype="ext4" --size=200
part / --fstype="ext4" --size=1 --grow
%packages
openssh-server
openssh
vim
如果想把图形界面也一起装上
在上面vim下面再加三行
@ X Window System
@ Desktop
@ Desktop Platform
启动各项服务
/etc/init.d/dhcpd restart;/etc/init.d/xinetd restart;/etc/init.d/httpd restart
centos6.2 with kickstart网络启动自动安装centos6.2 x64(KickStart+PXE+httpd+DHCP+TFTP)
参考文章 http://blog.csdn.net/silent1/article/details/7635646
进入正题:
kickstart服务器,操作系统是centos6.2 x64
yum install dhcp tftp* xinetd httpd syslinux
vim /etc/xinetd.d/tftp
disable=no
将/var/lib/tftpboot链接到/tftpboot
ln -s /var/lib/tftpboot /tftpboot
建立安装源
挂载centos盘
mount -o loop -t iso9660 centos.iso /misc/cd
复制安装centos所需启动菜单和内核、ramdisk镜像文件到tftp
cp /usr/share/syslinux/pxelinux.0 /usr/share/syslinux/vesamenu.c32 /misc/cd/images/pxeboot/vmlinuz /misc/cd/images/pxeboot/initrd.img /misc/cd/isolinux/*.msg /misc/cd/isolinux/memtest /misc/cd/isolinux/splash.jpg /tftpboot
建立pxelinux.cfg目录
mkdir -p /tftpboot/pxelinux.cfg
制造启动菜单
cp /misc/cd/isolinux/isolinux.cfg /tftpboot/pxelinux.cfg/default
修改内容
vim /tftpboot/pxelinux.cfg/default
# /tftpboot/pxelinux.cfg/default(/misc/cd/isolinux/isolinux.cfg)
default vesamenu.c32
#prompt 1
timeout 30
display boot.msg
menu background splash.jpg
menu title Come on,let's get it started!
menu color border 0 #ffffffff #00000000
menu color sel 7 #ffffffff #ff000000
menu color title 0 #ffffffff #00000000
menu color tabmsg 0 #ffffffff #00000000
menu color unsel 0 #ffffffff #00000000
menu color hotsel 0 #ff000000 #ffffffff
menu color hotkey 7 #ffffffff #ff000000
menu color scrollbar 0 #ffffffff #00000000
label CentOS Linux 6.2 x64
menu label ^Install CentOS 6.2 x64
menu default
kernel vmlinuz
append ks=http://192.168.44.250/ks/centos6/ks.cfg initrd=initrd.img ksdevice=eth0
label CentOS Linux 6.2 x64 vesa mode
menu label Install system with ^basic video driver
kernel vmlinuz
append ks=http://192.168.44.250/ks/centos6/ks.cfg initrd=initrd.img ksdevice=eth0 xdriver=vesa nomodeset
label rescue
menu label ^Rescue installed system
kernel vmlinuz
append initrd=initrd.img rescue
label local
menu label Boot from ^local drive
localboot 0xffff
label memtest86
menu label ^Memory test
kernel memtest
append -
在apache的发布目录中放上安装源
cp -a /misc/cd/* /var/www/html/ks/centos6
配置dhcp
vim /etc/dhcpd.conf
ddns-update-style interim;
ignore client-updates;
next-server 192.168.44.250;
filename "pxelinux.0";
allow booting;
allow bootp;
subnet 192.168.44.0 netmask 255.255.255.0 {
# — default gateway
option routers 192.168.44.1;
option subnet-mask 255.255.255.0;
# option nis-domain “domain.org”;
option domain-name "admaster.com.cn";
option domain-name-servers 202.106.195.68;
option time-offset -18000; # Eastern Standard Time
range 192.168.44.100 192.168.44.120;
}
制造ks.cfg
vim /var/www/html/ks/centos6/ks.cfg
# centos6/ks.cfg
firewall --disabled
install
url --url http://192.168.44.250/ks/centos6 text
firstboot --disable
rootpw admaster
auth --useshadow --enablemd5
lang en_US
keyboard us
selinux --disabled
logging --level=info
reboot
timezone --isUtc Asia/Shanghai
network --bootproto=dhcp --device=eth0 --onboot=on
zerombr
bootloader --location=mbr
clearpart --all --initlabel
part swap --fstype="swap" --size=4096
part /boot --fstype="ext4" --size=200
part / --fstype="ext4" --size=1 --grow
%packages
openssh-server
openssh
vim
如果想把图形界面也一起装上
在上面vim下面再加三行
@ X Window System
@ Desktop
@ Desktop Platform
启动各项服务
/etc/init.d/dhcpd restart;/etc/init.d/xinetd restart;/etc/init.d/httpd restart
相关文章推荐
- 使用PXE+DHCP+Apache+Kickstart无人值守安装CentOS5.8 x86_64
- 使用PXE+DHCP+Apache+Kickstart无人值守安装CentOS5.8 x86_64
- 使用PXE+DHCP+Apache+Kickstart无人值守安装CentOS5.8 x86_64
- CentOS6.2部署Kickstart无人值守环境
- CentOS6.4-x86_64搭建cobbler+kickstart的网络无盘启动服务器
- CentOS6.2部署Kickstart无人值守环境
- 使用PXE+DHCP+Apache+Kickstart无人值守安装CentOS5.8 x86_64 推荐
- Centos5.5 X86_64实战KickStart自动化安装
- 使用PXE+DHCP+Apache+Kickstart无人值守安装CentOS5.8 x86_64
- 脚本部署CentOS 6.0的PXE+DHCP+TFTP+kickstart安装环境
- 网络无人自动安装centos 6.2 + PXE + httpd + kickstart
- centos6.2_X86_64系统定制详细版
- CentOS 6 kickstart 部署脚本
- Centos6.2_X86_64 _LNMP安装全程实录
- centos用kickstart自动部署ubuntu12
- Virtualization With Xen On CentOS 6.2 (x86_64) (Paravirtualization & Hardware Virtualization)第一章
- redhat server 6.2 x86_64使用中国科技大的centos源
- Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (CentOS 6.2 x86_64)
- Kickstart+PXE自动部署CentOS6.6
- centos6.2 64 部署docker