客户机自动安装失败,设置客户机自动重装。
在客户机(Client)上安装koan
请注意:不是在Cobbler Server上安装
koan
,是在Client上安装koan
1、查看epel
源是否已经下载安装
[root@localhost ~]# ls /etc/yum.repos.d/ # 查看epel源是否有
CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-fasttrack.repo CentOS-Sources.repo
2、添加epel
源,以用yum
安装koan
[CentOS 7 阿里云epel源]:
[root@localhost ~]# yum install wget -y # 下载wget以下载epel源
[root@localhost ~]# wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
[CentOS 6 阿里云epel源]:
[root@localhost ~]# yum install wget -y # 下载wget以下载epel源
[root@localhost ~]# wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
3、下载koan
软件
[root@localhost ~]# rpm -qa | grep koan # 没有安装koan
[root@localhost ~]# yum -y install epel-release
# 可以安装epel源,如果上面安装了阿里云的epel源,就不需要执行这个命令
[root@localhost ~]# yum install koan -y
4、可以查看koan
的帮助
[root@localhost ~]# koan --help # 查看帮助
5、重新安装(在客户机上执行)
# 安装好以后,我们可以查看Cobbler Server上有哪些系统提供了
[root@localhost ~]# koan --server=10.94.2.240 --list=profiles
# --server指Cobbler Server地址 --list=profiles指列出这个Cobbler Server有哪些profile
- looking for Cobbler at http://10.94.2.240:80/cobbler_api
CentOS-7-x86_64 # 罗列出来的系统
# 选择重装的系统:
[root@localhost ~]# koan --replace-self --server=10.94.2.240 --profile=CentOS-7-x86_64
[root@localhost ~]# less /boot/grub2/grub.cfg
# 我们可以查看这个启动项里面,发现多了一些内容,这就是为啥开机后能够自动选择网络安装,是因为grub启动项里设置了
[root@localhost ~]# reboot # 重启