Chinaunix首页 | 论坛 | 博客
  • 博客访问: 246138
  • 博文数量: 36
  • 博客积分: 1495
  • 博客等级: 上尉
  • 技术积分: 412
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-09 13:34
文章分类

全部博文(36)

文章存档

2016年(1)

2015年(12)

2014年(2)

2012年(4)

2011年(1)

2009年(6)

2008年(10)

我的朋友

分类: LINUX

2009-09-16 00:14:20

1.DHCP 配置
ddns-update-style interim;
ignore client-updates;
 
subnet 172.16.2.0 netmask 255.255.255.0 {
 
# --- default gateway
        option routers                  172.16.2.1;
        option subnet-mask              255.255.255.0;
 
        option nis-domain               "domain.org";
        option domain-name              "domain.org";
        option domain-name-servers      172.16.2.1;
 
        option time-offset              -18000; # Eastern Standard Time
        #       option ntp-servers              192.168.1.1;
#       option netbios-name-servers     192.168.1.1;
# --- 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 172.16.2.70 172.16.2.90;
        default-lease-time 21600;
        max-lease-time 43200;
allow booting; allow bootp; class "pxeclients" { match if substring(option vendor-class-identifier, 0, 9) = "PXEClient"; next-server 172.16.2.100; filename "pxelinux.0"; }
        # we want the nameserver to appear at a fixed address
 
}
 
2.tftp配置
 cat /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             = -s /tftpboot
        disable                 = no
        per_source              = 11
        cps                     = 100 2
        flags                   = IPv4
}
 
 
 
3.tftp目录下面需要拷贝相关启动文件
 
boot.cat  boot.msg      general.msg  isolinux.bin  linux-install  minstg2.img  param.msg   pxelinux.cfg  rescue.msg  stage2.img  vmlinuz
boot.iso  diskboot.img  initrd.img   ks.cfg        memtest        options.msg  pxelinux.0  README        splash.lss  TRANS.TBL
创建pxelinux.cfg目录,并且创建default文件
default linux
prompt 1
timeout 6
display boot.msg
F1 boot.msg
F2 options.msg
F3 general.msg
F4 param.msg
F5 rescue.msg
label linux
  kernel vmlinuz
  append initrd=initrd.img ks=nfs:172.16.2.100:/home/ks.cfg  ksdevice=eth0
label text
  kernel vmlinuz
  append initrd=initrd.img text
label ks
  kernel vmlinuz
append ks initrd=initrd.img
label local
  localboot 1
label memtest86
  kernel memtest
  append -
 
 
4.ks.cfg 文件配置
cat /home/ks.cfg
#platform=x86, AMD64, or Intel EM64T
# System authorization information
auth  --useshadow  --enablemd5
# System bootloader configuration
bootloader --location=mbr
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel
# Use text mode install
text
# Firewall configuration
firewall --enabled --ssh  --trust=eth0,eth1
# Run the Setup Agent on first boot
firstboot --disable
# System keyboard
keyboard us
# System language
lang en_US
# Installation logging level
logging --level=info
# Use NFS installation media
nfs --server=172.16.2.100 --dir=/mnt
# Network information
network --bootproto=dhcp --device=eth0 --onboot=on
network --bootproto=dhcp --device=eth1 --onboot=on
# Reboot after installation
reboot
#Root password
rootpw  skymobi2009
 
# SELinux configuration
selinux --disabled
# System timezone
timezone  America/New_York
# Install OS instead of upgrade
install
# X Window System configuration information
xconfig  --defaultdesktop=GNOME --depth=8 --resolution=640x480
# Disk partitioning information
part /sanpapp --bytes-per-inode=4096 --fstype="ext3" --grow --maxsize=75000 --size=75000
part / --asprimary --bytes-per-inode=4096 --fstype="ext3" --grow --maxsize=35000 --size=35000
part swap --asprimary --bytes-per-inode=4096 --fstype="swap" --grow --maxsize=16000 --size=16000
 
%packages
@base-x
@base
@development-tools
5.关闭iptables
6.需要安装系统的服务器开启PXE启动
7.如果一批服务器当中有部份服务器需要安装特殊的软件包可通过DHCP给他引导不同的ks.cfg
在原来的DHCP服务器当中加入以下配置
host ns {
                next-server ftp服务器地址;
                hardware ethernet 12:34:56:78:AB:CD;  服务器MAC地址
                fixed-address 207.175.42.254;  给服务器分配置IP地址
                 filename "linux-install/pxelinux.0";

        }
 
 
阅读(1009) | 评论(0) | 转发(0) |
0

上一篇:nagios 配置

下一篇:修复xen虚拟机方法

给主人留下些什么吧!~~