1. 安装
获取epel repo:
rpm -ivh /pub/epel/6Server/x86_64/epel-release-6-8.noarch.rpm
rpm --import /pub/epel/RPM-GPG-KEY-EPEL-6
安装 cobbler:
yum install -y cobbler cobbler-web
2. 配置
chkconfig httpd on
chkconfig cobblerd on
chkconfig xinetd on
chkconfig tftp on
chkconfig rsync on
如果要用到dhcp的话,请安装 dhcp包
yum install -y dhcp
使用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.
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.
3 : 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.
4 : since iptables may be running, ensure 69, 80/443, and 25151 are unblocked
5 : debmirror package is not installed, it will be required to manage debian deployments and repositories
6 : ksvalidator was not found, install pykickstart
7 : 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
1和2提示:将 /etc/cobbler/settings 中的 server 和 next_server的 127.0.0.1, 改为服务器的地址
3提示运行cobbler get-loaders
4提示防火墙开放的端口:iptables -I INPUT -p tcp -m multiport --dport 69, 80, 443, 25151 -j ACCEPT
5提示下载 debmirror包: yum install -y debmirror
6提示安装pykickstart包: yum install -y pykickstart
7提示修改默认的密码 : openssl passwd -l, 然后替换 /etc/cobbler/settings中的 default_password_crypted:值
安装完需要重启 cobbler,然后在运行 cobbler check,看有什么问题
如果有
3 : comment out 'dists' on /etc/debmirror.conf for proper debian support
4 : comment out 'arches' on /etc/debmirror.conf for proper debian support
就是要注释掉debmirror.conf中的一下两行
#@dists="sid";
#@arches="i386";
如果要用到dhcp的话,需要开启 /etc/cobbler/settings
manage_dhcp: 0
把0修改为1
而且要修改dhcpd的模板配置文件:
/etc/cobbler/dhcp.template
只修改相应的地址相关的即可
然后重启 /etc/init.d/cobblerd restart
同步cobbler配置
cobbler sync
再行检查 cobbler check
No configuration problems found. All systems go.
好了,万里长征终于 迈出了坚实的一步,接下来就要实干了
导入系统镜像,当然要保证/var/www/cobbler的空间够大,然后将iso文件或dvd系统盘挂载到某处,确定是32位还是64位的系统
cobbler import --name=CentOS6.4-x86_64 --path=/mnt --arch=x86_64
添加profile
cobbler profile add --name=CentOS6.4 --distro=CentOS6.4_x86_64
--name是profile的名字,就是在引导的时候显示在选择菜单的名字, --distro就是用cobbler import导入时所命名的distribution的名字
distro 和 profile是最基本的两个
distro是什么呢? distro是指定使用什么进行引导,也可以单独添加 distro
例如: cobbler distro add --name=rhel6.4 --kernel=path --initrd=path
这样再通过网络引导的时候就会使用所指定的kernel进行引导了
profile是什么呢? profile是显示在选择菜单上的,使用指定的distro进行引导,并且可以使用自己的ks文件进行无人参与安装,默认是使用cobbler自带的ks文件
看一下效果:
后续继续奉上更精彩的cobbler内容,敬请期待
阅读(2513) | 评论(0) | 转发(0) |