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. 轻量级HTTP服务器Nginx(配置与调试Nginx维护Nginx)

    轻量级HTTP服务器Nginx(配置与调试Nginx) 文章来源于南非蚂蚁   Nginx安装完毕后,会产生相应的安装目录,根据前面的安装路径,Nginx的配置文件路径为/opt/nginx/conf ...

  2. 2018.8.19 mybatis 环境搭建---配置mysql 。(Windows环境下面)

    安装mysql Install/Remove of the Service Denied!错误的解决办法 在windos 的cmd下安装mysql 在mysql的bin目录下面执行: mysqld - ...

  3. Python IDE PyCharm的快捷键大全

    Python IDE PyCharm的快捷键大全 1.编辑(Editing) Ctrl + Space 基本的代码完成(类.方法.属性) Ctrl + Alt + Space 快速导入任意类 Ctrl ...

  4. 开发者不容错过的10款免费JavaScript游戏引擎

    摘要:使用HTML5.JavaScript可以帮助开发者开发出各种与众不同的游戏及游戏特效,比如3D动画.Canvas等.本文介绍10款被广泛使用的基于HTML5的JavaScript游戏引擎. 在G ...

  5. babel 不能统编译Iterator、Generator、Set、Maps、Proxy、Reflect、Symbol、Promise的问题

    Babel默认只转换新的JavaScript句法(syntax),而不转换新的API,比如Iterator.Generator.Set.Maps.Proxy.Reflect.Symbol.Promis ...

  6. DFS练习一---HDU 1342

    参考文章来源:http://blog.csdn.net/pengwill97/article/details/54850852 题目在这里:HDU.1342 最近在练习DFS,就找了一些题来做,力求自 ...

  7. vim 个性化设置和操作

    一.vim 设置 1. 设置行号显示 1) 临时显示 命令行模式 :set nu 2) 永久显示 # vim ~/.vimrc 插入一行代码: set number 若没有该文件,在用户主目录 (/h ...

  8. MySQL 5.7传统复制到GTID在线切换(一主一从)

    Preface       Classic replication is commonly used in previous version of MySQL.It's really tough in ...

  9. HDU3853 概率DP

    LOOPS   Homura wants to help her friend Madoka save the world. But because of the plot of the Boss I ...

  10. python——PIL(图像处理库)

    PIL(Python Imaging Library,python图像处理库)提供了通用的图像处理功能,以及大量有用的基本图像操作,如图像缩放,裁剪,旋转,颜色转换等. 1.打开图像并显示 from ...