cobbler自动重装

本文详细介绍了使用cobbler自动化重装系统的步骤,包括安装epel,部署koan并执行重装命令,处理cobbler_web登录错误,以及修改登录密码和装机提示。
摘要由CSDN通过智能技术生成

具体步骤

  1. 安装epel
  2. 安装koan并执行重装命令

安装epel

#备份repo
cd /etc/yum.repos.d
mkdir bak
mv *.repo bak/

#下载阿里的repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

#安装epel
yum install -y epel-release

#注: 如遇报错:Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again
#解决方法将https://mirrors .... 修改为http://mirrors 
yum clean all
yum makecache

回到步骤

安装koan并执行重装命令

#安装koan
yum install koan -y

#查看可以重装的系统
[root@localhost ~]# koan --server=192.168.0.10 --list=profiles
- looking for Cobbler at http://192.168.0.10:80/cobbler_api
CentOS-7-x86_64
CentOS-6-x86_64

#重装命令
[root@localhost ~]# koan --replace-self --server=192.168.0.10 --profile=CentOS-6-x86_64

当无法用https://192.168.0.10/cobbler_web/ 登录时 或 获取不到cobbler_api时

#尝试安装低版本的django来解决
#vbox虚拟机需打开443端口

#下载pip.py
wget https://bootstrap.pypa.io/get-pip.py

#调用本地python运行pip.py脚本
python get-pip.py

#安装
pip install Django==1.8.9
pip install ipaddress

systemctl restart tftp
systemctl restart xinetd
systemctl restart httpd
systemctl restart cobblerd
systemctl restart rsyncd

回到步骤

修改cobbler_web登陆密码,并修改cobbler装机提示

#修改密码
cd /etc/cobbler
htdigest /etc/cobbler/users.digest "Cobbler" cobbler

#修改开机提示
vim /etc/cobbler/pxe/pxedefault.template
cobbler sync
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值