The cobbler is installed in the same way as the traditional way, but the relative configuration is simple,
Provides a web interface, but the web is less useful than an OPS engineer.
What I personally prefer is that cobbler can define multiple systems and menus within a set of systems,
It is very practical in large-scale and diverse custom environments.
If you simply install a certain operating system, batch, traditional can be.
The actual production environment does not conflict with DHCP, which is important because DHCP relay is not turned on,
So put it in a new VLAN.
In practice, the server is a static IP, even if the server is restarted and booted from PXE by default from
Local start, so the impact is not big.
server:192.168.1.110
gateway:192.168.1.253
System:centos 6.6 Minimal
Note: I have a problem installing this version on centos6.7, which may be a bug.
To start the installation:
#配置yum源, installation with Epel, basic installation Source No Cobbler
cd/etc/yum.repos.d/
Yum Install-y epel-release
[[email protected] yum.repos.d]# ls
Centos-base.repo Centos-fasttrack.repo Centos-vault.repo Epel-testing.repo
Centos-debuginfo.repo Centos-media.repo Epel.repo
Yum Clean All
Yum install-y Cobbler cobbler-web pykickstart debmirror Cman fence-agents
#pykickstart (check for Kickstart syntax errors)
Service httpd Start
Chkconfig httpd on
Service Cobblerd Start
/etc/init.d/iptables stop
Chkconfig--level iptables off
[Email protected] ~]# Getenforce
Enforcing
Vi/etc/selinux/config
#SELINUX =enforcing
Selinux=disabled
Reboot effective
Cobbler Check #报错, pay attention to check error correction
The following is potential configuration items and that's want to fix:
1:the ' server ' field in/etc/cobbler/settings must is set to something other than localhost, or
Kickstarting features won't work. This should is a resolvable hostname or IP for the boot
Server as reachable by any machines that would use it.
2:for PXE to be functional, the ' next_server ' field in/etc/cobbler/settings must is set to
Something other than 127.0.0.1, and should match the IP of the boot server on the PXE network.
3:change ' disable ' to ' no ' in/etc/xinetd.d/tftp
4:some network boot-loaders is missing from/var/lib/cobbler/loaders, you may run ' cobbler
Get-loaders ' To download them, or, if you are want to handle x86/x86_64 netbooting,
Ensure the installed a *recent* version of the Syslinux package installed and can ignore
This message entirely. Files in the 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 to resolve these requirements.
5:change ' disable ' to ' no ' in/etc/xinetd.d/rsync
6:comment out ' dists ' on/etc/debmirror.conf-proper Debian support
7:comment out ' arches ' on/etc/debmirror.conf-proper Debian support
8: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
One
Restart Cobblerd and then run ' Cobbler Sync ' to apply changes.
#/etc/cobbler/settings Next_server and server are modified to host IP, default 127.0.0.1
next_server:192.168.1.110
server:192.168.1.110
#修改default_password_crypted默认密码, randomly generated passwords
OpenSSL passwd-1-salt ' OpenSSL rand-hex 4 '
Password:
$1$df2d0ac2$f3dfqizkbge6b7nyivb250
default_password_crypted: "$1$df2d0ac2$f3dfqizkbge6b7nyivb250"
Cobbler Get-loaders #需要联网, you can take out pxelinux.0 and MENU.C32 files from the mirror without a net.
TASK Complete * * *
Ls/var/lib/cobbler/loaders #最终会copy到/var/lib/tftpboot/images
Chkconfig rsync on
vi/etc/debmirror.conf #注释掉 @dists = "Sid" and @arches= "i386"
# @dists = "Sid";
@sections = "Main,main/debian-installer,contrib,non-free";
# @arches = "i386";
Cobbler Sync #同步一下数据
Vi/etc/cobbler/settings #manage_dhcp和manage_dns值为0表示管理员管理,
A value of 1 is managed by cobbler, which defaults to 0 and is modified as follows
Manage_dhcp:1
Manage_rsync:1
Manage_tftpd:1
Yum-y Install DHCP
Rpm-q Tftp-server
Tftp-server-0.49-7.el6.x86_64
Cp/usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample/etc/dhcp/dhcpd.conf
Vi/etc/dhcp/dhcpd.conf
Option Domain-name "Cobsrv.test";
Option Domain-name-servers 219.239.26.42, 124.207.160.106;
Subnet 192.168.1.0 netmask 255.255.255.0 {
Range 192.168.1.100 192.168.1.120;
Option routers 192.168.1.253;
}
Next-server 192.168.1.110;
Filename= "pxelinux.0";
#将原来的subnet以 * * * Release or delete
Service DHCPD Restart
Starting dhcpd: [OK]
Service Cobblerd Restart
#插入并挂载光盘, prepare the spanning tree,
mount/dev/cdrom/media/-R
ls/media/#确认下是否挂载成功
Vi/etc/httpd/conf/httpd.conf
ServerName 192.168.1.110:80
Service httpd Restart
Cobbler Sync
Cobbler Check
TFTP didn't start before.
Chkconfig TFTP on
Service xinetd Restart
Cobbler Import--name= "centos-6.6-minimal-x86_64"--path=/media
#复制全部镜像到/var/www/time may be longer
[Email protected] kickstarts]# cd/var/lib/cobbler/kickstarts/
[[email protected] kickstarts]# ls
DEFAULT.KS esxi5-ks.cfg legacy.ks sample_autoyast.xml sample_esx4.ks
SAMPLE_ESXI5.KS Sample_old.seed
Esxi4-ks.cfg install_profiles pxerescue.ks sample_end.ks sample_esxi4.ks sample.ks
Sample.seed
Cobbler distro List
Centos-6.6-minimal-x86_64
Cobbler profile Add--name=centos-6.6-minimal-x86_64--distro=rhel-6.4-x86_64--
Kickstart=/var/lib/cobbler/kickstarts/sample.ks
Cobbler Profile List #profile即启动时选择菜单的内容
Cobbler Sync #每次改动最好都同步一下 to make it effective
Vi/var/lib/tftpboot/pxelinux.cfg/default
Menu already generated
At this point, start a virtual machine, put in a network, select PXE boot can load the normal
Log in using the following Web address
Http://192.168.1.110/cobbler_web
Cobbler/cobbler
I use this time in the VirtualBox machine, the choice is bridged, in order to avoid the impact of no line,
Turn off the no-line DHCP feature, and the VirtualBox NIC selects fast III to support PXE boot.
This article is from the "Heavenly Soul Eternal" blog, please be sure to keep this source http://tianhunyongheng.blog.51cto.com/1446947/1689652
Automated Installation tool Cobbler Easy installation configuration