部署环境
操作系统 :CentOS6.4 IP地址 :192.168.2.110 导入yum源 :rpm -Uvh http://mirrors.hustunique.com/epel/6/x86_64/epel-release-6-8.noarch.rpm 关闭iptables : service iptables stop;chkconfig iptables off 关闭selinux : setenforce 0;sed -i ‘s#SELINUX=enforcing#SELINUX=disabled#‘ /etc/sysconfig/selinux
安装
yum install -y cobbler cobbler-web dhcp httpd service httpd start service cobblerd start chkconfig cobblerd on chkconfig httpd on chkconfig dhcpd on
检查配置
#cobbler check The following are potential configuration items that you may want to fix: 1 : The ‘server‘ field in /etc/cobbler/settings must be set to something other than localhost, or kickstarting features will not work. This should be a resolvable hostname or IP for the boot server as reachable by all machines that will use it. 解决办法: sed -i "s#server: 127.0.0.1#server: 192.168.2.110#" /etc/cobbler/settings ----------------------------------------------------------- 2 : For PXE to be functional, the ‘next_server‘ field in /etc/cobbler/settings must be set to something other than 127.0.0.1, and should match the IP of the boot server on the PXE network. 解决办法: sed -i "s#next_server: 127.0.0.1#next_server: 192.168.2.110#" /etc/cobbler/settings ----------------------------------------------------------- 3 : SELinux is enabled. Please review the following wiki page for details on ensuring cobbler works correctly in your SELinux environment: https://github.com/cobbler/cobbler/wiki/Selinux 解决办法: 关闭selinux ----------------------------------------------------------- 4 : change ‘disable‘ to ‘no‘ in /etc/xinetd.d/tftp 解决办法: vim /etc/xinetd.d/tftp disable = no #yes改为no ----------------------------------------------------------- 5 : 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. 解决办法: cobbler get-loaders 运行此命令,需要联网出现*** TASK COMPLETE *** 代表ok ----------------------------------------------------------- 6 : change ‘disable‘ to ‘no‘ in /etc/xinetd.d/rsync 解决办法: vim /etc/xinetd.d/rsync disable = no #yes改为no ----------------------------------------------------------- 7 : reposync is not installed, need for cobbler reposync, install/upgrade yum-utils? 解决办法: 忽略 ----------------------------------------------------------- 8 : debmirror package is not installed, it will be required to manage debian deployments and repositories 解决办法: yum install -y debmirror ----------------------------------------------------------- 9 : ksvalidator was not found, install pykickstart 解决办法: yum install -y pykickstart ----------------------------------------------------------- 10 : 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 解决办法: # openssl passwd -1 -salt "sellsa" "123456" $1$sellsa$sTJi7XI8eS6lYe5O8F4Ae1 这个命令的用法,任意字符(sellsa)可以随便写,这个密码(123456)就是安装完系统root的密码了。替换配置文件里的字串。 vi /etc/cobbler/settings default_password_crypted: "$1$sellsa$sTJi7XI8eS6lYe5O8F4Ae1" ----------------------------------------------------------- 11 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them 解决办法: yum install -y cman fence-agents ----------------------------------------------------------- 12 : comment out ‘dists‘ on /etc/debmirror.conf for proper debian support 解决办法: vim /etc/debmirror.conf #@dists="sid"; 注释 ----------------------------------------------------------- 13 : comment out ‘arches‘ on /etc/debmirror.conf for proper debian support 解决办法: vim /etc/debmirror.conf #@arches="i386"; 注释 ----------------------------------------------------------- Restart cobblerd and then run ‘cobbler sync‘ to apply changes. #service cobblerd restart #cobbler sync
原文:http://www.cnblogs.com/sellsa/p/5135907.html