cobbler 无人值守系统安装

概述

本文适合centos6 | centos7 系统的安装

执行操作之前:检查系统防火墙,selinux是否关闭,网络链接是否畅通。

1 Cobbler是一个免费开源系统安装部署软件,用于自动化网络安装操作系统。
2 Cobbler集成了DNS DHCP软件包更新,以及配置管理,方便操作系统安装自动化。
3 Cobbler支持命令行管理, web界面管理, 同时提供API接口便于二次开发。
4 Cobbler客户端Koan支持虚拟机安装和操作系统重新安装,使重装系统更便捷。

① cobbler系统安装

笔记链接 :安装第一个系统

② cobbler自动重装系统

笔记链接:重装系统

③ cobbler自定义安装仓库

笔记链接:自定义cobbler仓库

④ cobbler自定义安装

 笔记链接:cobbler自定义安装

 

自动执行脚本(仅供参考

 

wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum makecache
yum install cobbler cobbler-web pykickstart httpd dhcp tftp xinetd debmirror cman fence-agents -y

systemctl start cobblerd && systemctl start httpd    

sed -ri '/allow_dynamic_settings:/c \allow_dynamic_settings: 1' /etc/cobbler/settings
systemctl restart cobblerd    
cobbler setting edit --name=server --value=10.0.0.61
cobbler setting edit --name=next_server --value=10.0.0.61    
sed -ri '/disable/c\disable = no' /etc/xinetd.d/tftp 
systemctl enable xinetd rsyncd
systemctl restart xinetd rsyncd

#cobbler get-loaders
sed -ri '/@dists=/c#@dists="sid";' /etc/debmirror.conf
sed -ri '/@arches=/c#@arches="i386";' /etc/debmirror.conf
openssl passwd -1 -salt 'cobbler' 'Bgx123.com'
cobbler setting edit --name=default_password_crypted --value='$1$cobbler$RTWR1S/XXjsj9af1IZGi/.'
cobbler setting edit --name=manage_dhcp --value=1

#dhcp
sed -i '/^subnet/c subnet 10.0.0.0 netmask 255.255.255.0 {' /etc/cobbler/dhcp.template
sed -i '/^option routers/c option routers 10.0.0.2;' /etc/cobbler/dhcp.template
sed -i '/^option domain-name-servers/c option domain-name-servers 10.0.0.2;' /etc/cobbler/dhcp.template
sed -i '/^range dynamic-bootp/c range dynamic-bootp 10.0.0.100 10.0.0.200;' /etc/cobbler/dhcp.template

#
cobbler sync
cobbler check
View Code

 

posted @ 2018-09-19 11:27  少校的小木屋  阅读(254)  评论(2编辑  收藏  举报