cobbler 无人值守-安装

简介: 环境准备 准备两台主机,如centos6和centos7 centos7当作server服务器 关闭selinux 关闭防火墙 安装 cobbler包光盘里是没有的,要配置epel源,这里就说怎么配置epel源了,在yum.

 

环境准备

  • 准备两台主机,如centos6和centos7
  • centos7当作server服务器
  • 关闭selinux
  • 关闭防火墙

安装

cobbler包光盘里是没有的,要配置epel源,这里就说怎么配置epel源了,在yum.repos.d/目录下照葫芦画瓢就可,配置好后执行如下命令安装

yum install –y cobbler
#
#

 

安装成功后,我们发现它还安装了其他的服务

Coobler关联文件

备注:我们搭建cobbler-系统部署需要用到httpd、tftp-server、dhcp服务,从图上可以看出它没有安装dhcp服务,所以我们要安装下dhcp服务

yum install –y dhcp
#
#

开启服务

http服务

systemctl start httpd
#开启服务
systemctl enable httpd
#设置开机自启动

tftp-server服务

systemctl start tftp
#开启服务
systemctl enable tftp
#开机自启动

cobbler服务

systemctl start cobblerd
#开启服务
systemctl enable cobblerd
#开机自启动

cobbler环境检查

执行

cobbler check
#

会出现如下提示,配置缺少的东西

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 : change 'disable' to 'no' in /etc/xinetd.d/tftp
4 : 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' command is the easiest way to resolve these requirements.
5 : enable and start rsyncd.service with systemctl
6 : debmirror package is not installed, it will be required to manage debian deployments and repositories
7 : The default password used by the sample templates for newly installed machines (default_password_crypted in /etc/cobbler/settings) is still set to 'cobbler' and should be changed, try: "openssl passwd -1 -salt 'random-phrase-here' 'your-password-here'" to generate new one
8 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them

OK 根据提示一步一步来解决

 

步骤一

1、第一个提示:在/etc/cobbler/settings 文件中server字段必须要有一个别人可访问的IP地址,来提供网络服务,那么我们是在centos7上搭建的所以是本机地址。

①编辑配置文件

vim etc/cobbler/settings 
#编辑配置文件

image

②刷新配置文件并环境检查

systemctl restart cobblerd
#重启服务,重新读取修改的配置文件
cobbler check
#环境检查

步骤二

#环境检查后发现少了一项,那么下面接着还是从第一项开始操作
1 : 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.
2 : change 'disable' to 'no' in /etc/xinetd.d/tftp
3 : 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' command is the easiest way to resolve these requirements.
4 : enable and start rsyncd.service with systemctl
5 : debmirror package is not installed, it will be required to manage debian deployments and repositories
6 : The default password used by the sample templates for newly installed machines (default_password_crypted in /etc/cobbler/settings) is still set to 'cobbler' and should be changed, try: "openssl passwd -1 -salt 'random-phrase-here' 'your-password-here'" to generate new one
7 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them

如上第一条:'next_server' 地址不应该是127.0.0.1

所以修改它的地址,这个地址也就是你tftp服务器所在的主机地址,我们把服务都安装在一台主机上了,所以和上面地址一样

①编辑配置文件

vim etc/cobbler/settings 
#编辑配置文件

image

②重复步骤一中的②命令来重读配置文件与环境检查

步骤三

#环境检查后发现又少了一条,下面接这来...
1 : change 'disable' to 'no' in /etc/xinetd.d/tftp
2 : 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' command is the easiest way to resolve these requirements.
3 : enable and start rsyncd.service with systemctl
4 : debmirror package is not installed, it will be required to manage debian deployments and repositories
5 : The default password used by the sample templates for newly installed machines (default_password_crypted in /etc/cobbler/settings) is still set to 'cobbler' and should be changed, try: "openssl passwd -1 -salt 'random-phrase-here' 'your-password-here'" to generate new one
6 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them

如上第一条:提示更改/etc/xinetd.d/tftp配置文件中'disable'状态改为‘no’说白了也就是开启tftp服务

因为我们用的是centos7不需要xinetd.d了,前面已经开启了tftp服务,这步忽略,看下一个提示

第二条:在/var/lib/cobbler/loaders目录下少了一些必要的文件,用'cobbler get-loaders' 命令来获取,这时候需要主机联网下载

 

我们先来看看这个目录

image

①生成必要文件

cobbler get-loaders
#
#

image

我们知道出现的这些文件是要放在/var/lib/tftpboot/这里的,我们看下这个目录的信息

image

用如上环境检查中给出的提示进行同步

cobbler sync
#数据同步

 

再次查看下/var/lib/tftpboot目录结构

image

 

②重复步骤一中的②命令

#又少了,继续
1 : enable and start rsyncd.service with systemctl
2 : debmirror package is not installed, it will be required to manage debian deployments and repositories
3 : The default password used by the sample templates for newly installed machines (default_password_crypted in /etc/cobbler/settings) is still set to 'cobbler' and should be changed, try: "openssl passwd -1 -salt 'random-phrase-here' 'your-password-here'" to generate new one
4 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them

步骤四

第一条:开启rsyncd.service 服务,我们没有用这个服务,忽略

第二条:是针对debian发行版的系统配置,忽略

第三条:修改kickstart文件的默认口令

 

①编辑配置文件

vim /etc/cobbler/settings
#

image

②重复步骤一中的②命令

#少了一条
1 : enable and start rsyncd.service with systemctl
2 : debmirror package is not installed, it will be required to manage debian deployments and repositories
3 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them

 

如上第一、二上面说了忽略,看第三条,意思说配置电源项,和硬件有关,忽略

 

步骤五

配置dhcp

①编辑配置文件

vim /etc/cobbler/settings
#

image

② 改cobbler提供的dhcp配置文件模板

vim /etc/cobbler/dhcp.template
#

image

我们先来看下dhcp配置文件

image

还是空的没有配置信息

 

②同步

systemctl restart cobblerd
#重启服务
cobbler sync
#数据同步

再来看dhcp配置文件

image

有信息了

 

步骤六

①开启dhcp服务

systemctl start dhcpd
#开启服务

②建立cobbler yum源-导入系统

image

这里我们也把centos6导入

image

备注:它是放在了/var/www/目录下,同时生成了一个和系统同名的kickstart文件,

自带的kickstart文件是满足不了我们的需求的,所以我们使用自己的kickstart文件,之前生成过,直接拿来用。

步骤七

①编辑ks.cfg文件(前几篇提到过怎么创建改文件)

image

②把ks.cfg文件放在/var/lib/cobbler/kickstarts/下

image

③创建启动菜单

cobbler profile add --name=Centos-7.5-x86_64-Auto --distro=Centos-7.5-x86_64 --kickstart=/var/lib/cobbler/kickstarts/ks.cfg
#
cobbler profile add --name=Centos-6.9-x86_64-Auto --distro=Centos-6.9-x86_64 --kickstart=/var/lib/cobbler/kickstarts/ks6.cfg
#

image

④查看启动文件default是不是有了我们创建的自定义启动项

cat /var/lib/tftpboot/pxelinux.cfg/default
#查看启动菜单

image

备注:也可删除不需要的启动菜单

cobbler profile remove --name=Centos-6.9-x86_64
#

OK现在就可以用准备好的另一台主机测试了

备注:确保 http tftp dhcp 服务已开启 防火墙以关闭 selinux以关闭

成功界面

image

cobbler-web管理

 

1、首先安装包

 

yum install -y cobbler-web
#

 

2、访问

 

https://192.168.43.7/cobbler_web

默认账号:cobbler

默认密码:cobbler

image

附带过程中出现的问题

问题一:出现如下提示:

image

解决方案:http:改为https:访问

 

问题二:安装新系统的时候,出现TFTP open timeout!

20180610171242475

解决方案:关闭防火墙

#systemctl stop firewalld.service

#iptables –L

 

问题三:check环境检查的时在cobbler 候出现如下

2018061017133265

解决方案:这是ip分配错误的提示,检查配置文件IP分配段

 

每个人遇到的问题可能不一样,查看日志检查,tailf -10 /var/log/messages

 

目录
相关文章
|
Java Linux 数据安全/隐私保护
华为云计算FusionCompute虚拟化平台的安装与设置
华为云计算FusionCompute虚拟化平台的安装与设置
1987 0
华为云计算FusionCompute虚拟化平台的安装与设置
|
6月前
|
监控 供应链 JavaScript
可商用的云MES系统源码,pringBoot + Vue3 + Uniapp,覆盖生产全流程,拿来即改
正版授权MES系统源码,含PC端+移动端全套代码。基于SpringBoot+Vue3+Uniapp开发,覆盖生产计划、执行跟踪、质量管控、设备IoT、仓储物流等全场景,支持大屏可视化与PDA手持作业,助力制造企业实现数字化精益管理。
474 0
|
SQL 关系型数据库 MySQL
释放数据潜能,加速业务创新 —— Dataphin 5.4 新增删改API功能
Dataphin 5.4推出数据增删改API功能,支持通过配置SQL快速生成安全、可管理的CRUD接口,覆盖AI编程、数据集成、低代码等场景,降低开发成本,提升数据治理与安全性,助力企业高效释放数据价值。
700 0
|
8月前
|
人工智能 自然语言处理 安全
2026 最新版 OpenClaw 进阶优化版,Windows 一键安装更专业(包含新安装包)
2026 最新版 OpenClaw 进阶优化安装包,在官方版本基础上,升级汉化精度、优化运行效率,新增系统适配优化功能,解决旧版卡顿、乱码、兼容性差等问题。内置专业配置脚本,自动检测系统版本与硬件参数,精准匹配运行设置,全程无代码干预、免命令操作,一键完成安装与汉化,安装后功能完整、响应迅速,适配专业办公、学习等进阶场景,满足专业用户的使用需求。
|
11月前
|
安全 数据可视化 物联网
智慧工地人员定位系统从核心技术对比到技术优势详解(一)
智慧工地人员定位系统融合UWB、北斗、蓝牙等多源技术,实现室内外厘米级至米级精准定位,支持三维可视化、AR导航与工业级防护,兼顾安全管控、效率提升与复杂场景适配。如果您想进一步了解人员定位的案例,欢迎关注、评论留言~也可搜索维构lbs智能定位。
|
存储 虚拟化 iOS开发
VMware ESXi 9.0 macOS Unlocker & OEM BIOS 2.7 标准版和厂商定制版
VMware ESXi 9.0 macOS Unlocker & OEM BIOS 2.7 标准版和厂商定制版
1509 1
VMware ESXi 9.0 macOS Unlocker & OEM BIOS 2.7 标准版和厂商定制版
|
人工智能 自然语言处理 数据可视化
AutoAgents:比LangChain更激进的AI开发神器!自然语言生成AI智能体军团,1句话搞定复杂任务
AutoAgents 是基于大型语言模型的自动智能体生成框架,能够根据用户设定的目标自动生成多个专家角色的智能体,通过协作完成复杂任务。支持动态生成智能体、任务规划与执行、多智能体协作等功能。
2205 91
|
Docker 容器
在openEuler 22.03 LTS上安装Docker CE和Docker Compose
以上就是在openEuler 22.03 LTS上安装Docker CE和Docker Compose的过程。希望这个指南能帮助你顺利完成安装。
3433 12
|
Ubuntu 数据安全/隐私保护
安装Ubuntu16.04卡在Ubuntu的logo界面解决方法
安装Ubuntu16.04卡在Ubuntu的logo界面解决方法
4072 0
安装Ubuntu16.04卡在Ubuntu的logo界面解决方法
|
图形学
unity之Layout Group居中显示
unity实现Layout Group居中显示
unity之Layout Group居中显示