在 CentOS Linux 上安装 Cobbler 批量部署系统
精选 转载guhongying009 博主文章分类:Linux服务
Restart cobblerd and then run 'cobbler sync' to apply changes.
现在来修复上面三个问题,我们希望能让这台 cobbler 服务器能同时部署 CentOS/Fedora 和 Debian/Ubuntu 系统,所以需要安装 debmirror,安装 debmirror-20090807-1.el5.noarch.rpm 前需要先安装依赖包:
# yum install wget
# yum install ed patch perl perl-Compress-Zlib perl-Cwd perl-Digest-MD5
perl-Digest-SHA1 perl-LockFile-Simple perl-libwww-perl
# wget ftp://fr2.rpmfind.net/linux/epel/5/ppc/debmirror-20090807-1.el5.noarch.rpm
# rpm -ivh debmirror-20090807-1.el5.noarch.rpm
修改 /etc/debmirror.conf 配置文件,注释掉 @dists 和 @arches 两行:
# vi /etc/debmirror.conf
...
#@dists="sid";
@sections="main,main/debian-installer,contrib,non-free";
#@arches="i386";
...
用 openssl 生成一串密码后加入到 cobbler 的配置文件(/etc/cobbler/settings)里,替换 default_password_crypted 字段:
# openssl passwd -1 -salt 'www.example.com' 'example'
$1$www.example$T5FgCHY2P0NDr6JmbN0Bl0
# vi /etc/cobbler/settings
default_password_crypted: "$1$www.example$T5FgCHY2P0NDr6JmbN0Bl0"
安装 cman:
# yum install cman
修复完成,再用 cobbler check 检查一下,确认没问题后用 cobbler sync 做同步操作:
# cobbler check
No configuration problems found. All systems go.
# cobbler sync
导入 ISO
挂载 CentOS-6.2-x86_64-bin-DVD1.iso 安装光盘然后导入到 cobbler(注意这个 iso 文件有 4GB 多,导入可能需要一段时间),导入成功后 cobbler list 查看一下:
# mount -o loop -t iso9660 CentOS-6.2-x86_64-bin-DVD1.iso /mnt
# cobbler import --path=/mnt --name=CentOS-6.2-x86_64-bin-DVD1 –arch=x86_64
# cobbler sync
# cobbler list
distros:
CentOS-6.2-bin-DVD1-x86_64
profiles:
CentOS-6.2-bin-DVD1-x86_64
systems:
repos:
p_w_picpaths:
测试
最后创建一台虚拟机测试一下,把虚拟机设置成网络 PXE 启动(和 cobbler 在同一个网络),启动后就可以看到 Cobbler 引导界面,看到界面后选择 CentOS-6.2-bin-DVD1-x86_64 条目就可以顺利开始无人工干预安装系统,Cobbler 引导界面如下:
安装完系统后默认的密码是啥呢?根据 sample.ks 的配置提示,这个密码 $default_password_crypted 就是我们上面用 openssl passwd -1 -salt ‘www.example.com’ ‘example’ 生成的密码,所以这里的 root 密码是 example:
# cat /var/lib/cobbler/kickstarts/sample.ks
...
#Root password
rootpw --iscrypted $default_password_crypted
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
在Linux系统的Ubuntu中部署Git
本文介绍在Linux操作系统的Ubuntu版本中,配置分布式开源版本控制系统Git,随后基于Git克隆GitHub中项目的代码的详细方法~
Linux Ubuntu Git 版本控制 分布式版本控制 -
CentOS 系统安装FreeSWITCH
CentOS7.9 编译安装FreeSWITCH服务
lua json git -
在 CentOS Linux 上安装 Cobbler 批量部署系统
http://www.linuxde.net/2012/03/9127.html
centos 在 CentOS Linux 上安装 C -
Cobbler批量安装系统
cobbler批量安装linux系统
cobbler 批量装系统