Cobbler是PXE的二次封装,使用Python语言开发, 可以用来快速建立 Linux 网络安装环境,它已将 Linux 网络安装的技术门槛,从大专以上文化水平,成功降低到初中以下,连补鞋匠都能学会。
cobbler配置过程需要基于PXE环境,cobbler是pxe环境的二次封装(演示环境centos7,centos6请自行完成)
一:安装cobbler、httpd
yum install -y cobbler httpd
二:启动cobbler、httpd
systemctl start cobblerd.service
systemctl start httpd.service
三:创建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
五:解决错误( 注意每一个问题解决要查看效果,需要重启cobblerd服务)
(1)解决第一个问题
这里需要将/etc/cobbler/settings这个文件中的server这一项的主机地址改为 server: 192.168.10.10
(2)解决第二个问题
这里需要将/etc/cobbler/settings这个文件中的next_server这一项的主机地址改为 next_server: 192.168.10.10
(3)解决第三个问题
启动rsync, 让其开机自启: systemctl start rsyncd.service,systemctl enable rsyncd.service
(4)解决第四个问题
在/etc/xinetd.d/tftp配置文件中修改 disable = no ,让tftp服务开机自启动 , 再重启tftp服务,systemctl start tftp.socket ,systemctl enable tftp.socket
(5)解决第五个问题
在/etc/cobbler/settings这个文件中的default_password_crypted: 后面的密码改掉,先创建一个用户,给这个用户设定密码,然后就将这个用户的密码贴在这个选项的后面就是
(6)解决第六个问题
yum install -y debmirror
将/etc/debmirror.conf文件的dists和arches那两行注释掉
(7)解决第七个问题
运行cobbler命令,下载对于的安装包
cobbler get-loaders
(8)解决第八个问题
yum install -y fence-agents
六:解决全部的cobbler配置问题之后,最后再重启cobbler,检查
systemctl restart cobblerd.service
cobbler check
No configuration problems found. All systems go
七:配置好dhcp、tftp之后,开始配置cobbler,(dhcp、tftp、服务的配置与PXE环境一样)
确保dhcp、tftp、httpd服务都已经启动
八:准备创建distro
(1)挂载centos 7的光盘镜像到/media/cdrom目录下
mount -r /dev/cdrom /media/cdrom/
(2)使用cobbler import 命令生成一个distro
cobbler import --name="CentOS-7_x86_64-1611" --path=/media/cdrom
(3)查看生成的cobbler distro
[root@7 ks_mirror]# cobbler distro list
CentOS-7-1611-x86_64
(4)查看生成的cobbler profile
[root@7 ks_mirror]# cobbler profile list
CentOS-7-1611-x86_64
(5)同步cobbler 或 重启
cobbler sync 或 systemctl restart cobblerd
(6)此时cobbler已经简单部署完毕,在内网192.168.10.0网段启动一个虚拟机,选择网卡启动,可以像PXE环境一样,可以直接安装系统了。
九:可以给安装的引导选项改名,就是给profile改名
cobbler profile rename --name=CentOS-7-1611-x86_64 --newname=RedHat-minimal
十:在/var/lib/cobbler/kickstarts/目录下拷贝sample_end.ks文件,命名为self.ks
cd /var/lib/cobbler/kickstarts/
cp sample_end.ks self.ks
修改一下self.ks文件,可以在里面修改自己自定义的设置,比如说:添加安装的包组
十一:基于现有的kickstart文件创建一个profile
cobbler profile add --name=RedHad-self --distro=CentOS-7-1611-x86_64 --kickstart=/var/lib/cobbler/kickstarts/self.ks
十二:查看profile
[root@7 ~]# cobbler profile list
RedHad-minimal-self
RedHad-self
十三:同步一下,每一次修改完成都要做一次同步
cobbler sync
十四:启动一台机器,然后安装F12进入boot sequence选项,按 l 键选择LAN启动
十五:如果想删除一个profile
cobbler profile remove --name=RedHad-minimal-self
cobbler sync
- 详解C#泛型(二) 获取C#中方法的执行时间及其代码注入 详解C#泛型(一) 详解C#委托和事件(二) 详解C#特性和反射(四) 记一次.net core调用SOAP接口遇到的问题 C# WebRequest.Create 锚点“#”字符问题 根据内容来产生一个二维码
详解C#泛型(二) 一.自定义泛型方法(Generic Method),将类型参数用作参数列表或返回值的类型: void MyFunc<T>() //声明具有一个类型参数的泛型方法 { ...
- JavaScript学习笔记-实例详解-类(二)
实例详解-类(二) //===给Object.prototype添加只读\不可枚举\不可配置的属性objectId(function(){ Object.defineProperty(Object ...
- ViewPager 详解(二)---详解四大函数
前言:上篇中我们讲解了如何快速实现了一个滑动页面,但问题在于,PageAdapter必须要重写的四个函数,它们都各有什么意义,在上节的函数内部为什么要这么实现,下面我们就结合Android的API说明 ...
- iOS 开发之照片框架详解之二 —— PhotoKit 详解(下)
本文链接:http://kayosite.com/ios-development-and-detail-of-photo-framework-part-three.html 这里接着前文<iOS ...
- iOS 开发之照片框架详解之二 —— PhotoKit 详解(上)
转载自:http://kayosite.com/ios-development-and-detail-of-photo-framework-part-two.html 一. 概况 本文接着 iOS 开 ...
- seo网页加速技术,预加载 DNS Prefetching 详解
seo网页加速技术,预加载 DNS Prefetching 详解 DNS Prefetching 是什么 : DNS 是什么-- Domain Name System,域名系统,作为域名和IP地址相互 ...
- Hexo系列(二) 配置文件详解
Hexo 是一款优秀的博客框架,在使用 Hexo 搭建一个属于自己的博客网站后,我们还需要对其进行配置,使得 Hexo 更能满足自己的需求 这里所说的配置文件,是位于站点根目录下的 _config.y ...
- Android开发:文本控件详解——TextView(二)文字跑马灯效果实现
一.需要使用的属性: 1.android:ellipsize 作用:若文字过长,控制该控件如何显示. 对于同样的文字“Android开发:文本控件详解——TextView(二)文字跑马灯效果实现”,不 ...
- 【模型推理】量化实现分享二:详解 KL 对称量化算法实现
欢迎关注我的公众号 [极智视界],回复001获取Google编程规范 O_o >_< o_O O_o ~_~ o_O 大家好,我是极智视界,本文剖析一下 K ...
随机推荐
- Android远程擦除漏洞
漏洞原理: 安卓浏览器内核有这样一个机制,当网页内嵌入了一个特定格式的字符串,就可以被识别为一个电话号码通过点击该字符串的方式拨打电话.但是没有对*#06#等具有特殊功能的拨号组合进行限制,由于很多厂 ...
- Android ListView demo
创建一个空的 Activity 相对应的layout文件会自动创建: ?xml version="1.0" encoding="utf-8"?> < ...
- Oracle数据库无法向listener注册的解决一例
当机器的IP地址改变了,或者机器名改变后, 动态注册可能会失败. 运行 lsnrctl status时,无论等待多久,都会发生:no services 这样的信息. 此时,最好的解决方法,就是删除原有 ...
- pythonDjango开发-安装第三方插件
Python安装插件方式: 1.easy_install package 2.pip install package 如果pip安装报错,可以使用以下两种方法解决: 1.python -m pip i ...
- imu标定 imu_tk
1. 首先标定加速度计,这是imu加速度计xyz三个轴在标定过程中的读数: 标定结果: 2. 利用加速度计的标定结果,标定陀螺仪,结果: 也可以使用港科大开源的一个工具: https://github ...
- fiddler和bugfree之间的联动(做伪请求、伪响应、并发、抓密码)
青.取之于蓝,而青于蓝:冰.水为之,而寒于水 不积跬步,无以至千里;不积小流,无以成江海. 1解压Fiddler Web Debugger V4.6.2017修正中文第6版至C盘Program Fil ...
- idea_debug
条件断点 快捷键 cmd + shift +f8 demo 表达式求值 注意,调试的时候,选中相应变量 alt + f8 demo set value (感觉会非常有用) 调试时直接改变变量的值,快捷 ...
- [egret]白鹭引擎打包安卓包体积太大减小
萌新第一次用egret打安卓包,发现裸包22M+,吃惊到吃手手. 上网搜查无果. 可能原因是egret优化过一波打包,变得更便利了,网上对新版本打包比较少讨论. 解决方法: egret-android ...
- Ubuntu下载磁力链接,torrent,迅雷链接
用ubuntu下载电影:磁力链接,torrent,迅雷链接 需要软件:Ktorent, Amule 安装软件: sudo apt-get install ktorrent sudo apt-get i ...
- 如何判断Map中的key或value类型
在上班写工具类时,遇到了一个问题,将xml文件的节点都放入map容器中时,map的value也是一个map,导致取map的value时,需要判断这个value的数据类型,用到了一下说的这些知识: 对于 ...