Cobbler部署

# CentOS Linux release 7.3.1611

yum install epel-release -y

yum -y install cobbler cobbler-web syslinuxpykickstart xinetd httpd dhcp bind fence-agents debmirror rsync dnsmasq

systemctl start cobblerd httpd

systemctl enable cobblerdhttpd

systemctl disable NetworkManager firewalld

sed -i 's/^SELINUX=.*/SELINUX=disabled/g'/etc/selinux/config

sed -i '14s/yes/no/g' /etc/xinetd.d/tftp

reboot

vim /etc/debmirror.conf

# 注释掉@dists="sid"与@arches="i386即可

@dists="sid";

@arches="i386";

# 生成一个加密的密码,密码自定义

openssl passwd -1

# 编辑/etc/cobbler/settings

default_password_crypted: "加密的密码"

manage_dhcp: 1

manage_dns: 1

manage_rsync: 1

pxe_just_once: 1

next_server: 10.10.10.10

server: 10.10.10.10

# 编辑/etc/cobbler/dnsmasq.template修改dhcp范围,通过mac限定dhcp响应(可选):

dhcp-range=10.10.10.20,10.10.10.200

#dhcp-ignore=tag:!known

#dhcp-host=00:0C:29:B5:AA:A0

#dhcp-host=03:BC:2B:B5:AA:A8

….

# 修改/etc/cobbler/modules.conf,修改配置启用dnsmasq:

[dns]

module = manage_dnsmasq

[dhcp]

module = manage_dnsmasq

….

## 接着操作

cobbler get-loaders

systemctl restart cobblerd xinetd rsyncd

systemctl enable xinetd rsyncd

cobbler check

cobbler sync

mkdir /mnt/iso

mount -o loop CentOS-7-x86_64-DVD-1511.iso/mnt/iso/

cobbler import --arch=x86_64--path=/mnt/iso --name=CentOS7

# 验证导入的distro

cobbler distro list

# 为CentOS7保存新的Kickstart文件/var/lib/cobbler/kickstarts/

# 将更新后的配置文件同步到cobbler服务器

cobbler profile edit --name=CentOS7-x86_64--kickstart=/var/lib/cobbler/kickstarts/CentOS7.ks

cobbler sync

# 或者操作Web界面

https://YourServerIP/cobbler_web

user:cobbler

pass:cobbler

你可能感兴趣的:(Cobbler部署)