手机版
你好,游客 登录 注册
背景:
阅读新闻

Cobbler全自动安装CentOS

[日期:2013-12-15] 来源:Linux社区  作者:koumm [字体:大 中 小]

八、添加指定客户机系统配置到Cobbler
1. 指定一个网段使用特定的装机配置
cobbler system add --name=test_000 --ip=192.168.1.0/24 --profile=CentOS-5.9-x86_64

2. 添加一个指定服务器的装机配置
指定服务器的mac地址,并设置好主机名、IP地址等信息,需要提示知道服务器MAC地址,根据MAC应用到具体机器上。   

还可以指定ks参数。--kickstart=/var/lib/cobbler/kickstarts/webserver.ks
cobbler system add --name=test_001 --hostname=test_001 --mac=00:0C:29:E3:81:32 --interface=eth0 --ip-address=192.168.1.123 --subnet=255.255.255.0 --gateway=192.168.1.1 --static=1 --profile=Centos-5.9-x86_64

3. 修改system配置
机器IP地址变更为192.168.10.110   

cobbler system add --name=test_001 --ip=192.168.1.110

变更system配置名称 

cobbler system rename --name=test001 --newname=abc

4. 删除system配置
需要删除的profile名称为test_001 

cobbler system remove --name=test_001

5. 查看定义的系统列表
 
cobbler system list
test_001

九、安装客户端操作系统
(1) 通过网卡pxe启动
(2) 自动完成安装
 
十、重装客户端操作系统 
wget ftp://rpmfind.net/linux/epel/5/i386/koan-1.6.6-1.el5.noarch.rpm
rpm -ivh koan-1.6.6-1.el5.noarch.rpm

查看cobbler server上的配置文件,对于centos5.x 的系统koan不能采用yum安装,否则会因Python版本过低而报错。
# koan --server=192.168.1.10 --list=profiles

- looking for Cobbler at http://192.168.1.10/cobbler_api
- reading URL: http://192.168.1.10/cblr/svc/op/ks/profile/Centos-5.9-x86_64
install_tree: http://192.168.1.10/cobbler/ks_mirror/Centos-5.9-x86_64
downloading initrd initrd.img to /boot/initrd.img
url=http://192.168.1.10/cobbler/images/Centos-5.9-x86_64/initrd.img
- reading URL: http://192.168.1.10/cobbler/images/Centos-5.9-x86_64/initrd.img
downloading kernel vmlinuz to /boot/vmlinuz
url=http://192.168.1.10/cobbler/images/Centos-5.9-x86_64/vmlinuz
- reading URL: http://192.168.1.10/cobbler/images/Centos-5.9-x86_64/vmlinuz
- ['/sbin/grubby', '--add-kernel', '/boot/vmlinuz', '--initrd', '/boot/initrd.img', '--args', '"ks=http://192.168.1.10/cblr/svc/op/ks/profile/Centos-5.9-x86_64 ksdevice=link kssendmac lang= text "', '--copy-default', '--make-default', '--title=kick1387098833']
- reboot to apply changes

# reboot

reboot重启服务器后,客户端服务器会自动重新安装操作系统

更多CentOS相关信息见CentOS 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=14

linux
相关资讯       Cobbler 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款