栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

cobbler

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

cobbler

cobbler安装
cobbler简介
Cobbler是一个Linux服务器安装的服务,可以通过网络启动(PXE)的方式来快速安装、重装物理服务器和虚拟机,同时还可以管理DHCP,DNS等。

Cobbler可以使用命令行方式管理,也提供了基于Web的界面管理工具(cobbler-web),还提供了API接口,可以方便二次开发使用。

Cobbler是较早前的kickstart的升级版,优点是比较容易配置,还自带web界面比较易于管理。

Cobbler内置了一个轻量级配置管理系统,但它也支持和其它配置管理系统集成,如Puppet,暂时不支持SaltStack。

Cobbler工作流程

Server端:

启动Cobbler服务
进行Cobbler错误检查,执行cobbler check命令
进行配置同步,执行cobbler sync命令
复制相关启动文件文件到TFTP目录中
启动DHCP服务,提供地址分配
DHCP服务分配IP地址
TFTP传输启动文件
Server端接收安装信息
Server端发送ISO镜像与Kickstart文件

Client端:

客户端以PXE模式启动
客户端获取IP地址
通过TFTP服务器获取启动文件
进入Cobbler安装选择界面
客户端确定加载信息
根据配置信息准备安装系统
加载Kickstart文件
传输系统安装的其它文件
进行安装系统

cobbler服务端部署

[root@localhost yum.repos.d]# yum -y install epel-release
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.


[root@localhost yum.repos.d]# systemctl disable --now firewalld
[root@localhost yum.repos.d]# setenforce 0
[root@localhost yum.repos.d]# 


[root@localhost yum.repos.d]# yum -y install httpd tftp
[root@localhost yum.repos.d]# yum -y install dhcp-*
[root@localhost yum.repos.d]# yum -y install xinetd
[root@localhost yum.repos.d]# yum -y install pykickstart
[root@localhost yum.repos.d]# dnf -y install cobbler
[root@localhost yum.repos.d]# dnf -y install cobbler-web
[root@localhost settings.d]# yum -y install syslinux


[root@localhost ~]# systemctl start httpd
[root@localhost ~]# systemctl start cobblerd
[root@localhost ~]# systemctl enable httpd
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.
[root@localhost ~]# systemctl enable cobblerd
Created symlink /etc/systemd/system/multi-user.target.wants/cobblerd.service → /usr/lib/systemd/system/cobblerd.service.


[root@localhost ~]# sed -i 's/^server: 127.0.0.1/server: 192.168.71.134/' /etc/cobbler/settings.yaml 

//设置tftp的ip地址为本机ip
[root@localhost ~]# sed -i 's/^next_server: 127.0.0.1/next_server: 192.168.71.134/' /etc/cobbler/settings.yaml 

[root@localhost settings.d]# ls
bind_manage_ipmi.settings  manage_genders.settings  nsupdate.settings
[root@localhost settings.d]# cat bind_manage_ipmi.settings 
# bind_manage_ipmi - used to let bind manage IPMI addresses if the power management address is an IP and if manage_bind
# is set.
bind_manage_ipmi: true
[root@localhost settings.d]# cat manage_genders.settings 
# manage_genders - Bool to enable/disable managing an /etc/genders file for use with pdsh and others.
manage_genders: True
[root@localhost settings.d]# cat nsupdate.settings 
# Set to "true" to enable Cobbler's dynamic DNS updates.
nsupdate_enabled: True

# define tsig key
# please don't use this one, instead generate your own:
#   dnssec-keygen -a HMAC-SHA512 -b 512 -n USER cobbler_update_key
nsupdate_tsig_algorithm: "hmac-sha512"
nsupdate_tsig_key: [ "cobbler_update_key.", "hvnK54HFJXFasHjzjEn09ASIkCOGYSnofRq4ejsiBHz3udVyGiuebFGAswSjKUxNuhmllPrkI0HRSSmM2qvZug==" ]

# if set, enables logging to that file
nsupdate_log: "/var/log/cobbler/nsupdate.log"

[root@localhost settings.d]# 

[root@localhost ~]# cobbler get-loaders
task started: 2021-10-13_092329_get_loaders
task started (id=Download Bootloader Content, time=Tue Oct 13 09:23:29 2021)
running python triggers from /var/lib/cobbler/triggers/task/get_loaders/pre/*
running shell triggers from /var/lib/cobbler/triggers/task/get_loaders/pre/*
shell triggers finished successfully
downloading https://cobbler.github.io/loaders/README to /var/lib/cobbler/loaders/README
downloading https://cobbler.github.io/loaders/COPYING.yaboot to /var/lib/cobbler/loaders/COPYING.yaboot
downloading https://cobbler.github.io/loaders/COPYING.syslinux to /var/lib/cobbler/loaders/COPYING.syslinux
downloading https://cobbler.github.io/loaders/yaboot-1.3.17 to /var/lib/cobbler/loaders/yaboot
path /var/lib/cobbler/loaders/pxelinux.0 already exists, not overwriting existing content, use --force if you wish to update
path /var/lib/cobbler/loaders/menu.c32 already exists, not overwriting existing content, use --force if you wish to update
downloading https://cobbler.github.io/loaders/grub-0.97-x86.efi to /var/lib/cobbler/loaders/grub-x86.efi
downloading https://cobbler.github.io/loaders/grub-0.97-x86_64.efi to /var/lib/cobbler/loaders/grub-x86_64.efi
*** TASK COMPLETE ***
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/321244.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号