3 月 102014
 

技术上面就不详说了。需要 dhcp + tftp + kickstart

dhcp + tftp 的安装参照鸟叔的博客 http://linux.vbird.org/linux_enterprise/0120installation.php

我与之比较不同的是我的dhcp设置要有IP段

[root@pxe-test1 ~]# cat /etc/dhcp/dhcpd.conf
option domain-name pxe;
option domain-name-servers 8.8.8.8, 114.114.114.114;

default-lease-time 600000;
max-lease-time 7200000;
subnet 192.168.0.0 netmask 255.255.0.0 {
option routers 192.168.0.19;
next-server     192.168.3.8;
filename        “pxelinux.0”;
pool {
range 192.168.10.1 192.168.20.254;
}

}

后面的都是按照鸟哥的文章做的,他写的够详细。

特别要注意nfs共享的问题,要加2个参数,我已在另一个博客中写明了。否则nfs无法访问。

还有的就是自动化安装,鸟哥是纯文本的写法,不是很方便。kickstart可以参考http://litaotao.blog.51cto.com/6224470/1307996

记得安装下system-config-kickstart.noarch,然后终端运行system-config-kickstart即可。

然后生成ks.cfg文件

[root@pxe-test1 ~]# cat /home/tftp/pxelinux.cfg/default
UI vesamenu.c32
TIMEOUT 300
DISPLAY ./boot.msg
MENU TITLE Welcome to PXE Server System
LABEL local
MENU LABEL Boot from local drive
MENU DEFAULT
localboot 0
LABEL network1
MENU LABEL  Install CentOS 6.4
kernel ./kernel/centos6.5/vmlinuz
append initrd=./kernel/centos6.5/initrd.img ks=nfs:192.168.0.100:/extra/nfs_share/ks.cfg

这里有个比较坑的就是 ks.cfg必须要是远程的,我试着放在tftp服务器上不可以的。

但是看文章介绍来说,这个安装比较麻烦,都推荐cobbler,明天试试cobbler。

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理

This website stores cookies on your computer. These cookies are used to provide a more personalized experience and to track your whereabouts around our website in compliance with the European General Data Protection Regulation. If you decide to to opt-out of any future tracking, a cookie will be setup in your browser to remember this choice for one year.

Accept or Deny