安安 - cobbler
type: channel
link: https://blog.90.vc/tag/cobbler/
items: cobbler安装及配置

cobbler安装及配置
type: item
date: 2019-01-24T07:16:00+00:00
description: 环境准备操作系统：Centos 7 1810安装方式：YUM配置epel的YUM源安装cobbleryum install cobbler cobbler-web pykickstart httpd dhcp tftp-server启动httpd、tftp、cobblerd服务，并设置为开机启动systemctl start cobblerd systemctl start httpd systemctl start tftp #设置相关服务开机启动 systemctl enable cobblerd systemctl enable httpd systemctl enable tftp systemctl enable rsyncd配置cobbler执行cobbler check命令检查cobbler设置这里可能会报如下错误httpd does not appear to be running and proxying cobbler, or SELinux is in the way. Original traceback: Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/cobbler/cli.py", line 251, in check_setup s.ping() File "/usr/lib64/python2.7/xmlrpclib.py", line 1233, in __call__ return self.__send(self.__name, args) File "/usr/lib64/python2.7/xmlrpclib.py", line 1591, in __request verbose=self.__verbose File "/usr/lib64/python2.7/xmlrpclib.py", line 1273, in request return self.single_request(host, handler, request_body, verbose) File "/usr/lib64/python2.7/xmlrpclib.py", line 1321, in single_request response.msg, ProtocolError: <ProtocolError for 127.0.0.1:80/cobbler_api: 503 Service Unavailable>根据提示，可以确定是selinux引起的问题，可以将selinux关掉或者执行如下操作setsebool -P httpd_can_network_connect true这里建议关掉selinux，如果不想关的话，则参考如下链接的设置方法https://github.com/cobbler/cobbler/wiki/Selinux再次执行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 : 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 4 : change 'disable' t…