啥也没写
分类: 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.1的ip改为虚拟机提供dhcp和tftp的ip 第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
转: