cobbler无人值守安装

  1. 安装cobbler
    yum install –y cobbler cobbler-web
[root 16:26 @ centos7 ~] rpm -qa |grep cobbler
cobbler-web-2.8.5-0.3.el7.noarch
cobbler-2.8.5-0.3.el7.x86_64

安装时会自动安装Apache等依赖软件
2. host解析(在任何的系统里最好做host解析)

[root 16:25 @ centos7 ~] cat /etc/hosts | grep cobbler
151.101.0.133    cobbler.github.io
[root 16:26 @ centos7 ~] ping cobbler.github.io
PING cobbler.github.io (151.101.0.133) 56(84) bytes of data.
64 bytes from cobbler.github.io (151.101.0.133): icmp_seq=2 ttl=128 time=109 ms

  1. 启动cobbler
[root 17:38 @ cobbler ~] systemctl start cobblerd.service
[root 17:39 @ cobbler ~] systemctl start httpd.service
  1. 使用cobbler check检查配置文件有什么短缺,缺什么配置什么
[root 16:29 @ centos7 ~] 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 : enable and start rsyncd.service with systemctl
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 appl

(1) 修改 /etc/cobbler/settings 中的server

[root 16:32 @ centos7 ~] grep ^server /etc/cobbler/settings
server: 10.0.0.201

修改完配置文件后重启生效
重启以后再进行检查 发现缺省项已经没有之前的提示了
(2) 修改 /etc/cobbler/settings 中的next_server

 [root 16:35 @ centos7 ~] grep ^next /etc/cobbler/settings
next_server: 10.0.0.201

(3) 修改/etc/xinetd.d/tftp

[root 16:36 @ centos7 ~] grep disab /etc/xinetd.d/tftp 
	disable			= no

(4) 下载cobbler get-loaders

[root 16:36 @ centos7 ~] cobbler get-loaders
[root 16:36 @ centos7 ~] ll /var/lib/cobbler/loaders

在这里插入图片描述

(5) 启动并且开机自启rsync服务

[root 16:36 @ centos7 ~] systemctl start rsyncd.service
[root 16:36 @ centos7 ~]  systemctl enable rsyncd.service

在这里插入图片描述
(6) 安装pykickctart

 [root 16:36 @ centos7 ~] yum install pykickctart

在这里插入图片描述
(7) 修改密码文件
在这里插入图片描述
(8) 安装软件
在这里插入图片描述
(9) 将/etc/cobbler/settings中的DHCP默认值改为1,并且安装DHCP服务

[root 19:54 @ cobbler ~] grep ^manage_dhcp  /etc/cobbler/settings 
manage_dhcp: 1

(10) 修改 /etc/cobbler/dhcp.template 21,26s###gc
在这里插入图片描述
注意:安装完成以后因为版本的问题所以要卸载python软件 重新安装

[root@cobbler ~] rpm -qa | grep "python2-django"
python2-django-1.11.20-1.el7.noarch
[root@cobbler ~] rpm -e --nodeps python2-django-1.11.20-1.el7.noarch
[root@cobbler ~] yum install python2-pip
[root@cobbler ~] pip install --upgrade pip
[root@cobbler ~] pip install Django==1.8.17
 

在这里插入图片描述

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值