CentOS 6.3上安装部署 Cobbler(2)

2.检查和修改Cobbler配置

# cobbler check

这是cobbler自带的检测命令,提供cobbler必须的一些设置的检查,运行之后根据不同的环境,检测出来的结果也是不同的,不过所有的检测中我们都可以按照他的提示,一步步的来完善配置。

我们这里运行之后发现如下的错误:

The following are potential configuration items that you may want to fix:
 
1: some network boot-loaders are missing from /var/lib/cobbler/loaders, you may run ‘cobbler get-loaders’ to download them, or, if you only want to handle x86/x86_64 netbooting, you may ensure that you have installed a *recent* version of the syslinux package installed and can ignore this message entirely.  Files in this directory, should you want to support all architectures, should include pxelinux.0, menu.c32, elilo.efi, and yaboot.The ‘cobbler get-loaders’ command is the easiest way to resolve these requirements.
2 : ksvalidator was not found, install pykickstart
3 : debmirror package is not installed, it will be required to manage debian deployments and repositories
4 : The default password used by the sample templates for newly installed machines
      (default_password_crypted in /etc/cobbler/settings) is still set to ‘cobbler’ and should be changed,
      try: “openssl passwd -1 -salt ‘random-phrase-here’ ‘your-password-here’” to generate new one
5 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them
 
Restart cobblerd and then run ‘cobbler sync’ to apply changes.

我们一个个来解决:

修复问题1:

# cobbler get-loader
即可获取各ios的bootloader

修复问题2:

安装ksvalidator
# yum install pykickstart

修复问题3:

cobbler服务器能同时部署CentOS/Fedora/Debian/Ubuntu系统,所以需要安装debmirror,安装debmirror-20090807-1.el5.noarch.rpm,在此之前,需要先安装一些其他的依赖包:

# 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 两行

# vim /etc/debmirror.conf

#@dists=”sid”;
@sections=”main,main/debian-installer,contrib,non-free”;
#@arches=”i386″;

修复问题4:

修改默认系统密码用 openssl 生成一串密码后加入到 cobbler 的配置文件(/etc/cobbler/settings)里,替换 default_password_crypted 字段:

# openssl passwd -1 -salt ‘bihan’ ‘Abcd1234′
$1$bihan$9ZUK/6ZK0WPa/L5/9UHgj1
# vi /etc/cobbler/settings

修改内容如下:

default_password_crypted: “$1$bihan$9ZUK/6ZK0WPa/L5/9UHgj1″

修复问题5:

这属于电源管理的选项,根据提示安装cman即可。
# yum install cman

所有修复都结束之后,重新运行 cobbler check 检查一下,之后,运行cobbler sync来同步配置信息,如果没有发现问题,应该显示是这样的:

# cobbler check
No configuration problems found.  All systems go.

# cobbler sync

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/752413f3152b6297e61b315ecdae25c5.html