在centos6上部署安装cobbler

  1. 安装cobbler,基于网络安装需要准备这个几个包 tftp-server、dhcp、httpd,安装cobbler会安装依赖tftp-sercer、httpd、syslinux
yum install cobbler dhcp
  1. 按照 cobbler 说明依次设定好对应的服务,其中有些步骤是可以跳过的
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 : change 'disable' to 'no' in /etc/xinetd.d/tftp
4 : 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.
5 : change 'disable' to 'no' in /etc/xinetd.d/rsync
6 : debmirror package is not installed, it will be required to manage debian deployments and repositories
7 : ksvalidator was not found, install pykickstart
8 : 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
9 : 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.
vim /etc/cobbler/settings
# 修改下面这些项
1.server: 192.168.30.6
2.next_server: 192.168.30.6
3.manage_dhcp: 1
4.default_password_crypted: "$1$gfYZXXpL$NwWXlzQ/my2whkvoaj9PY0"  #修改默认密码
# 修改tftp服务为启动
chkconfig tftp on
# 下载开机启动相关文件
cobbler get-loaders
# 设置dhcp,修改subnet
vim /etc/cobbler/dhcp.template

3. 导入yum源和配置
```bash
cobbler import --path=/mnt/cdrom1/ --name=Centos6.10-x86_64 --arch=x86_64
# 准备kickstart配置文件,通过这个程序配置好相应的配置文件,centos 6 和 7需要在对应的系统上配置
system-config-kickstart 
# 修改配置文件中的安装源
vim /var/lib/cobbler/kickstarts/ks6-mini.cfg #将url修改为 url --url=$tree ,实现key验证可以在安装系统之后将公钥追加写入到.ssh目录 authorized_keys 文件中
# 查看导入的发行版系统信息
cobbler distro list
# 添加配置菜单
cobbler profile add --name=Centos6.10-x86_64_Mini --distro=Centos6.10-x86_64 --kickstart=/var/lib/cobbler/kickstarts/ks6-mini.cfg
# 查看启动的菜单
cat /var/lib/tftpboot/pxelinux.cfg/default
# 同步cobbler配置
cobbler sync
  1. 检查有没有问题就可以在新电脑上测试安装了,如果还是有问题重启一下服务器
    在浏览器中打开 ks 文件,确保文件内容可以打开
# 检查ks应答文件是否有语法错误 需要安装 pykickstart 包
ksvalidator /PATH/TO/KICKSTART_FILE
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值