- 安装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
- 启动cobbler
[root 17:38 @ cobbler ~] systemctl start cobblerd.service
[root 17:39 @ cobbler ~] systemctl start httpd.service
- 使用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