标签:des style tar ext color int
《综述》
跟Ruiy一起玩转Cobbler
本篇内容注主要涉及cobbler架构快速搭建,Cobbler命令行语法简单应用,Cobbler-WEB,system-config-kickStart基于Windows界面配置生成ks脚本模板,ks简单语法介绍等,关于Cobbler维护yum repo,部署Xen后续完善;
<一,安全设置之Iptables,SElinux>
1,关闭SElinux;
2,Iptables放行端口80,69,25151,内网使用可以关闭Iptables;
<二,基于YUM安装cobbler>
1,下载安装epel
cd /usr/local/src && wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm && rpm -ivh epel-release-6-8.noarch.rpm && yum makecache
2,安装cobbler及其组件依赖包
yum install cobbler tftp tftp-server xinetd dhcp httpd rsync #安装cobbler核心组件(tftp可不装)
yum install pykickstart debmirror python-ctypes cman #安装运行cobbler需要的软件包(debmirror可不装,要是无debina客户端)
<三,配置Cobbler>
1,配置httpd加载wsgi.so(Python Web Server Gateway Interface,kickStart/Cobbler开发语言用的是Python),yum部署默认以加载;
2,设置tftp,/etc/xinetd.d/tftp
(与cobbler的sync一起被xinetd维护,简单修改下都是将2个配置文件中的disable =
yes改为no)
内容如图
3,设置sync,/etc/xinetd.d/rsync
4,设置debmirror参数
注释如下截图2行即可,@dists="sid",@arches="i386";
5,生成加密密钥串 openssl passwd -1 -salt ‘ruiy‘ ‘ruiy‘ (前面是干扰字符,后面的是密码),生成的加密密钥字符串我们在后面的/etc/cobbler/settings及ks自动安装启动脚本里面需要用到;
6,emacs编辑配置/etc/cobbler/settings,设置如下4项即可;
default_password_crypted:"用openssl
passwd -1(MD5加密) -salt ‘ruiy‘
‘ruiy‘"
next_server:PXE服务器ip
server:同上
manager_dhcp:1
7,配置DHCP服务器,/etc/cobbler/dhcp.template,配置如下截图几行,别的维护默认,分别是配置ip网段,动态ip范围
8,指定Dhcp的网络接口,/etc/sysconfig/dhcpd
9,用dhcpd测试dhcp配置文件
10,加载cobbler
loaders包并初始化配置,设置服务开机启动;
chkconfig dhcpd on #设置开机启动
chkconfig cobblerd on #设置开机启动
cobbler get-loaders #安装cobbler相关工具包,否则检查cobbler配置会报错,要是报错 执行 service
cobblerd restart,因为执行get-loaders 需要有cobblerd进程启动;
service cobblerd start #启动cobbler
cobbler sync #同步配置文件到dhcp服务器
service dhcpd start #启动dhcp服务
11,Ruiy写了个维护cobbler组件(xinetd,dhcp,httpd,cobbler)服务进程的脚本(可选项)
解压包文件至/etc/rc.d/init.d/cobbler
chmod +x /etc/rc.d/init.d/cobbler #添加脚本执行权限
chkconfig cobbler on #添加开机启动
service cobbler restart #重启cobbler
cobbler check #检查cobbler配置
CentOS系统cobbler完全部署及案例测试,布布扣,bubuko.com
标签:des style tar ext color int
原文地址:http://www.cnblogs.com/ruiy/p/CobblerKickStart.html