您的位置:时时app平台注册网站 > 时时app平台注册网站 > centos7采用cobbler(2.8)批量布署操作系统之一

centos7采用cobbler(2.8)批量布署操作系统之一

2019-09-19 22:16

一、    批量配备操作系统的前提

要想批量布局操作系统,得具有以下原则:

客商机匡助pxe互联网辅导

劳务器端和客商端建构互联网通信(DHCP)

劳务器端要有可供顾客机开机引导的教导文件

劳务器端的可引导文件还非得能传递到顾客机(TFTP)

客户机无人值班守护安装包含安装定制的软件或劳动(KICKSTART文件)

 

小结来讲,

4.    什么是Kickstart

法定文书档案:

KickStart是一种无人职守安装方式,是由redhat集团为了消除无人值班守护安装操作系统而安排的。系统管理员通过创办一个纯净的kickstart配置文件就能够达成自动化安装操作系统。KickStart的行事原理是因此记录规范的安装进度中所需人工干预填写的各样参数,并转移三个名字为ks.cfg的文书;在现在的设置进度中(不只局限于生成KickStart安装文件的机器)当出现要求填写参数的场馆时,安装程序会首先去查找KickStart生成的文件,当找到适合的参数时,就选取找到的参数,当未有找到合适的参数时,才供给安装者手工业干预。那样,假使KickStart文件满含了安装进度中出现的具有必要填写的参数时,安装者完全能够只报告安装程序从哪个地方取ks.cfg文件,然后去忙自个儿的业务。等设置收尾,安装程序会根据ks.cfg中安装的重启选项来重启系统,并结束安装。

 

---> Package libyaml.x86_64 0:0.1.4-11.el7_0 will be installed

1.    什么是Cobbler

官方网站:

GITHUB:

Cobbler是三个高速网络安装linux的劳务,何况在经过调解也能够支撑互联网安装windows。该工具使用python开辟,小巧轻松(才15k行代码),使用简便的通令就可以到位PXE互联网安装蒙受的计划,同期还能管理DHCP,DNS,以及yum包镜像。

Cobbler是三个应用程序,能够多量的布署操作系统,能够同期配备三个不等的操作系统,同盟kickstart文件能够定制和无人值班守护的办法陈设操作系统。它对PXE进行二遍开荒和包裹,同偶尔候提供贰回开辟接口。

Cobbler 的配备结构基于一组注册的指标。每一种对象表示叁个与另二个实体相关联的实业(该对象指向另一个对象,恐怕另一个指标指向该指标)。当贰个目的指向另一个对象时,它就三番两次了被指向对象的多少,并可覆盖或加多更加多特定音信。以下目的类型的定义为:

图片 1

 

发行版(Distro):

意味着一个操作系统。它承前启后了水源和 initrd 的新闻,以及基本参数等别的数据。

陈设文件(Profile):

含蓄一个发行版、二个 kickstart 文件以及恐怕的存储库,还蕴藏愈来愈多特定的基石参数等其他数据。

系统(System):

表示要配给的机械。它含有三个配备文件或二个镜像,还含有 IP 和 MAC 地址、电源管理(地址、凭据、类型)以及越发规范的多少等音信。

存储库(Repo):

保存二个 yum 或 rsync 存款和储蓄库的镜像新闻。

镜像(Image):

可替换三个包括不属于此类其他公文的发行版对象(比方,不恐怕分为基础和 initrd 的靶子)。

听新闻说注册的对象以及种种对象时期的关联,Cobbler 知道什么转移文件系统以反映实际布置。因为系统布署的里边是架空的,所以您能够仅关心想要试行的操作。

 

---> Package httpd.x86_64 0:2.4.6-45.el7.centos will be installed

2.   Cobbler原理

Cobbler由Python语言开辟,是对PXE和Kickstart以及DHCP的包装。融入非常多表征,提供了CLI和Web的军管情势。尤其有助于的实行互连网安装。同期,Cobbler也提供了API接口,使用另外语言也很轻便做扩大。它不紧能够安装物理机,同期也支撑kvm、xen设想化、Guest OS的安装。愈多的是它还能够构成Puppet等聚集国化学工业进出口总集团管理软件,完结自动化的治本。

Cobbler 协理广大的发行版:Red Hat、Fedora、CentOS、Debian、Ubuntu 和 SuSE。当增多贰个操作系统(平日通过利用 ISO 文件)时,Cobbler 知道怎么解压缩合适的文件并调动网络服务,以准确带领机器。Cobbler 使用命令市价势管理,也提供了依据Web的图形化配置管理工科具(cobbler-web)。通过安插cobbler自动计划DHCP、TFTP、HTTP,在装置进度中加载kiskstart无人值班守护安装应答文件贯彻无人值班守护。从客商端选择PXE教导运营安装。

 图片 2

 

Server端

第一步,启动Cobbler服务

第二步,进行科布ler错误检查,推行cobbler check命令

其三步,举办安顿同步,试行cobbler sync命令

第四步,复制相关运维文件文件到TFTP目录中

第五步,运营DHCP服务,提供地点分配

第六步,DHCP服务分配IP地址

第七步,TFTP传输运营文件

第八步,Server端接收装置消息

第九步,Server端发送ISO镜像与Kickstart文件

Client端

先是步,顾客端以PXE方式运营

第二步,顾客端获取IP地址

其三步,通过TFTP服务器获取运行文件

第四步,步向Cobbler安装选取分界面

第五步,客户端分明加载新闻

第六步,依照配置音讯筹算安装系统

第七步,加载Kickstart文件

第八步,传输系统装置的任何文件

第九步,举办设置系统

--> Processing Dependency: python(abi) = 2.6 ``for package: Django14-1.4.20-1.el6.noarch

三、    Cobbler安装与开头配置

6 : debmirror package is not installed, it will be required to manage debian deployments and repositories

以上步骤全部推行到位后,重启cobbler服务,并使用cobbler sync保存修改,也足以每修改贰个指示实践一下。直到未有提示,或可以忽略某个提示结束。

#systemc restart cobblerd

#cobbler sync

#cobbler check

The following are potential configuration items that you may want to fix:

1 : debmirror package is not installed, it will be required to manage debian deployments and repositories

Restart cobblerd and then run 'cobbler sync' to apply changes.

OK,至此关于批量设置的底子部分及cobbler介绍就到此处,下一篇将介绍下cobbler的吩咐及实战。

--> Processing Dependency: python-cheetah ``for package: cobbler-2.6.3-1.el6.noarch

二. Cobbler介绍

``Requires: python-cheetah

2.    PXE的职业规律

PXE client是索要安装操作系统的微型计算机,TFTP Server和DHCP Server运转在别的一台Server上。Bootstrap文件、配置文件、Linux内核以及Linux根文件系统都停放在Linux Server上TFTP服务器的根目录下。PXE client在专门的学业历程中,要求四个二进制文件:bootstrap、Linux 内核和Linux根文件系统。Bootstrap文件是可试行程序,它向客商提供轻松的主宰界面,并基于客商的抉择,下载合适的Linux内核以及 Linux根文件系统。下图正是PXE工作的法规图:

图片 3

 

 

粗略计算一下:

PXE Client发送广播包央求DHCP分配IP地址DHCP

Server回复诉求,给出IP地址以及Boot

PXE Client从Server下载辅导文件施行指点程序

---> Package httpd-devel.x86_64 0:2.4.6-45.el7.centos will be installed

3.    Yum安装cobbler

# yum -y install cobbler

上面是设置完后系统中有个别关键的文本地方及注明:

 #rpm -ql cobbler

/etc/cobbler

配置文件目录

/etc/cobbler/settings

cobbler主配置文件

/etc/cobbler/dhcp.template

DHCP服务的配置模板

/etc/cobbler/tftpd.template

tftp服务的配置模板

/etc/cobbler/rsync.template

rsync服务的配置模板

/etc/cobbler/iso

iso模板配置文件目录

/etc/cobbler/pxe

pxe模板文件目录

/etc/cobbler/power

电源的配置文件目录

/etc/cobbler/users.conf

Web服务授权配置文件

/etc/cobbler/users.digest

web访问的用户名密码配置文件

/etc/cobbler/dnsmasq.template

DNS服务的配置模板

/etc/cobbler/modules.conf

Cobbler模块配置文件

/var/lib/cobbler

Cobbler数据目录

/var/lib/cobbler/config

配置文件

/var/lib/cobbler/kickstarts

默认存放kickstart文件

/var/lib/cobbler/loaders

存放的各种引导程序

/var/www/cobbler

系统安装镜像目录

/var/www/cobbler/ks_mirror

导入的系统镜像列表

/var/www/cobbler/images

导入的系统镜像启动文件

/var/www/cobbler/repo_mirror

yum源存储目录

/var/log/cobbler

日志目录

/var/log/cobbler/install.log

客户端系统安装日志

/var/log/cobbler/cobbler.log

cobbler日志

 

---> Package syslinux.x86_64 0:4.05-13.el7 will be installed

1.    认知一下PXE

预运营实施情状(Preboot eXecution Environment,PXE,也被喻为预实施境遇)提供了一种采用网络接口(Network Interface)运维Computer的编写制定。这种体制让Computer的启航能够不借助于地点数据存款和储蓄设备(如硬盘)或本地已安装的操作系统

PXE:帮忙工作站通过互连网从远端服务器下载影象,并透过援助通过网络运转操作系统,在开发银行进度中,终端须要服务器分配IP地址,再用TFTP(trivial file transfer protocol)或MTFTP(multicasttrivial file transfer pro日

tocol)合同下载三个起动软件包到本机内部存储器中实施,由那一个运行软件包完结Client端自动化中央软件设置,进而辅导预先安装在服务器中的终端操作系统。PXE能够带领各样操作系统,如:windows95/98/三千/windows二零零四/windows二零一零/winXP/win7/win8,linux等。

PXE是由AMD设计的协商,它能够使Computer通过互连网运行。合同分成client和server两端,PXE client在网卡的ROM中,当Computer辅导时,BIOS把PXE client调入内部存款和储蓄器施行,并出示出命令菜单,经顾客挑选后,PXE client将放置在远端的操作系统通过网络下载到当地运营,无盘专门的学问站就是通过PXE来拓宽运转的。PXE合同的中标运转须要缓慢解决以下五个难题:IP地址的分红,下载Linux内核和根文件系统。

IP地址的分红

能够用DHCP server来给PXE client分配多个IP地址,DHCP Server是用来给DHCP Client动态分配IP地址的说道,可是鉴于此处是给PXE Client分配IP地址,所以在计划DHCP Server时,要求扩展对应的PXE特有布署。

下载Linux内核和根文件系统

PXE client所在的ROM中,已经存在了TFTP Client。PXE Client使用TFTP Client,通过TFTP左券到TFTP Server上下载所需的公文。

8 : fencing tools were not found, and are required to use the (optional) power management features. ``install cman or fence-agents to use them

1.    添加EPEL源

Cobbler位于EPEL源中,纵然系统并未EPEL源,先要安装

# yum -y install epel-release

task started (``id``=Sync, ``time``=Sun Sep  3 18:01:07 2017)

3.    PXE应用

PXE最直白的变现是,在网络境遇下职业站能够省去硬盘,但又不是常见所说的无盘站的概念,因为使用该本事的PC在互连网格局下的周转速度要比有盘PC快3倍以上。当然使用PXE的PC亦非古板意义上的TERMINAL终端,因为运用了PXE的PC并不消耗服务器的CPU,RAM等能源,故服务器的硬件必要相当低。

互连网克隆 PXE 今后非常常见的使用三个是网吧的无盘本事。在有盘领域的网络维护和装置中PXE能够是最佳用的网吧系统集合设置和维护的指点手艺,PXE的指引速度和平安都以头等的!

Package pykickstart-1.99.66.10-1.el7.noarch already installed and latest version

2.    科布ler支撑服务安装

Cobbler即便能够接管DHCP服务,但本身并不提供DHCP服务,而且yum安装 cobbler的时候也不会自行安装DHCP,然而会设置TFTP,HTTP及部分python的包。

# yum -y install dhcp

---> Package Django14.noarch 0:1.4.20-1.el6 will be installed

4.    Cobbler先导配置cobbler check

将cobbler所注重的劳动设置为开机自运营,并拉开服务,首要有httpd,dhcpd,tftp及cobbler本身。

#systemctl start httpd

#systemctl enable httpd

#systemctl start tftp

#systemctl enable tftp

#systemctl start dhcpd

#systemctl enable dhcpd

# systemctl start cobbler

# systemctl enable cobbler

Cobbler check命令首借使用来检查当前系统是还是不是满意cobbler的运转必要,上面是率先次运维cobbler check命令的提示,依照提醒三个一个退换就可以。

# 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 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 : SELinux is enabled. Please review the following wiki page for details on ensuring cobbler works correctly in your SELinux environment:

   

4 : change 'disable' to 'no' in /etc/xinetd.d/tftp

5 : 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.

6 : enable and start rsyncd.service with systemctl

7 : debmirror package is not installed, it will be required to manage debian deployments and repositories

8 : ksvalidator was not found, install pykickstart

9 : 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:default_password_crypted "openssl passwd -1 -salt 'random-phrase-here' 'your-password-here'" to generate new one

10 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them

Restart cobblerd and then run 'cobbler sync' to apply changes.

1#本条提醒是亟需修改/etc/cobbler/settings 文件中server: 前面包车型地铁IP地址,那个位置默许是127.0.0.1内需修改成能够通讯的cobbler服务器本机真实的网卡地址。

#vi /etc/cobbler/settings

server: 192.168.100.10

2#其一提醒是说要想让PXE工作起来,须要设置/etc/cobbler/settings中next_server的ip地址,借使启用cobbler来治本DHCP就要修改,那个是dhcp服务器的地方,如果未有科学安装那么些地址则会展现TFTP超时。

#vi /etc/cobbler/settings

next_server: 192.168.100.10

3#以此提示供给关门selinux

#vi /etc/sysconfig/selinux

SELINUX=disabled

4#提示供给启用tftp

#vi /etc/xinetd.d/tftp

service tftp

{

       socket_type           = dgram

       protocol         = udp

       wait               = yes

       user               = root

       server                   = /usr/sbin/in.tftpd

       server_args           = -s /var/lib/tftpboot

       disable                  = no

       per_source            = 11

       cps                = 100 2

       flags                     = IPv4

5#提示须要选取cobbler get-loaders从英特网下载指点程序

# cobbler get-loaders

6#提醒要求运维 rsyncd服务

# systemctl start rsyncd

7#唤醒deb的包未有被装置,假设不筹划安顿debian系统能够忽略

8#提示要求安装pykickstart

#yum –y pykickstart

9#提示供给修改默许密码"openssl passwd -1 -salt 'random-phrase-here' 'your-password-here'"并替换settings中default_password_crypted引号中的内容

# openssl passwd -1 -salt 'frank' 'frank'

$1$frank$.XItdMFNYz07ISKS9q9Jx0

#vi /etc/cobbler/settings

default_password_crypted: "$1$frank$.XItdMFNYz07ISKS9q9Jx0"

10#晋升假若选用电源管理模块,要求设置cman 恐怕 fence-agents

# yum install fence-agents-all

The following are potential configuration items that you may want to fix:

---> Package avalon-framework.noarch 0:4.3-10.el7 will be installed

3 : change ``'disable' to ``'no' in /etc/xinetd``.d``/tftp

一.  在cobbler server上安装cobbler

``python(abi) = 2.7

--> Processing Dependency: python-simplejson ``for package: Django14-1.4.20-1.el6.noarch

copying bootloaders

--> Processing Dependency: python-simplejson ``for package: cobbler-2.6.3-1.el6.noarch

cobbler和Kickstart批量装机软件

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.

``Requires: python-simplejson

``Requires: python-simplejson

trying hardlink ``/usr/share/syslinux/menu``.c32 -> ``/var/lib/tftpboot/menu``.c32

--> Processing Dependency: cyrus-sasl-devel(x86-64) ``for package: openldap-devel-2.4.40-13.el7.x86_64

--> Processing Dependency: python-cheetah ``for package: cobbler-2.6.3-1.el6.noarch

Restart cobblerd and ``then run ``'cobbler sync' to apply changes.

--> Running transaction check

Package 12:dhcp-libs-4.2.5-47.el7.centos.x86_64 already installed and latest version

---> Package xinetd.x86_64 2:2.3.15-13.el7 will be installed

--> Processing Dependency: mvn(javax.mail:mail) ``for package: log4j-1.2.17-15.el7.noarch

[root@bokeyuan ~]``# cobbler check

  1.互联网碰到:host-only、nat互连网,因为Cobbler必要用到温馨的dhcp服务器,所认为了避防都在同三个互连网产生dhcp获取混乱,须求切换互联网!~ 

cleaning link caches

#  systemctl restart cobblerd.service  --保存后,再重启此服务

---> Package httpd-manual.noarch 0:2.4.6-45.el7.centos will be installed

--> Processing Dependency: Django ``for package: cobbler-web-2.6.3-1.el6.noarch

running python trigger cobbler.modules.scm_track

ipa-client-4.4.0-12.el7.centos.x86_64 has installed conflicts freeipa-client: ipa-client-4.4.0-12.el7.centos.x86_64

Error: Package: Django14-1.4.20-1.el6.noarch (cobbler)

---> Package httpcomponents-client.noarch 0:4.2.5-5.el7_0 will be installed

---> Package Django14.noarch 0:1.4.20-1.el6 will be installed

四.修改dhcp配置
# vim /etc/cobbler/dhcp.template  --在此文件的第21行到第25行修改成你对号入座的网段和ip   

--> Processing Dependency: apr-util-devel ``for package: httpd-devel-2.4.6-45.el7.centos.x86_64

--> Processing Dependency: ``/etc/mime``.types ``for package: httpd-2.4.6-45.el7.centos.x86_64

removing: ``/var/lib/tftpboot/grub/images

[root@bokeyuan ~]# systemctl restart cobblerd.service
[root@bokeyuan ~]# systemctl restart httpd.service
[root@bokeyuan ~]# systemctl enable cobblerd.service  //开机自运营
Created symlink from /etc/systemd/system/multi-user.target.wants/cobblerd.service to /usr/lib/systemd/system/cobblerd.service.
[root@bokeyuan ~]# systemctl enable httpd.service  //开机自运转
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.

  pxe顾客端(client)指机器在pxe运维进程中的剧中人物。一个pxe顾客端能够是一台服务器、台式机Computer也许另外装有pxe运维代码的机械

``You could try using --skip-broken to work around the problem

 Cobbler由python语言开拓,是对PXE和Kickstart以及DHCP的包装。融合比比较多风味,提供了CLI和Web的保管情势。尤其低价的实行互联网安装。同不经常间,科布ler也提供了API接口,使用别的语言也很轻巧做扩大。它不紧能够设置物理机,同有时候也援助kvm、xen虚构化、Guest OS的设置。越来越多的是它还是能够整合Puppet等聚焦国化学工业进出口总集团管理软件,实现自动化的治本。

 报错消除:提醒--skip-broken ,检查开掘自身yum源不全yum无法安装下边四个注重包。补全yum源化解

---> Package cobbler-web.noarch 0:2.6.3-1.el6 will be installed

越来越多实际情况见请继续读书下一页的精粹内容: http://www.linuxidc.com/Linux/2017-09/146706p2.htm

--> Processing Dependency: osgi(org.apache.xerces) ``for package: xalan-j2-2.7.1-23.el7.noarch

 

--> Processing Dependency: python-simplejson ``for package: Django14-1.4.20-1.el6.noarch

running shell triggers from ``/var/lib/cobbler/triggers/change/``*

---> Package apache-commons-codec.noarch 0:1.8-7.el7 will be installed

怎么运维apache?血的教训,排了相当久。不先运维apache 后续cobbler check 报python file 的谬误!!!

# cobbler sync

--> Processing Dependency: python-simplejson ``for package: Django14-1.4.20-1.el6.noarch

--图形的操作进程这里大约后续还会有这一步 首要

trying hardlink ``/var/www/cobbler/ks_mirror/centos7``.3``/images/pxeboot/vmlinuz -> ``/var/www/cobbler/images/centos7``.3-x86_64``/vmlinuz

--> Processing Dependency: python(abi) = 2.6 ``for package: Django14-1.4.20-1.el6.noarch

(难题4能够运用cobbler get-loaders化解,但必要有外网和外网的yum源 跳过,以后是NAT情势;难点6 是关于debian系统的,大家这里能够忽略)

六.新建另四个虚拟机 选拔互联网安装PXE (有限帮衬平等私有网络,而且最棒2G内部存款和储蓄器,内部存款和储蓄器小的话会在设置时报空间缺乏的一无可取),举行设置测量检验

** Found 3 pre-existing rpmdb problem(s), ``'yum check' output follows:

trying hardlink ``/var/www/cobbler/ks_mirror/centos7``.3``/images/pxeboot/vmlinuz -> ``/var/lib/tftpboot/images/centos7``.3-x86_64``/vmlinuz

---> Package Django14.noarch 0:1.4.20-1.el6 will be installed

---> Package xml-commons-resolver.noarch 0:1.2-15.el7 will be installed

removing: ``/var/lib/tftpboot/s390x/profile_list

五.使用cobbler sync同步,并启动xinetd服务

--> Processing Dependency: mod_ssl ``for package: cobbler-web-2.6.3-1.el6.noarch

  PXE主就算经过播放的方法发送多少个包,并请注获取叁个地点,而后交给TFTP程序下载三个教导文件。

--> Processing Dependency: expat-devel(x86-64) ``for package: apr-util-devel-1.5.2-6.el7.x86_64

--> Processing Dependency: python-simplejson ``for package: cobbler-2.6.3-1.el6.noarch

--> Processing Dependency: PyYAML ``for package: cobbler-2.6.3-1.el6.noarch

--> Processing Dependency: python(abi) = 2.6 ``for package: Django14-1.4.20-1.el6.noarch

--> Processing Dependency: osgi(org.apache.xml.resolver) ``for package: xerces-j2-2.11.0-17.el7_0.noarch

--> Processing Dependency: python-cheetah ``for package: cobbler-2.6.3-1.el6.noarch

Resolving Dependencies

  一句话总括:Cobbler补鞋匠是对Kickstart的包装,简化安装步骤、使用流程,官方称为补鞋匠都能学会的批量装机。

--> Processing Dependency: python(abi) = 2.6 ``for package: Django14-1.4.20-1.el6.noarch

---> Package mod_ssl.x86_64 1:2.4.6-45.el7.centos will be installed

running post-``sync triggers

Package 12:dhcp-common-4.2.5-47.el7.CentOS.x86_64 already installed and latest version

--> Processing Dependency: libyaml-0.so.2()(64bit) ``for package: PyYAML-3.10-11.el7.x86_64

缓和急需3
# vim /etc/xinetd.d/tftp
        disable = no    --yes改为no

server端:

``Installed: python-2.7.5-48.el7.x86_64 (@anaconda)

化解急需1、2、7
# openssl passwd -1 -salt 'werwqerwqr' '123456'        --123456为密码(那是自动安装客商端系统成功后的root登陆密码),werwqerwqr为随机字节苦恼码(随意写)
$1$werwqerw$.prcfrYFbwuvkD8XspayN.

---> Package Django14.noarch 0:1.4.20-1.el6 will be installed

三.导入centos7.3的iso镜像

--> Processing Dependency: mvn(logkit:logkit) ``for package: apache-commons-logging-1.1.2-7.el7.noarch

--> Processing Dependency: python-simplejson ``for package: cobbler-2.6.3-1.el6.noarch

--> Processing Dependency: mvn(commons-logging:commons-logging) ``for package: httpcomponents-client-4.2.5-5.el7_0.noarch

Cobbler 事业流程

--> Processing Dependency: xalan-j2 ``for package: avalon-framework-4.3-10.el7.noarch

running python triggers from ``/var/lib/cobbler/triggers/sync/post/``*

---> Package apr-devel.x86_64 0:1.4.8-3.el7 will be installed

Error: Package: cobbler-2.6.3-1.el6.noarch (cobbler)

# cobbler distro list   --导入成功后,确认导入的镜像名
  centos7.3-x86_64
# cobbler profile list   --导入成功后,确认私下认可的profile名
  centos7.3-x86_64

trying hardlink ``/usr/share/syslinux/memdisk -> ``/var/lib/tftpboot/memdisk

设置到位后,更动boot教导

    第一步,顾客端以PXE格局运转
    第二步,顾客端获取IP地址
    第三步,通过TFTP服务器获取运维文件
    第四步,步入科布ler安装采用分界面
    第五步,客商端鲜明加载消息
    第六步,依据布置消息希图安装系统
    第七步,加载Kickstart文件
    第八步,传输系列安装的其他文件
    第九步,进行安装系统

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.

Loading mirror speeds from cached hostfile

5 : ``enable and start rsyncd.service with systemctl

化解须求8
# yum install fence-agents

---> Package mailcap.noarch 0:2.1.41-2.el7 will be installed

copying images

---> Package avalon-logkit.noarch 0:2.1-14.el7 will be installed

trying hardlink ``/usr/share/syslinux/pxelinux``.0 -> ``/var/lib/tftpboot/pxelinux``.0

running shell triggers from ``/var/lib/cobbler/triggers/sync/post/``*

---> Package cobbler.noarch 0:2.6.3-1.el6 will be installed

--> Running transaction check

copying files ``for distro: centos7.3-x86_64

--> Processing Dependency: tomcat-servlet-3.0-api ``for package: avalon-logkit-2.1-14.el7.noarch

---> Package tftp.x86_64 0:5.2-13.el7 will be installed

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

  yum install cobbler cobbler-web tftp* rsync xinetd http* syslinux dhcp* pykickstart

图片 4   

--> Processing Dependency: python-cheetah ``for package: cobbler-2.6.3-1.el6.noarch

 

task started: 2017-09-03_180107_sync

[root@bokeyuan ~]``# yum install cobbler cobbler-web tftp* rsync xinetd http* syslinux dhcp* pykickstart

removing: ``/var/lib/tftpboot/images/centos7``.3-x86_64

---> Package cobbler.noarch 0:2.6.3-1.el6 will be installed

---> Package libdb-devel.x86_64 0:5.3.21-19.el7 will be installed

Client端:

--> Processing Dependency: python(abi) = 2.6 ``for package: Django14-1.4.20-1.el6.noarch

--> Processing Dependency: openldap-devel(x86-64) ``for package: apr-util-devel-1.5.2-6.el7.x86_64

--> Processing Dependency: python-cheetah ``for package: cobbler-2.6.3-1.el6.noarch

OK,剩下的须要像

---> Package PyYAML.x86_64 0:3.10-11.el7 will be installed

---> Package xml-commons-apis.noarch 0:1.4.01-16.el7 will be installed

--> Running transaction check

---> Package cobbler.noarch 0:2.6.3-1.el6 will be installed

ipa-client-common-4.4.0-12.el7.centos.noarch has installed conflicts freeipa-client-common: ipa-client-common-4.4.0-12.el7.centos.noarch

--> Processing Dependency: python-simplejson ``for package: Django14-1.4.20-1.el6.noarch

Writing template files ``for centos7.3-x86_64

copying distros to tftpboot

---> Package xerces-j2.noarch 0:2.11.0-17.el7_0 will be installed

下边的cobbler sync 比较重大,要是那步报错必须要排出来,就经历来讲那步出错一般是IP配置出错,记得留心一点,个体差别不用就不详细表述~  

running pre-``sync triggers

--> Running transaction check

---> Package tomcat-servlet-3.0-api.noarch 0:7.0.69-10.el7 will be installed

    第一步,启动Cobbler服务
    第二步,实行Cobbler错误检查,实行cobbler check命令
    第三步,实行配备同步,施行cobbler sync命令
    第四步,复制相关运营文件文件到TFTP目录中
    第五步,运行DHCP服务,提供地点分配
    第六步,DHCP服务分配IP地址
    第七步,TFTP传输运转文件
    第八步,Server端接收装置消息
    第九步,Server端发送ISO镜像与Kickstart文件

trying hardlink ``/var/www/cobbler/ks_mirror/centos7``.3``/images/pxeboot/initrd``.img -> ``/var/www/cobbler/images/centos7``.3-x86_64``/initrd``.img

---> Package geronimo-jms.noarch 0:1.1.1-19.el7 will be installed

--> Finished Dependency Resolution

---> Package cyrus-sasl-devel.x86_64 0:2.1.26-20.el7_2 will be installed

安装落成,运转软件

# vim /etc/cobbler/settings
384 server: 192.168.100.221   --换到cobbler服务器端的IP
272 next_server: 192.168.100.221   --同上
101 default_password_crypted: "$1$werwqerw$.prcfrYFbwuvkD8XspayN."  --把密码字符串换来你下边产生的字符串(此密码为客商机安装后的root登入密码)

processing boot_files ``for distro: centos7.3-x86_64

Error: Package: Django14-1.4.20-1.el6.noarch (cobbler)

--> Processing Dependency: mod_wsgi ``for package: cobbler-2.6.3-1.el6.noarch

#systemctl enable  rsyncd.service

--> Processing Dependency: python-simplejson ``for package: Django14-1.4.20-1.el6.noarch

---> Package mod_wsgi.x86_64 0:3.4-12.el7_0 will be installed

---> Package apr-util-devel.x86_64 0:1.5.2-6.el7 will be installed

removing: ``/var/lib/tftpboot/pxelinux``.cfg``/default

---> Package xalan-j2.noarch 0:2.7.1-23.el7 will be installed

removing: ``/var/www/cobbler/images/centos7``.3-x86_64

# systemctl restart xinetd.service
# systemctl enable xinetd.service

--> Processing Dependency: xerces-j2 ``for package: xalan-j2-2.7.1-23.el7.noarch

cobbler server    -------    client
                  192.168.100.2252%4  ------------------------------------  装机时候由DHCP自动配置

  pxe顾客端会调用网际左券(ip)、顾客数据报合同(udp)、动态主机设定左券(DHCP)、小型文件传输公约(TFTP)

subnet 192.168.100.0 netmask 255.255.255.0 {
    option routers            192.168.100.221;
    option domain-name-servers 192.168.100.221;
    option subnet-mask        255.255.255.0;
    range dynamic-bootp        192.168.100.100 192.168.100.254;

  Kickstart 是一种无人值班守护的安装形式,它的做事原理是在装置进程中记录人工干预填写的各类参数,并扭转一个名字为ks.cfg的文书。大家得以差不离精晓为三个活动安装应答配置管理程序。通过读取那么些布局文件,系统精通怎么去分区,要安装什么包,配什么IP,优化什么内核参数等等 

---> Package apache-commons-logging.noarch 0:1.1.2-7.el7 will be installed

running python trigger cobbler.modules.sync_post_restart_services

trying hardlink ``/var/www/cobbler/ks_mirror/centos7``.3``/images/pxeboot/initrd``.img -> ``/var/lib/tftpboot/images/centos7``.3-x86_64``/initrd``.img

行业内部景况企图:

---> Package cobbler.noarch 0:2.6.3-1.el6 will be installed

---> Package cobbler.noarch 0:2.6.3-1.el6 will be installed

---> Package openldap-devel.x86_64 0:2.4.40-13.el7 will be installed

removing: ``/var/lib/tftpboot/grub/efidefault

running python triggers from ``/var/lib/cobbler/triggers/change/``*

``python(abi) = 2.7

cleaning trees

图片 5

Loaded plugins: fastestmirror, langpacks

ipa-common-4.4.0-12.el7.centos.noarch has installed conflicts freeipa-common: ipa-common-4.4.0-12.el7.centos.noarch

---> Package dhcp.x86_64 12:4.2.5-47.el7.centos will be installed

--> Processing Dependency: apr-devel ``for package: httpd-devel-2.4.6-45.el7.centos.x86_64

``Requires: python(abi) = 2.6

generating PXE configuration files

--> Running transaction check

  2.像样装置服务供给的条件打算:1,关闭iptables,selinux 2,配置静态IP、设置主机名 何况在hosts文件下绑定 3.时间同步 4.安插本地iso镜像里的yum饭店,163源epel源 (安装软件)

    PXE Client发送广播包诉求DHCP分配IP地址DHCP
    Server回复央浼,给出IP地址以及Boot
    Server的地点PXE下载指导文件执行引导程序

图片 6

--> Processing Dependency: osgi(javax.xml) ``for package: xerces-j2-2.11.0-17.el7_0.noarch

 一步步化解上述供给,部分供给可忽略。个体差距分化每种人必要数量也不如,基本上差不离

--> Processing Dependency: python-cheetah ``for package: cobbler-2.6.3-1.el6.noarch

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.

解决需求5

--> Processing Dependency: mvn(avalon-framework:avalon-framework-api) ``for package: apache-commons-logging-1.1.2-7.el7.noarch

--> Processing Dependency: libdb-devel(x86-64) ``for package: apr-util-devel-1.5.2-6.el7.x86_64

  pxe概述
  预运营执行意况(Preboot eXecution Environment,PXE,也被叫做预施行意况)是让Computer通过网卡独立地动用数据设备(如硬盘)恐怕设置操作系统

---> Package log4j.noarch 0:1.2.17-15.el7 will be installed

#systemctl restart rsyncd.service

generating PXE menu structure

--> Processing Dependency: mvn(commons-codec:commons-codec) ``for package: httpcomponents-client-4.2.5-5.el7_0.noarch

---> Package tftp-server.x86_64 0:5.2-13.el7 will be installed

---> Package httpd-tools.x86_64 0:2.4.6-45.el7.centos will be installed

---> Package httpcomponents-core.noarch 0:4.2.4-6.el7 will be installed

[root@bokeyuan ~]``# cobbler sync

--> Processing Dependency: python-simplejson ``for package: cobbler-2.6.3-1.el6.noarch

---> Package cobbler.noarch 0:2.6.3-1.el6 will be installed

# vim /etc/cobbler/settings   --再去修改这些布局文件,改成dhcp服务由cobbler来保管
242 manage_dhcp: 1       --把0改为1

---> Package javamail.noarch 0:1.4.6-8.el7 will be installed

--> Processing Dependency: python-simplejson ``for package: cobbler-2.6.3-1.el6.noarch

copying files ``for distro: centos7.3-x86_64

最后# systemctl restart cobblerd.service 重起下cobbler补鞋匠服务!

二.主导配备

--> Processing Dependency: jms ``for package: avalon-logkit-2.1-14.el7.noarch

---> Package Django14.noarch 0:1.4.20-1.el6 will be installed

Error: Package: cobbler-2.6.3-1.el6.noarch (cobbler)

generating ``/etc/xinetd``.d``/tftp

--> Processing Dependency: xml-commons-apis >= 1.4.01 ``for package: xerces-j2-2.11.0-17.el7_0.noarch

[root@bokeyuan ~]# cobbler import --path=/yum/ --name=centos7.3
task started: 2017-09-03_175701_import
task started (id=Media import, time=Sun Sep  3 17:57:01 2017)
Found a candidate signature: breed=RedHat, version=rhel6
Found a candidate signature: breed=redhat, version=rhel7
Found a matching signature: breed=redhat, version=rhel7
Adding distros from path /var/www/cobbler/ks_mirror/centos7.3:
creating new distro: centos7.3-x86_64
trying symlink: /var/www/cobbler/ks_mirror/centos7.3 -> /var/www/cobbler/links/centos7.3-x86_64
creating new profile: centos7.3-x86_64
associating repos
checking for rsync repo(s)
checking for rhn repo(s)
checking for yum repo(s)
starting descent into /var/www/cobbler/ks_mirror/centos7.3 for centos7.3-x86_64
processing repo at : /var/www/cobbler/ks_mirror/centos7.3
need to process repo/comps: /var/www/cobbler/ks_mirror/centos7.3
looking for /var/www/cobbler/ks_mirror/centos7.3/repodata/*comps*.xml
Keeping repodata as-is :/var/www/cobbler/ks_mirror/centos7.3/repodata
*** TASK COMPLETE *** 

--> Processing Dependency: python-simplejson ``for package: cobbler-2.6.3-1.el6.noarch

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.
6 : debmirror package is not installed, it will be required to manage debian deployments and repositories

--> Processing Dependency: xml-commons-resolver >= 1.2 ``for package: xerces-j2-2.11.0-17.el7_0.noarch

Cobbler(补鞋匠)是通过将DHCP、TFTP、DNS、HTTP等劳动开展集成,创造多少个主旨管理节点,其能够完结的成效有配备服务,创设存款和储蓄库,解压缩操作系统媒介,代理或集成贰个配备管理种类,调控电源管理等。 Cobbler的末梢目标是得以实现没有须要进行人工干预就能够安装机器。

rendering TFTPD files

--> Processing Dependency: mvn(log4j:log4j) ``for package: apache-commons-logging-1.1.2-7.el7.noarch

--> Running transaction check

---> Package expat-devel.x86_64 0:2.1.0-8.el7 will be installed

*** TASK COMPLETE ***

# cobbler import --path=/yum/ --name=centos7.3

自身的境况iso镜像挂载在/yum目录,此拷贝步骤时间较长

Package ``rsync``-3.0.9-17.el7.x86_64 already installed and latest version

本文由时时app平台注册网站发布于时时app平台注册网站,转载请注明出处:centos7采用cobbler(2.8)批量布署操作系统之一

关键词: