cobbler服务端部署

本文档详细介绍了在Linux(CentOS)环境中部署Cobbler服务端的步骤,包括配置yum源、安装Cobbler及依赖软件、启动服务、设置开机自启、调整配置以适应DHCP和DNS,并提供了遇到问题时的解决办法,最终实现自动化安装系统的功能。
摘要由CSDN通过智能技术生成

cobbler服务端部署

1. 配置yum源

[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
[root@localhost yum.repos.d]#  yum install -y https://mirrors.aliyun.com/epel/epel-releas
[root@localhost yum.repos.d]#  sed -i 's|^#baseurl=https://download.example/pub|baseurl=https://mirrors.aliyun.com|' /etc/yum.repos.d/epel*
[root@localhost yum.repos.d]# sed -i 's|^metalink|#metalink|' /etc/yum.repos.d/epel*

2.安装cobbler以及相关的软件

[root ~]# dnf module enable cobbler:3 -y

[root ~]# yum -y install httpd dhcp* tftp tftp-server cobbler cobbler-web pykickstart rsync rsync-daemon 

3. 启动服务并设置开机自启

 systemctl restart httpd;systemctl enable httpd
 systemctl restart rsyncd;systemctl enable rsyncd
 systemctl restart tftp; systemctl enabled tftp
 systemctl restart cobblerd;systemctl enable cobblerd

4.关闭防火墙和selinux

[root ~]# systemctl stop firewalld
[root ~]# systemctl disable firewalld
Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root ~]#  setenforce 0
[root ~]# sed -ri 's/^(SELINUX=).*/\1disabled/g' /etc/sysconfig/selinux

5. 修改server的ip地址为本机ip

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

6.设置tftp的ip地址为本机ip

[root ~]# sed -i 's/^next_server: 127.0.0.1/next_server: 192.168.253.136/'  /etc/cobbler/settings.yaml

7. 生成加密的密码

[root ~]# openssl passwd -1 -salt "$RANDOM" 'redhat'
$1$28918$/zM23Txv2uWBkkp4MDXst.

8. 将新生成的加密密码加入到配置文件

[root ~]# vim /etc/cobbler/settings.yaml
default_password_crypted: "$1$28918$/zM23Txv2uWBkkp4MDXst."

9. 将cobbler的dhcp功能打开

[root ~]# sed -i "s#manage_dhcp: false#manage_dhcp: true#" /etc/cobbler/settings.yaml 
[root 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值