首页 > 其他分享 >cobbler 安装配置

cobbler 安装配置

时间:2024-07-30 13:55:10浏览次数:8  
标签:settings 配置 192.168 server etc cobbler dhcp 安装

cobbler 安装配置

操作系统:openEuler release 22.03

1、安装相关包并启动服务
yum install cobbler dhcp -y
systemctl enable --now cobblerd httpd tftp dhcpd
2、修改cobbler相关配置
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 automatic installation 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: 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, 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: ksvalidator was not found, install pykickstart
8: 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
9: fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them

按照提示打开并修改:

vim /etc/cobbler/settings

将server:和next_server:后的ip改为自己的ip,如下图所示

在这里插入图片描述
在这里插入图片描述在这里插入图片描述

3、重新启动服务
systemctl restart cobblerd
4、实现DHCP服务

修改文件

vim /etc/cobbler/dhcp.template 

在这里插入图片描述

再运行下面的代码

cobbler sync
systemctl start dhcpd
5、下载启动的相关文件
cobbler get-loaders

至此cobbler配置完成

下面为老师提供的安装步骤,实际操作过程中到

yum install epel-release -y

时,提示

No match for argument: epel-release
Error: Unable to find a match: epel-release

有能力解决的朋友可以安装下面的步骤安装

1、关闭防护墙
setenforce 0
sed -i 's/^SELINUX=.*/SELINUX=disabled/' /etc/selinux/config
systemctl disable --now firewalld
2、安装依赖包及Cobbler3.2
yum install epel-release -y
yum module list | grep cobbler
dnf module enable cobbler:3 -y
yum install -y cobbler cobbler-web tftp-server dhcp httpd xinetd rsync rsync-daemon pykickstart vim grub2-*  syslinux*
3、开启相关服务
systemctl enable --now cobblerd httpd rsyncd tftp
4、配置Cobbler文件
sed -i.bak 's/^server: 127.0.0.1/server: 192.168.2.77/' /etc/cobbler/settings 
sed -i "s#next_server: 127.0.0.1#next_server: 192.168.2.77#" /etc/cobbler/settings
sed -i "s#manage_dhcp: 0#manage_dhcp: 1#" /etc/cobbler/settings
5、配置默认root密码
openssl passwd -1 -salt "7.1ddsr" 'root'
$1$7.1ddsr$GYDWEhNKjKYYvpUGfmx1P/
6、验证修改
egrep '^server:|^next_server|^manage_dhcp|^default_password_' /etc/cobbler/settings
7、配置DHCP服务(可选)
vim /etc/cobbler/dhcp.template
subnet 192.168.1.0 netmask 255.255.255.0 {  //修改此处网段
     option routers             192.168.1.2;  //修改此处网关
     option domain-name-servers 114.114.114.114;  //修改此处dns
     option subnet-mask         255.255.255.0;
     range dynamic-bootp        192.168.2.1140 192.168.2.1140; //地址池 
default-lease-time 21600; max-lease-time 43200; next-server $next_server;
8、配置DNSMASQ服务摸版(如使用dnsmasq服务配置,替代默认dhcp)*
vim /etc/cobbler/dnsmasq.template
read-ethers
addn-hosts = /var/lib/cobbler/cobbler_hosts
cat /etc/cobbler/dnsmasq.template
read-ethers
addn-hosts = /var/lib/cobbler/cobbler_hosts

dhcp-range=192.168.2.210,192.168.2.240,1h
dhcp-option=option:router,192.168.2.1
dhcp-lease-max=1000
dhcp-authoritative

#BIOS
#dhcp-boot=pxelinux.0
#dhcp-boot=net:normalarch,pxelinux.0

#UEFI
#dhcp-boot=uefi/grubx64.efi
#dhcp-boot=net:x86_64,uefi/grubx64.efi

tftp-root=/var/lib/tftpboot
$insert_cobbler_system_definitions
9、启用dnsmasq
cat /etc/cobbler/modules.conf

[dhcp]
#module = managers.isc  # 注释默认
module = managers.dnsmasq # 启用dnsmasq
10、检查当前cobbler配置
#重启服务
systemctl restart cobblerd httpd rsyncd tftp
cobbler check

1: debmirror package is not installed, it will be required to manage debian deployments and repositories
2: fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them
11、同步Cobbler配置
cobbler sync

shell triggers finished successfully
*** TASK COMPLETE ***   

标签:settings,配置,192.168,server,etc,cobbler,dhcp,安装
From: https://blog.csdn.net/m0_52742432/article/details/140757727

相关文章

  • MySQL安装
    1、安装成功的步骤#获取rpmsudorpm-Uvhhttps://dev.mysql.com/get/mysql80-community-release-el8-1.noarch.rpm#直接安装yuminstall-ymysql-community-server#查看服务systemctlstatusmysql2、安装成功后续#安装成功后续#启动systemctlstartmysqld.s......
  • 轻松安装微信分身,苹果手机用户必看!
    在当前的数字时代,微信已成为我们生活中不可或缺的一部分。无论是工作沟通,还是亲朋好友间的日常交流,微信都扮演着极为重要的角色。但有时候,我们可能需要在一个设备上同时使用两个微信账号——一个用于私人生活,另一个则处理工作相关的事务。 对于安卓用户来说,微信分身并不是什......
  • jdk安装
    1.下载安装包一般安装jdk1.8版本官网下载地址:JavaDownloads|Oraclehttps://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html官网下载需要登录,按提示注册账号,有账号的登录后可以直接下载不建议通过百度搜索下载,自己开发无所谓,服务器要保证安全。......
  • PS02024软件下载(含全版本下载链接安装包)+安装教程
    PS2024的功能非常强大,以下是一些主要的新增和改进功能:改进的图层管理:新版本提供了更直观和高效的图层管理方式,使用户能够更好地组织和管理复杂的图像项目。增强的自动选择工具:通过引入先进的AI技术,PS2024可以更准确地识别和选择图像中的不同对象,从而提高工作效率。全新的内容......
  • ubuntu 安装指定版本 mysql
    先访问 MySQL::MySQL8.4ReferenceManual::2.5.2InstallingMySQLonLinuxUsingtheMySQLAPTRepository 然后运行dpkg-i命令:     _________________________________________________________________________________________________________......
  • 在 Linux 中安装 Spotify(音乐播放器)
    你需要安装snapd包。它是一个守护进程(服务),并能在Linux系统上启用snap包管理。Debian/Ubuntu/MintLinux上的snapd入以下 apt命令[1]/ apt-get命令[2]:$sudoaptinstallsnapd步骤2-在Linux上使用snap安装spofity使用snap安装spofity执行snap命令:......
  • playbook+roles安装nginx实战
    基本目录结构host文件夹用于存放主机清单文件hosts文件hosts文件内容如下:(仅供参考)[proxy]node2[web]192.168.xx.xxplaybook-all-roles.yml文件用于指定执行哪个role的文件(命名可以自定义)文件内容如下:(仅供参考)因为roles文件夹下只有nginx一个文件夹,所以-rol......
  • openmediavault 7.0 安装和配置详细操作步骤
    OpenMediaVault(OMV)7.0是一个基于Debian12Linux的开源网络附加存储(NAS)解决方案,它提供了丰富的功能来管理和共享数据。一、安装OpenMediaVault7.01.准备安装材料U盘:一个8G以上容量的U盘,建议16-32GB,用于制作安装盘。电脑或服务器:一台用于安装OMV7.0的电脑或服务器。......
  • todesk远程连接软件安装linux版本
    统信UOS、麒麟OS、方德debpackage:https://dl.todesk.com/linux/todesk-v4.7.2.0-amd64.deb立即下载(使用4.7.2.0覆盖安装后,临时密码将会变更)安装命令:01.sudoapt-getinstalllibappindicator3-dev02.sudoapt-getinstall./todesk-v4.7.2.0-amd64.deb 复制代码启......
  • 在Centos7中使用一键脚本安装Oracle11g
    在Centos7中使用一键脚本安装Oracle11g1.环境准备1.1系统版本:Centos7.9(2009)1.2Oracle版本:Oracle11g11.2.0.41.3网络需求:可以连接互联网1.4一键安装:curl-ooracle_install.shhttps://files-cdn.cnblogs.com/files/blogs/827077/oracle_install.sh?t=1722301473&&c......