ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

1.Cobbler服务器的部署

2020-03-04 14:03:43  阅读:297  来源: 互联网

标签:md font cm 部署 color Cobbler 服务器 0px margin


Server端

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

Client端

第一步:客户端以PXE模式启动 第二步:客户端获取IP地址 第三步:通过TFTP服务器获取启动文件 第四步:进入Cobbler安装选择界面 第五步:客户端确定加载信息 第六步:根据配置信息准备安装系统 第七步:加载Kickstart文件 第八步:传输系统安装的其它文件 第九步:进行系统安装

 

安装Cobbler

环境准备

更新Yum源
               
# 先安装epel源
$ yum -y install epel-release
# 更新yum源
$ yum -y update
   
关闭防火墙和SELinux
               
# 通过setforce设置SELinux的状态,如果是Permissive不行,必须为disabled
$ setenforce 0
$ sed -ri '/^SELINUX=/cSELINUX=disabled' /etc/selinux/config
$ systemctl stop firewalld
$ systemctl disable firewalld
$ iptables -F
   
固定IP

因为如果是动态DHCP获取IP的话,之后IP可能会变化

               
$ vim /etc/sysconfig/network-scripts/ifcfg-eth0
TYPE="Ethernet"
BOOTPROTO="none"
NAME="eth0"
DEVICE="eth0"
ONBOOT="yes"
IPADDR=192.168.0.196
PREFIX=24
GATEWAY=192.168.0.1
DNS1=223.5.5.5
DNS2=223.6.6.6
   
安装DHCP
               
$ yum -y install dhcp xinetd tftp-server httpd
   
开启HTTP
               
$ systemctl start httpd dhcpd
$ systemctl enable httpd dhcpd
   

安装Cobbler

               
$ yum -y install cobbler
$ systemctl start cobblerd
$ systemctl enable cobblerd
$ 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.1 ​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.1 ​3 : SELinux is enabled. Please review the following wiki page for details on ensuring cobbler works correctly in your SELinux environment: https://github.com/cobbler/cobbler/wiki/Selinux[^2] ​4 : change 'disable' to 'no' in /etc/xinetd.d/tftp2 ​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.3 ​6 : enable and start rsyncd.service with systemctl4 ​7 : debmirror package is not installed, it will be required to manage debian deployments and repositories5 ​8 : ksvalidator was not found, install pykickstart6 ​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: "openssl passwd -1 -salt 'random-phrase-here' 'your-password-here'" to generate new one7 ​10 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them[^9]

               
# 上述错误修改完毕后,重启cobbler
$ systemctl restart cobblerd
$ cobbler check
   

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

1 : comment out 'dists' on /etc/debmirror.conf for proper debian support8 2 : comment out 'arches' on /etc/debmirror.conf for proper debian support8

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

               
# 修复完上述问题
$ cobbler check
   

check

出现上述情况说明,Server端已经安装成功,接下来修改配置

 

Cobbler配置
修改cobbler配置
      ​x        
$ vim /etc/cobbler/settings
# 启动DHCP管理
manage_dhcp: 1
   
修改DHCP配置
               
$ vim /etc/cobbler/dhcp.template
# 需要保证下面配置的IP和Cobbler Server机器在一个网段上
subnet 192.168.0.0 netmask 255.255.255.0 {
     option routers             192.168.0.196;                    # 修改为cobbler server端所在机器IP
     option domain-name-servers 192.168.0.1;  # 修改为cobbler server端所在机器IP
     option subnet-mask         255.255.255.0;
     range dynamic-bootp        192.168.0.100 192.168.0.254; # dhcp所分配的网段
     default-lease-time         21600;
     max-lease-time             43200;
     next-server                $next_server;
   

重新同步一次

     
x
       
$ cobbler sync
$ systemctl restart cobblerd
$ systemctl restart dhcpd
   

 

 

问题1:

21

没有开启HTTP服务,开启HTTP服务即可


1
$ vim /etc/cobbler/settings
#修改为Cobbler server端所在机器IP
server: 192.168.0.95
next_server: 192.168.0.95 2
$ vim /etc/xinetd.d/tftp
disable = no 3 下载网络引导文件进行修复
$ cobbler get-loaders 4
$ systemctl start rsyncd
$ systemctl enable rsyncd 5
$ yum -y install debmirror 6
$ yum -y install pykickstart 7
# 生成密码
$ openssl passwd -1 -salt "test" "redhat"
# 修改密码
$ vim /etc/cobbler/settings
default_password_crypted: "$1$mF86/UHC$WvcIcX2t6crBz2onWxyac." 8
$ vim /etc/debmirror.conf
# 将下面两行注释掉
# @dists="sid";
# @arches="i386";

 

  <style></style>

标签:md,font,cm,部署,color,Cobbler,服务器,0px,margin
来源: https://www.cnblogs.com/xll970105/p/12409109.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有