cobbler 安装
 
一:定义yum源
yum update (升级所有包,改变软件设置和系统设置,系统版本内核都升级)
yum upgrade (升级所有包,不改变软件设置和系统设置,系统版本升级,内核不改变)
 
二:关闭防火墙和SElinux
(关闭防火墙)
chkconfig ip6tables off
chkconfig iptables off
/etc/init.d/ip6tables stop
/etc/init.d/iptables stop
 
(关闭selinux)
sed -i '/^SELINUX=/ s/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config
setenforce 0 (这个需要重启机器才能生效,所以建议修改完重启)
sestatus
 
三:安装cobbler
yum -y install cobbler cobbler-web
yum  install tftp-server xinetd  dhcp  httpd  rsync
yum  install  pykickstart  debmirror  python-ctypes   cman
 
配置web认证
sed -i 's/module = authn_denyall/module = authn_configfile/g' /etc/cobbler/modules.conf
 
四:打开服务需要使用的端口
udp 69 tftp
udp 53 dns
tcp 80 443 web
dhcp 67 68
 
五:启动Cobbler服务
/etc/init.d/cobblerd start
 
可能会缺少的包:
请注意察看 cobbler服务启动的报错信息,我第一次安装时候就遇到有关ctypes的报错,只能手动安装:
yum -y install python-ctypes
 
六:配置cobbler
(1)配置httpd配置文件
# vi /etc/httpd/conf/httpd.conf
ServerName 127.0.0.1:80
 
启用wsgi模块
需要确认mod_wsgi已经正确安装,否则需要手动安装
yum -y install mod_wsgi
启用wsgi模块只需要取消 /etc/httpd/conf.d/wsgi.conf 文件中LoadModule wsgi_module modules/mod_wsgi.so 行的注释
sed -i 's*#LoadModule*LoadModule*g' /etc/httpd/conf.d/wsgi.conf
 
(2)配置tftp与rsync
sed -i '/disable/c disable = no' /etc/xinetd.d/tftp
sed -i -e 's/= yes/= no/g' /etc/xinetd.d/rsync
service xinetd restart
 
(3)Server 和 Next_Server
sed -i 's/server: 127.0.0.1/server: 192.168.21.128/g' /etc/cobbler/settings
sed -i 's/next_server: 127.0.0.1/next_server: 192.168.21.128 /g' /etc/cobbler/settings
 
(4)防止误重装系统(pxe安装 只允许一次,防止误操作)
sed -i 's/pxe_just_once: 0/pxe_just_once: 1/g' /etc/cobbler/settings
 
(5)生成Cobbler安装系统root初始密码
openssl passwd -1 -salt 'random-phrase-here' '111111'
 
# vi /etc/cobbler/settings
修改为如下配置
default_password_crypted: "$1$random-p$WbZ3JxhRzCS/1Ne4S9g4Z."
 
(6)Cobbler管理rsync,dhcp(默认为0,不对rsync进行管理,可以修改为1 进行管理)
sed -i 's/manage_rsync: 0/manage_rsync: 1/g' /etc/cobbler/settings
 
(7)Cobbler管理dhcp
为了pxe的启动,需要一个DHCP服务器地址,并直接引导系统,它可以在网络中下载引导文件到TFTP的服务器,cobbler可以通过manage_dhcp的设置来进行管理
sed -i 's/manage_dhcp: 0/manage_dhcp: 1/g' /etc/cobbler/settings
 
接下来修改/etc/cobbler/dhcp.template,此文件是cobbler管理dhcp的模板,确保DHCP分配的地址和Cobbler在同一网段
 
如果是多网卡需要指定DHCP服务的网络接口
#vi /etc/sysconfig/dhcpd
修改内容如下:
#Command line options here DHCPDARGS=eth0
DHCPDARGS=eth0
      
# 测试dhcp服务器配置是否正确
# dhcpd # 在执行cobbler sync 之后测试才有效,因为没同步之前文件/etc/dhcp/dhcpd.conf还没有被同步修改
 
(8)设置debmirror(注释掉@dists和@arches的行)
sed -i -e 's|@dists=.*|#@dists=|'  /etc/debmirror.conf
sed -i -e 's|@arches=.*|#@arches=|'  /etc/debmirror.conf
 
(9)加载部分缺失的网络boot-loaders
cobbler get-loaders
 
(10)检查Cobbler配置
cobbler check
 
(11)重启cobbler和更新相关配置并且同步最新cobbler配置
/etc/init.d/cobblerd restart
cobbler sync
 
(12)启动相关服务并设置开机启动
chkconfig httpd on
chkconfig xinetd on
chkconfig cobblerd on
chkconfig dhcpd on
/etc/init.d/httpd restart
/etc/init.d/xinetd restart
/etc/init.d/cobblerd restart
/etc/init.d/dhcpd restart
 
七:cobbler使用
(1)上传镜像到cobbler服务器上
(2)挂载镜像  mount -t iso9660 -o loop /usr/local/src/CentOS-6.5-x86_64-bin-DVD1.iso   \mnt
(3)导入系统镜像到Cobbler    cobbler import --path=/mnt    --name=CentOS-6.5-x86_64  --arch=x86_64
 
八:修改profile指定新的KS启动文件
cobbler profile report --name  CentOS-6.5-x86_64  #查看profile设置
cobbler distro report --name CentOS-6.5-x86_64 #查看安装镜像文件信息
cobbler profile remove --name=CentOS-6.5-x86_64  #移除profile
cobbler profile add --name=CentOS-6.5-x86_64 --distro=CentOS-6.5-x86_64 --kickstart=/var/lib/cobbler/kickstarts/CentOS-6.5-x86_64.ks #添加
cobbler profile edit --name=CentOS-6.5-x86_64 --distro=CentOS-6.5-x86_64 --kickstart=/var/lib/cobbler/kickstarts/CentOS-6.5-x86_64.ks #编辑
cobbler profile rename --name=Centos-5.9-x86_64 --newname=CentOS-5U9-x64  更改profile名称
cobbler system add --name=test_000 --ip=192.168.1.0/24 --profile=Centos-5.9-x86_64 指定一个网段使用特定的装机配置
cobbler system add --name=test_001 --hostname=test_001 --mac=00:0C:29:E3:81:32 --interface=eth0 --ip-address=192.168.1.123 --subnet=255.255.255.0 --gateway=192.168.1.1 --static=1 --profile=Centos-5.9-x86_64  添加一个指定服务器的装机配置
cobbler system rename --name=test001 --newname=abc变更system配置名称
cobbler system add --name=test_001 --ip=192.168.1.110机器IP地址变更为192.168.10.110
cobbler system remove --name=test_001删除system配置
cobbler system list查看定义的系统列表
 
#查看Cobbler列表
cobbler list
cobbler report
cobbler profile report
cobbler distro list # 查看导入列表
 
九:为Cobbler添加RPM仓库
cobbler repo add --mirror=http://mirrors.ustc.edu.cn/epel/6/x86_64/ --name=epel6-x86_64 --arch=x86_64 --breed=yum
cobbler repo add --mirror=http://mirrors.ustc.edu.cn/epel/testing/6/x86_64/ --name=epel6-x86_64-testing --arch=x86_64 --breed=yum
 
这个只是对centos有效,如果你吧repo添加到profle,他会自动添加到节点上的repo上,指向内网,非常方便。
cobbler profile edit --name=CentOS6.5-x86_64 --repos="epel6-x86_64 epel6-x86_64-testing"
 
cobbler reposync
 
十:安装koan
koan --server=192.168.1.10 --list=profiles
 
十一:无法通过cobbler引导   
安装 asu  IPMITool/UTIL
 
asu set PXE.NicPortPxeMode.1 "UEFI Support" --host 9.111.115.45 --user USERID --password PASSW0RD
cobbler profile add --name=RHEL-7.1-x86_64-21 --distro=RHEL-7.1-x86_64 --kopts="console=tty0 console=ttyS0,115200n8" --kickstart="/var/lib/cobbler/kickstarts/RHEL7.1-21.ks"
 
十二:修改超时
/etc/cobbler/pxe 的两个文件 pxedefault.template和efidefault.template

centos6 install cobbler的更多相关文章

  1. Centos6.4 cobbler安装要点

    1,yum 安装cobbler rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm y ...

  2. centos6 install mcrypt

    Download the latest epel-release rpm from http://dl.fedoraproject.org/pub/epel/6/x86_64/ Install epe ...

  3. centos6 install mplayer(multimedia)

    step_1 http://wiki.centos.org/AdditionalResources/Repositories/RPMForge step_2 http://wiki.centos.or ...

  4. CentOS6 Install kafka

    https://www.cnblogs.com/caoguo/p/5958608.html

  5. 使用Cobbler无人值守安装CentOS6.5(一)

    Cobbler是一个快速网络安装linux的服务,而且在经过调整也可以支持网络安装windows.该工具使用python开发,小巧轻便(才15k行代码),使用简单的命令即可完成PXE网络安装环境的配置 ...

  6. Cobbler自动化批量部署CentOS6.5系统

    Cobbler作为一个预备工具,使批量部署Red Hat/Centos/Fedora系统更容易,同时也支持Suse和Debian系统的部署. 它提供以下服务集成: * PXE服务支持 * DHCP服务 ...

  7. cobbler部署安装CentOS6.8

    Linux运维:cobbler : 矮哥linux运维群:93324526 学习cobbler的话,必须先搞懂kickstart,原理不是,不懂如何排错. kickstart部署请点击这里 1. Co ...

  8. cobbler部署centos6与centos7系列

    cobbler部署centos6与centos7系列 转载自:http://www.jianshu.com/p/a4bed77bf40d 版权声明:完全抄自 http://www.jianshu.co ...

  9. Cobbler学习之一--Fedora17下配置Cobbler安装环境

    1:Cobbler是什么 Cobbler是一大Linux装机利器,可以快速的建立网络安装环境. 2:安装Cobbler需要的组件 createrepo httpd (apache2 for Debia ...

随机推荐

  1. Codeforces Round #347 (Div.2)_B. Rebus

    题目链接:http://codeforces.com/contest/664/problem/B B. Rebus time limit per test 1 second memory limit ...

  2. 1.4 配置备份策略(Policy)

    1.1 配置备份策略(Policy) 一个备份策略由四部分组成. Attributes(属性) Policy是否Active Policy类型 由此Policy产生的任务的优先级 使用的Storage ...

  3. 【洛谷P1962】斐波那契数列

    斐波那契数列 题目链接:https://www.luogu.org/problemnew/show/P1962 矩阵A 1,1 1,0 用A^k即可求出feb(k). 矩阵快速幂 #include&l ...

  4. 阅读detection

    关于detecion的几篇文章,感觉有必要系统学习一下,并记录一下了,最近看书比较多,文章看得少,赶紧看看吧. FPN:Feature Pyramid Networks for Object Dete ...

  5. LeetCode426.Convert Binary Search Tree to Sorted Doubly Linked List

    题目 Convert a BST to a sorted circular doubly-linked list in-place. Think of the left and right point ...

  6. avalon ms-repeat avalon1

    工作原因要用到avalon二次开发, 但是看了下以前的avalon版本是1,现在大多数都是2版本了吧,,所以很多文档不好找,但是大多数还是好用的 ms-repeat 循环当前赋值的, ms-repea ...

  7. 交换机基础配置之stp生成树实验

    实验的要求是以上面的拓扑图为例,查看当前根桥的所在并把三成交换机switch1指定为根桥 我们可以用show spanning-tree来查看stp的信息 输入后会显示两部分 上面一部分为当前交换机自 ...

  8. Spring入门注解版

    参照博文Spring入门一,以理解注解的含义. 项目结构: 实现类:SpringHelloWorld package com.yibai.spring.helloworld.impl; import ...

  9. strak组件(9):关键字搜索

    效果图: 在列表视图函数增加搜索功能. 新增函数 def get_search_list(self) 钩子方法,获取搜索条件 一.strak组件 strak/service/core_func.py ...

  10. 华为模拟器ensp代码错误2,41,40问题的解决

    win8+ensp320 ensp这是个神奇的软件,问题竟然出现的这么莫名其妙..前一秒还是好的时候,后一秒就立马出现了问题.不过不要慌...沉住气,把这篇文章看下去. 博主从昨天开始,ensp神奇的 ...