linux部署Cobbler自动安装Centos7与Ubuntu

2.使用Centos 7部署Cobbler,安装Centos7,安装Ubuntu

部署Cobbler
2.1基础环境配置

关闭selinux

setenforce 0

yum配置

#安装wget,并添加aliyun仓库及epel仓库
yum install -y wget 
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
#将旧仓库配置转移到某目录中
mkdir /etc/yum.repos.d/old && mv /etc/yum.repos.d/C* /etc/yum.repos.d/old/
2.2Cobbler服务部署

安装服务

yum -y install cobbler cobbler-web dhcp tftp-server pykickstart httpd xinetd

设置服务自启动

systemctl enable httpd 
systemctl enable xinetd 
systemctl enable rsyncd 
systemctl enable tftp 
systemctl enable cobblerd

启动服务

systemctl restart httpd 
systemctl restart xinetd 
systemctl restart tftp 
systemctl restart cobblerd

执行cobbler check检查环境

[root@client1 ~]# 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' to 'no' in /etc/xinetd.d/tftp
5 : 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&#

你可能感兴趣的:(运维)