Detailed deployment of cobbler installed services in Linux

Source: Internet
Author: User

1.cobbler Introduction
Cobbler is a Linux server-installed service that can be installed quickly through a network boot (PXE), reloading physical services and virtual machines, and managing DHCP, DNS, and so on.
Cobbler can be managed using the command line, also provides a web-based interface management tool (Cobbler_web), and also provides API interfaces that can be used two times for development.
Cobbler is an upgraded version of the earlier kickstart, with the advantage of being relatively easy to configure, and also easy to manage with its own web interface.
Cobbler has built-in a lightweight configuration management system, but it also supports integration with other configuration management systems, such as puppet, and temporarily does not support saltstack.

2.cobbler Integrated Services:
PXE Service Support
DHCP Service Management
DNS service Management (optional BIND,DNSMASQ)
Power Management
Kickstart Service Support
Yum Warehouse Management
TFTP (required at PXE boot)
Apache (provides a kickstart installation source and provides a customized kickstart configuration)

3.cobbler configuration file
Cobbler configuration file directory in/etc/cobbler

/etc/cobbler/settings Cobbler master configuration file
/etc/cobbler/iso ISO template configuration file
/etc/cobbler/pxe PXE template configuration file
/etc/cobbler/power Power configuration file
/etc/cobbler/user.conf Web Service Authorization Profile
/etc/cobbler/users.digest User name password configuration file for Web Access
/etc/cobbler/dhcp.template Configuration templates for DHCP servers
/etc/cobbler/dnsmasq.template Configuration templates for DNS servers
/etc/cobbler/tftpd.template Configuration templates for TFTP services
/etc/cobbler/modules.conf Configuration file for the module

Cobbler Data Catalog

Catalogue function
/var/lib/cobbler/config/ For storing information such as distros,system,profiles profiles
/var/lib/cobbler/triggers/ For storing user-defined cobbler commands
/var/lib/cobbler/kickstart/ Kickstart file is stored by default
/var/lib/cobbler/loaders/ Store various boot programs and mirror directories
/var/lib/cobbler/ks_mirror/ All data for the imported release system
/var/lib/cobbler/images Import the release version of the kernel and INITRD images for remote network boot
/var/www/cobbler/repo_mirror/ Yum Warehouse Storage Directory

Cobbler log files

log file path Description
/var/log/cobbler/installing Client Installation Logs
/var/log/cobbler/cobbler.log Cobbler Log

4.cobbler command Explanation
Cobbler Check//Check the current settings for problems
Cobbler List//list all cobbler elements
Cobbler Report//listing details of elements
Cobbler Sync//sync configuration to Data directory, change configuration is best to perform the next
Cobbler Reposync//sync Yum Warehouse
Cobbler distro//view imported release System Information
Cobbler System//view added systems information
Cobbler Profile//view configuration information

5.cobbler Server-side Deployment (Demo)

Environment IP
Server-side 192.168.209.12
 The server does the following **************************8//shut down the firewall and selinux[[email protected] ~]# Systemctl Disable firewalld[[email protected] ~]# systemctl stop firewalld[[email protected] ~]# Sed-ri ' s/^ ( selinux=). */\1disabled/g '/etc/sysconfig/selinux[[email protected] ~]# setenforce 0//configuration Yum Source [[email  Protected] ~]# cd/etc/yum.repos.d/[[email protected] yum.repos.d]# Curl-o 163.repo http://mirrors.163.com/.help /centos7-base-163.repo[[email protected] yum.repos.d]# sed-i ' s/\ $releasever/7/g ' 163.repo[[email  Protected] yum.repos.d]# sed-i ' s/^enabled=.*/enabled=1/g ' 163.repo [[email protected] ~]# yum install-y epel-rele ase//installing cobbler and related software [[email protected] ~]# yum-y install httpd dhcp tftp python-ctypes cobbler xinetd cobbler-web py Kickstart//Start service and set boot [[email protected] ~]# systemctl start httpd[[email protected] ~]# systemctl Enable Httpd[[email protected] ~]# systemctl start Cobblerd[[email protectED] ~]# Systemctl Enable cobblerd//Modify the server's IP address to native ip[[email protected] ~]# sed-i ' s/^server:127.0.0.1/server:1 72.16.12.128/'/etc/cobbler/settings//Modify TFTP IP address to native ip[[email protected] ~]# sed-i ' S/^NEXT_SERVER:127.0.0.1/ next_server:172.16.1 2.128/'/etc/cobbler/settings//Open tftp[[email protected] ~]# sed-i '/disable/s/yes/no/g '/ ETC/XINETD.D/TFTP//download missing file [[email protected] ~]# cobbler get-loaders//start rsync and set power On self [[email protected] ~] # Systemctl start rsyncd[[email protected] ~]# systemctl enable rsyncd//generate encrypted password [[email protected] ~]# OpenSSL Passwd-1-salt "$RANDOM" ' lanzhiyong123! ' $1$29572$kgcy/dq/5bifjgxm8.yfm///This is the form of password encryption//Add the generated encryption password to the configuration file [[email protected] ~]# vim/etc/cobbler/settings .... default_password_crypted: "$1$29572$kgcy/dq/5bifjgxm8.yfm/"---------------...

..... .......................

Restart cobbler[[email protected] ~]# systemctl restart cobblerd[[email protected] ~]# ss-antlstate Recv-Q Sen                              D-q Local address:port Peer address:port LISTEN 0 128 *:22                  *:* LISTEN 0 127.0.0.1:25 *:*                     LISTEN 0 5 127.0.0.1:25151 *:* LISTEN 0 5                               *:873 *:* LISTEN 0 128::: 80                  :::* LISTEN 0 +::: +:::*     LISTEN 0:: 1:25:::* LISTEN                    0::: 443:::* LISTEN 0 5            ::: 873                  :::*//Check with cobbler check to see if there is a problem with the current settings [[email protected] ~]# cobbler check .... Here are two errors on the Debian system, please ignore//This step reboot [[email protected] ~]# reboot turn off firewall *******************//Check the current settings for problems [[email  Protected] ~]# Cobbler check//Configure cobbler DHCP Modify cobbler configuration file, let cobbler control dhcp[[email protected] ~]# sed-i '/^manage_ Dhcp/s/0/1/g '/etc/cobbler/settings [[email protected] ~]# sed-n '/^manage_dhcp/p '/etc/cobbler/settingsmanage_ dhcp:1//configuration dhcp[[email protected] ~]# vim/etc/cobbler/dhcp.template subnet 192.168.209.0 netmask 255.255.255.0 { Option Routers 192.168.209.12;option domain-name-servers 192.168.209.12;option subnet-mask 255.255.255               .0;range DYNAMIC-BOOTP 192.168.209.100 192.168.1.250;default-lease-time 21600;max-lease-time 43200;next-server $next _server;//Restart the service and synchronize the configuration, the DHCP must be synchronized with Sync configuration [[email protected] ~]# systemctl restart C Obblerd[[email protected] ~]# Cobbler sync//Check DHCP is normal [[email protected] ~]# Netstat-anulp | grep dhcpudp 0 0 0.0.0.0:67 0.0.0.0:*//import Centos7 mirror [[email protected] ~]# mount/dev/cdrom/m Nt/[[email protected] ~]# Cobbler import--path=/mnt--name=centos-7--arch=x86_64//view cobbler Mirror list [[email  Protected] ~]# Cobbler list//Create kickstarts automatic installation script [[email protected] ~]# cat >/var/lib/cobbler/kickstarts/ CENTOS-7-X86_64.KS << ' EOF ' auth--enableshadow--passalgo=sha512bootloader--location=mbrclearpart--all-- Initlabelpart/boot--asprimary--fstype= "Ext4"--size=500part swap--fstype= "swap"--size=4096part/--fstype= "EXT4"-- Grow--size=15000textfirewall--disabledfirstboot--disablekeyboard Uslang en_usurl--url=http://192.168.209.12/ cobbler/ks_mirror/centos-7-x86_64$yum_repo_stanza$snippet (' network_config ') REBOOTROOTPW--iscrypted $6$ Dehzuohrcjmbjzzk$dkallgno50cvbj27yeip5o1m4p3/rwfilgidpkw9iu25q4ki8txmspwh1jub2uw/pk3nlayujtez9ckfclrm81selinux --disabledskipxtimezone Asia/shanghai-I.SUTC--nontpinstallzerombr%packages@^minimal@corekexec-tools%end%addon com_redhat_kdump--enable--reserve-mb= ' Auto '%end%anacondapwpolicy root--minlen=6--minquality=1--notstrict--nochanges--notemptypwpolicy user--minlen=6-- Minquality=1--notstrict--nochanges--emptyokpwpolicy luks--minlen=6--minquality=1--notstrict--nochanges-- notempty%endeof//Check the KS file syntax for errors [[email protected] ~]# cobbler validateks//See what configuration files are currently cobbler [[email  Protected] ~]# Cobbler profile listcentos-7-x86_64//Modify profile to set our new KS file as the default kickstarts installation file [[email protected] ~ ]# Cobbler profile Edit--name centos-7-x86_64--KICKSTART=/VAR/LIB/COBBLER/KICKSTARTS/CENTOS-7-X86_64.KS// Match the NIC name to the traditional NIC name eth0[[email protected] ~]# Cobbler profile edit--name centos-7-x86_64--kopts= ' net.ifnames=0 Biosdevname=0 '//Check current system cobbler profile information [[email protected] ~]# cobbler profiles report//sync cobbler[[email  Protected] ~]# Cobbler sync//server-side all reboots [[email protected] ~]# systemctl restart xinetd//Super Daemon [[email&Nbsp;protected] ~]# systemctl restart cobblerd[[email protected] ~]# systemctl Restart httpd[[email  Protected] ~]# ss-antlstate recv-q send-q Local address:port Peer address:port LIS           TEN 0 *:22 *:* LISTEN 0 100                             127.0.0.1:25 *:* LISTEN 0 5 127.0.0.1:25151 *:* LISTEN 0 5 *:873 *:      * LISTEN 0::: +:::* LISTEN                 0::: $:::* LISTEN 0 100                              :: 1:25:::* LISTEN 0 128::: 443             :::*     LISTEN 0 5::: 873:::* ********************************* Install Guest Client ******************** new virtual machine in virtual machine Select Centos7 installation, other default 1. Do not select Disc 2. Memory Recommendations 2000MB 3. Install the Client

Detailed deployment of cobbler installed services in Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.