分类: LINUX

一、安装环境
centos 5.4
关掉iptables 关掉 selinux selinux 导致tftp的目录无法访问 pxe停止在引导界面
 
二、cobbler使用目录及文件
cobbler相关配置文件 /etc/cobbler
cobbler数据存储目录 /var/www/cobbler
dhcp配置文件 /etc/dhcpd.conf
dhcp租期缓存文件 /var/lib/dhcpd/dhcpd.leases
pxe配置文件 /tftpboot/pxelinux.cfg/default
 
三、安装cobbler
# rpm -ivh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
# rpm -ivh http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
# yum -y install tftp-server httpd dhcp yum-utils
# yum -y install cobbler
# yum -y install cman 
yum-utils  编译安装  make && make install
 
 
四、修改配置文件
 
1.修改cobbler配置文件
# vi /etc/cobbler/settings
[code]
server: '192.168.1.3'        #cobbler服务器地址
next_server: '192.168.1.3'   
manage_dhcp: 1
[/code]
 
2.更改tftp启动方式
# vi /etc/xinetd.d/tftp
[code]
disable = no                #默认开启tftp
[/code]
 
3.编辑dhcp配置模板
# vi /etc/cobbler/dhcp.template 改为相应的网段和ip
subnet 192.168.2.0 netmask 255.255.255.0 {
     option routers             192.168.2.5;
     option domain-name-servers 192.168.2.1;
     option subnet-mask         255.255.255.0;
     range dynamic-bootp        192.168.2.100 192.168.2.254;
     filename                   "/pxelinux.0";
     default-lease-time         21600;
     max-lease-time             43200;
     next-server                $next_server;
}
 
 
五、导入CentOS 光盘映像文件
# mkdir /home/CentOS
# mount /home/src/CentOS-5.2-i386-bin-DVD.iso /home/CentOS/ -o loop
# cobbler import --mirror=/home/CentOS --name=CentOS-5.2
# cobbler sync    应用配置模板
 
 
 
六、cobbler check 根据提示解决问题 
例如:
#2: Must enable selinux boolean to enable Apache and web services components, run: setsebool -P httpd_can_network_connect true
Nice to see that it has good instructions for selinux
#3: you need to set some SELinux content rules to ensure cobbler works correctly in your SELinux environment, run the following: /usr/sbin/semanage fcontext -a -t public_content_t "/var/lib/tftpboot/.*" && /usr/sbin/semanage fcontext -a -t public_content_t "/var/www/cobbler/images/.*"
Detailed command to enable http server to reed content from /var/www/cobbler and have tfpboot find its files
#4: service cobblerd is not running
Obviously this isn't running because we did not start it yet
#5: change 'disable' to 'no' in /etc/xinetd.d/tftp
#6: service httpd is not running
#7: since iptables may be running, ensure 69 (dhcp), 80(http), 25150(cobbler api), and 25151(cobbler api R/W) are unblocked 关闭防火墙
#8: reposync is not installed, need for cobbler reposync, install/upgrade yum-utils?
Easy to solve with:  yum install yum-utils
#9: yumdownloader is not installed, needed for cobbler repo add with --rpm-list parameter, install/upgrade yum-utils? 安装yum-utils
#10: fencing tools were not found, and are required to use the (optional) power management features. install cman to use them 安装cman
七、启动cobbler服务
service dhcpd start
service httpd start
service xinetd restart
service cobbler start
 
 
 
 
 
八、kickstart配置文件实例
# vi /etc/cobbler/sample.ks
 
#platform=x86, AMD64, or Intel EM64T
# System authorization information
auth --useshadow --enablemd5
# System bootloader configuration
bootloader --location=mbr
# Partition clearing information
clearpart --all --initlabel
# Use text mode install
text
# Firewall configuration
firewall --disable
# Run the Setup Agent on first boot
firstboot --enabled
# System keyboard
keyboard us
# System language
lang en_US
# Use network installation
url --url=$tree
# If any cobbler repo definitions were referenced in the kickstart profile, include them here.
$yum_repo_stanza
 
# Network information
network --bootproto=dhcp --device=eth0 --onboot=on
# Reboot after installation
reboot
 
#Root password
rootpw --iscrypted $1$65XOJkdK$SA2J.kVLiTZ6V1GAhFl/Z1
# SELinux configuration
selinux --disabled
# Do not configure the X Window System
skipx
# System timezone
timezone Asia/Shanghai
# Install OS instead of upgrade
install
# Clear the Master Boot Record
zerombr
 
# Magically figure out how to partition this thing
#SNIPPET::main_partition_select
part / --asprimary --bytes-per-inode=4096 --fstype="ext3" --grow --size=1
part swap --asprimary --bytes-per-inode=4096 --fstype="swap" --size=2048
part /boot --asprimary --bytes-per-inode=4096 --fstype="ext3" --size=100
 
%pre
$kickstart_start
#SNIPPET::pre_partition_select
 
%packages
@server-cfg
@development-tools
@base
@development-libs
@system-tools
@admin-tools
certmaster
func
 
%post
chkconfig NetworkManager off
chkconfig NetworkManagerDispatcher off
chkconfig acpid off
chkconfig anacron off
chkconfig atd off
chkconfig autofs off
chkconfig avahi-daemon off
chkconfig avahi-dnsconfd off
chkconfig bluetooth off
chkconfig conman off
chkconfig cups off
chkconfig dhcdbd off
chkconfig dund off
chkconfig firstboot off
chkconfig funcd on
chkconfig gpm off
chkconfig haldaemon off
chkconfig hidd off
chkconfig httpd off
chkconfig ibmasm off
chkconfig ip6tables off
chkconfig ipmi off
chkconfig iptables off
chkconfig irda off
chkconfig irqbalance off
chkconfig kdump off
chkconfig kudzu off
chkconfig lvm2-monitor off
chkconfig mcstrans off
chkconfig mdmpd off
chkconfig microcode_ctl off
chkconfig multipathd off
chkconfig netconsole off
chkconfig netfs off
chkconfig netplugd off
chkconfig nfs off
chkconfig nfslock off
chkconfig nscd off
chkconfig ntpd off
chkconfig oddjobd off
chkconfig pand off
chkconfig pcscd off
chkconfig portmap off
chkconfig psacct off
chkconfig rdisc off
chkconfig restorecond off
chkconfig rpcgssd off
chkconfig rpcidmapd off
chkconfig rpcsvcgssd off
chkconfig saslauthd off
chkconfig sendmail off
chkconfig setroubleshoot off
chkconfig winbind off
chkconfig wpa_supplicant off
chkconfig xfs off
chkconfig ypbind off
chkconfig yum-updatesd off
 
chkconfig certmaster on
chkconfig funcd on
 
cat >> EOFM > /etc/func/minion.conf
[main]
log_level = INFO
acl_dir = /etc/func/minion-acl.d
EOFM
 
cat >> EOCM > /etc/certmaster/minion.conf
[main]
certmaster = node3.le8le.com
log_level = DEBUG
cert_dir = /etc/pki/certmaster
EOCM
 
cat >> EODM > /etc/hosts
192.168.1.3 node3.le8le.com
EODM
 
$yum_config_stanza
SNIPPET::post_install_kernel_options
$kickstart_done
[/code]
 
九、利用cobbler重装系统
# rpm -Uhv koan-1.2.5-1.el5.noarch.rpm
# koan -server=192.168.1.3 -list-profiles
# koan -replace-self -server=192.168.1.3 -profile=CentOS_5.2-i386
# reboot

Linux装机利器Cobbler安装配置的更多相关文章

  1. Linux下Kafka单机安装配置方法(图文)

    Kafka是一个分布式的.可分区的.可复制的消息系统.它提供了普通消息系统的功能,但具有自己独特的设计.这个独特的设计是什么样的呢 介绍 Kafka是一个分布式的.可分区的.可复制的消息系统.它提供了 ...

  2. 【Oracle RAC】Linux系统Oracle11gR2 RAC安装配置详细过程V3.1(图文并茂)

    [Oracle RAC]Linux系统Oracle11gR2 RAC安装配置详细过程V3.1(图文并茂) 2 Oracle11gR2 RAC数据库安装准备工作2.1 安装环境介绍2.2 数据库安装软件 ...

  3. 【Oracle RAC】Linux系统Oracle12c RAC安装配置详细记录过程V2.0(图文并茂)

    [Oracle RAC]Linux系统Oracle12c RAC安装配置详细过程V2.0(图文并茂) 2 Oracle12c RAC数据库安装准备工作2.1 安装环境介绍2.2 数据库安装软件下载3 ...

  4. Linux(Manjaro) - Docker - MySQL 安装配置

    Linux(Manjaro) - Docker - MySQL 安装配置 拉取mysql镜像 # 使用网易的 MySQL 镜像地址 docker pull hub.c.163.com/library/ ...

  5. Linux下Kafka单机安装配置方法

    Kafka是一个分布式的.可分区的.可复制的消息系统.它提供了普通消息系统的功能,但具有自己独特的设计.这个独特的设计是什么样的呢? 首先让我们看几个基本的消息系统术语: •Kafka将消息以topi ...

  6. Linux基础环境_安装配置教程(CentOS7.2 64、JDK1.8、Tomcat8)

    Linux基础环境_安装配置教程 (CentOS7.2 64.JDK1.8.Tomcat8) 安装包版本 1)     VMawre-workstation版本包 地址: https://my.vmw ...

  7. Linux环境CentOS6.9安装配置Elasticsearch6.2.2最全详细教程

    Linux环境CentOS6.9安装配置Elasticsearch6.2.2最全详细教程 前言 第一步:下载Elasticsearch6.2.2 第二步:创建应用程序目录 第四步:创建Elastics ...

  8. Linux 下编译并安装配置 Qt 4.53全过程

    最近准备做 Nokia 的 Symbian,Maemo 下触摸屏开发.考虑到程序的跨平台可移植性,最终选择使用 Qt 开发.相对来说,国内关于 Qt 相关文档并不算很多.作者将 Linux 下编译并安 ...

  9. 【Oracle RAC】Linux系统Oracle18c RAC安装配置详细记录过程(图文并茂)

    本文Oracle 18c GI/RAC on Oracle Linux step-by-step 的安装配置步骤,同时也包含dbca 创建数据库的过程. 1. 关闭SELINUX,防火墙vi /etc ...

随机推荐

  1. jquery-numberformatter插件

    项目地址:https://code.google.com/p/jquery-numberformatter/ 非jquery版:https://github.com/andrewgp/jsNumber ...

  2. 简单Profibus/DP实验系统的组建

    转自:http://www.dndev.com/Profibus/profibustr/system_4.html 引言: 为了让更多刚接触到Profibus系统的朋友能对Profibus的网络架构及 ...

  3. Effective Modern C++翻译(5)-条款4:了解如何观察推导出的类型

    条款4:了解如何观察推导出的类型 那些想要知道编译器推导出的类型的人通常分为两种,第一种是实用主义者,他们的动力通常来自于软件产生的问题(例如他们还在调试解决中),他们利用编译器进行寻找,并相信这个能 ...

  4. 如何查看Maven项目的jar包依赖

    问题 十年以前写java项目总会干这么一个事情: 调包. java项目往往依赖了很多第三方jar包,而这些jar包又有他自己依赖的第三方jar包,从而就能形成一个依赖树. 而程序运行要把这些所有的依赖 ...

  5. 高可用集群(crmsh详解)http://www.it165.net/admin/html/201404/2869.html

    crmsh是pacemaker的命令行接口工具,执行help命令,可以查看shell接口所有的一级命令和二级命令,使用cd 可以切换到二级子命令的目录中去,可以执行二级子命令 在集群中的资源有四类:p ...

  6. 第217天:深入理解Angular双向数据绑定的原理

    一.理解angular双向数据绑定 双向绑定是新的前端框架中频繁出现的一个新词汇,也是mvvm的核心原理.angularjs五条核心信念中的数据驱动,便是由双向绑定进行完成. 那么什么是双向绑定,下面 ...

  7. HDU4726——Kia's Calculation——2013 ACM/ICPC Asia Regional Online —— Warmup2

    题目的意思是给你两个数字(多达10^6位) 做加法,但是有一点,没有进位(进位不算,相当于这一位相加后对10取模) 你可以任意排列两个数字中的每一位,但是不能是0开头. 现在题目要求以这种不进位的算法 ...

  8. LeetCode 717. 1-bit and 2-bit Characters

    We have two special characters. The first character can be represented by one bit 0. The second char ...

  9. django中使用FastDFS分布式文件系统接口代码实现文件上传、下载、更新、删除

    运维使用docker部署好之后FastDFS分布式文件系统之后,提供给我接口如下: fastdfs tracker 192.168.1.216 192.168.1.217 storage 192.16 ...

  10. P4596 [COCI2011-2012#5] RAZBIBRIGA

    题目描述 四个等长的单词可以放在一起构成一个正方形,两个单词水平放置,两个竖直放置.水平单词只能从左往右读,竖直的单词只能从上往下读.四个角共用一个字母. 图中是由单词HLAD,NIVA,HSIN,D ...