Chinaunix首页 | 论坛 | 博客
  • 博客访问: 5583524
  • 博文数量: 1637
  • 博客积分: 18684
  • 博客等级: 上将
  • 技术积分: 15227
  • 用 户 组: 普通用户
  • 注册时间: 2010-06-02 10:28
文章分类

全部博文(1637)

文章存档

2021年(12)

2020年(43)

2019年(27)

2018年(44)

2017年(50)

2016年(47)

2015年(15)

2014年(21)

2013年(43)

2012年(143)

2011年(228)

2010年(263)

2009年(384)

2008年(246)

2007年(30)

2006年(38)

2005年(2)

2004年(1)

分类: LINUX

2011-05-25 09:51:10

Cobbler 无人值守安装

Workstation下用ISO安装一台最小化centos5.5虚拟机

安装vmtools

wget

rpm -ivh rpmforge-release-0.5.2-2.el5.rf.i386.rpm

yum install cobbler tftp-server dhcp httpd xinetd

cobbler check

vi /var/lib/cobbler/settings //把两处127.0.0.1ip改为虚拟机提供dhcptftpip 17行的manage_dhcp 0改为1

vi /etc/xinetd.d/tftp
//
把第14行的= yes 改为= no

yum install system-config-kickstart
//
图形化界面执行,生成kickstart的配置文件。我是google找了个ks.cfg文件按照我的配置稍微改了一下。

保存在/etc/cobbler目录文件内容如下

============================================================

#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 graphical install

graphical

# Firewall configuration

firewall --disabled

# 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=192.168.161.161 --dir=/

# Network information

network --bootproto=dhcp --device=eth0 --onboot=on

#Root password

rootpw --iscrypted $1$zlwzVSO6$.mAx831sa.sEeK2Mjzkyh/

# SELinux configuration

selinux --disabled

# System timezone

timezone
Asia/Shanghai

# Install OS instead of upgrade

install

# X Window System configuration information

xconfig
--defaultdesktop=GNOME --depth=16 --resolution=1024x768

# Disk partitioning information

part swap --bytes-per-inode=4096 --fstype="swap" --size=1024

============================================================

cat /etc/cobbler/ks.cfg > /etc/cobbler/default.ks
//
默认的ks文件是空的,把刚才生成的ks.cfg文件写到默认文件里去

cp /usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample /etc/dhcpd.conf

vi /etc/dhcpd.conf

vi /etc/cobbler/dhcp.template

改成如下内容:根据实际情况可能有所不同

============================================================

ddns-update-style interim;

ignore client-updates;

subnet 192.168.161.0 netmask 255.255.255.0 {

# --- default gateway


option routers
192.168.161.161;


option subnet-mask
255.255.255.0;


option nis-domain
"domain.org";


option domain-name
"domain.org";


option domain-name-servers
192.168.161.161;


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 192.168.161.170 192.168.161.180;


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 192.168.161.161;


}

}

============================================================

# ******************************************************************

# Cobbler managed dhcpd.conf file

#

# generated from cobbler dhcp.conf template ($date)

#

# ******************************************************************

ddns-update-style interim;

allow booting;

allow bootp;

ignore client-updates;

set vendorclass = option vendor-class-identifier;

subnet 192.168.161.0 netmask 255.255.255.0 {


option routers
192.168.161.161;


option subnet-mask
255.255.255.0;


range dynamic-bootp
192.168.161.162 192.168.161.180;


filename
"/pxelinux.0";


default-lease-time
21600;


max-lease-time
43200;


next-server
$next_server;

}

$insert_cobbler_system_definitions

============================================================

cobbler import --mirror=/media/CentOS --name=CentOS5.5
//
这步要很久。。。。。。喝茶去吧

cobbler list //检查一下

正常返回

distro CentOS5.5-xen-i386


profile CentOS5.5-xen-i386

distro CentOS5.5-i386


profile CentOS5.5-i386


cobbler sync

service httpd start

service xinetd start

service dhcpd start

service cobblerd start

服务端到此配置完毕

客户端

Workstation新建一台虚拟机

选择网络启动

启动后会停留在boot

此时手工输入menu回车

然后选择第二项即可正常安装。


注意安装好的系统默认口令是:cobbler

 

转:

阅读(1079) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~