Cobbler自动化部署系统

[toc]

1.实验环境说明

  • 环境:宿主机系统 win10 + VMware workstations 12 pro
  • 系统:centos7.2 x86_64
  • 网络: 网卡1 IP:192.168.78.3 网卡2 IP:192.168.2.1

2.安装cobbler等服务

2.1.安装yum epel源

1
2
3
4
5
6
[root@linux-cobbler ~]# rpm -ivh http://mirrors.aliyun.com/epel/epel-release-latest-7.noarch.rpm
Retrieving http://mirrors.aliyun.com/epel/epel-release-latest-7.noarch.rpm
warning: /var/tmp/rpm-tmp.3pVqDf: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:epel-release-7-9 ################################# [100%]

2.2.安装cobbler等服务

1
[root@linux-cobbler ~]# yum install -y httpd dhcp tftp cobbler cobbler-web pykickstart

3.cobbler等配置介绍和设置

3.1.配置介绍

  • Apache httpd 配置
    1
    2
    3
    4
    5
    6
    7
    8
    9
    [root@linux-cobbler ~]# ll /etc/httpd/conf.d
    total 36
    -rw-r--r-- 1 root root 2926 Nov 15 02:04 autoindex.conf
    -rw-r--r-- 1 root root 1087 Jul 22 2016 cobbler.conf
    -rw-r--r-- 1 root root 1165 Jul 22 2016 cobbler_web.conf
    -rw-r--r-- 1 root root 366 Nov 15 02:05 README
    -rw-r--r-- 1 root root 9438 Nov 15 00:53 ssl.conf
    -rw-r--r-- 1 root root 1252 Nov 15 00:53 userdir.conf
    -rw-r--r-- 1 root root 824 Nov 15 00:53 welcome.conf

cobbler httpd 配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
[root@linux-cobbler ~]# cat /etc/httpd/conf.d/cobbler.conf 
# This configuration file allows cobbler data
# to be accessed over HTTP.

AliasMatch ^/cblr(?!/svc/)(.*)?$ "/var/www/cobbler$1"
AliasMatch ^/cobbler_track(.*)?$ "/var/www/cobbler$1"
#AliasMatch ^/cobbler(.*)?$ "/var/www/cobbler$1"
Alias /cobbler /var/www/cobbler
Alias /cobbler_webui_content /var/www/cobbler_webui_content

WSGIScriptAliasMatch ^/cblr/svc/([^/]*) /var/www/cobbler/svc/services.py

<Directory "/var/www/cobbler">
SetEnv VIRTUALENV
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
</Directory>

ProxyRequests off

ProxyPass /cobbler_api http://localhost:25151/ # cobbler 代理
ProxyPassReverse /cobbler_api http://localhost:25151/

BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On

# the webui is now part of the "cobbler-web" package
# and is visited at http://.../cobbler_web not this URL.
# this is only a pointer to the new page.

<Directory "/var/www/cobbler/web/">
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
</Directory>

<IfVersion >= 2.4>
<Location /cblr>
Require all granted
</Location>
</IfVersion>
[root@linux-cobbler ~]#

启动服务

1
2
3
[root@linux-cobbler ~]# systemctl start httpd
[root@linux-cobbler ~]# systemctl start cobblerd
[root@linux-cobbler ~]#

想要使用 cobbler 都要配置些什么?可以使用 cobbler check 命令查看

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
[root@linux-cobbler ~]# cobbler check
The following are potential configuration items that you may want to fix:

1 : The 'server' field in /etc/cobbler/settings must be set to something other than localhost, or kickstarting
features will not work. This should be a resolvable hostname or IP for the boot server as reachable
by all machines that will use it.
2 : For PXE to be functional, the 'next_server' field in /etc/cobbler/settings must be 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 are missing from /var/lib/cobbler/loaders, you may run 'cobbler
get-loaders' to download them, or, if you only want to handle x86/x86_64 netbooting, you may ensure
that you have installed a *recent* version of the syslinux package installed and can ignore this
message entirely. Files in this 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
way to resolve these requirements.
5 : enable and start rsyncd.service with systemctl
6 : debmirror package is not installed, it will be required to manage debian deployments and repositories
7 : The default password used by the sample templates for newly installed machines (default_passwo
rd_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
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 one9 : fencing tools were not found,
and are required to use the (optional) power management features. install cma
n or fence-agents to use them
Restart cobblerd and then run 'cobbler sync' to apply changes.
[root@linux-cobbler ~]#

3.2.配置cobbler设置

一个个来配置一下:

  • 第 1、2 个是指定服务器IP

    1
    2
    3
    [root@linux-cobbler ~]# vim /etc/cobbler/settings
    next_server: 192.168.2.1 # 272 行,或者直接搜索 next_server
    server: 192.168.2.1 # 384 行,或者直接搜索 server
  • 第 3 个

    1
    2
    [root@linux-cobbler ~]# vim /etc/xinetd.d/tftp     # 将里面 disable 的值改为 no
    disable = no
  • 第 4 个
    因为第一步设置了网卡为

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    [root@linux-cobbler ~]# cobbler get-loader
    task started: 2017-02-07_015408_get_loaders
    task started (id=Download Bootloader Content, time=Tue Feb 7 01:54:08 2017)
    downloading http://cobbler.github.io/loaders/README to /var/lib/cobbler/loaders/README
    downloading http://cobbler.github.io/loaders/COPYING.elilo to /var/lib/cobbler/loaders/COPYING.eli
    downloading http://cobbler.github.io/loaders/COPYING.yaboot to /var/lib/cobbler/loaders/COPYING.ya
    downloading http://cobbler.github.io/loaders/COPYING.syslinux to /var/lib/cobbler/loaders/COPYING.
    downloading http://cobbler.github.io/loaders/elilo-3.8-ia64.efi to /var/lib/cobbler/loaders/elilo-
    downloading http://cobbler.github.io/loaders/yaboot-1.3.17 to /var/lib/cobbler/loaders/yaboot
    downloading http://cobbler.github.io/loaders/pxelinux.0-3.86 to /var/lib/cobbler/loaders/pxelinux.
    downloading http://cobbler.github.io/loaders/menu.c32-3.86 to /var/lib/cobbler/loaders/menu.c32
    downloading http://cobbler.github.io/loaders/grub-0.97-x86.efi to /var/lib/cobbler/loaders/grub-x8
    downloading http://cobbler.github.io/loaders/grub-0.97-x86_64.efi to /var/lib/cobbler/loaders/grub
    *** TASK COMPLETE ***

注意:请确保第 1 步设置的 IP 那个网卡正常启用。不然这里会执行失败

  • 第 5 个

    1
    [root@linux-cobbler ~]# systemctl start rsyncd     # 启动 rsyncd
  • 6.deb 源,debian、Ubuntu 系统可能配置。这里是centos,先不管

  • 7.配置默认密码

    1
    2
    3
    4
    [root@linux-cobbler ~]# openssl passwd -1 -salt 'cobbler' 'cobbler'
    $1$cobbler$M6SE55xZodWc9.vAKLJs6.
    [root@linux-cobbler ~]# vim /etc/cobbler/settings # 修改 default_password_crypted 的值
    default_password_crypted: "$1$cobbler$M6SE55xZodWc9.vAKLJs6."

再检查一下,看需要配置什么

1
2
3
4
5
6
7
8
[root@linux-cobbler ~]# systemctl restart cobblerd   # 重启一下 cobbler,使修改生效
[root@linux-cobbler ~]# cobbler check
The following are potential configuration items that you may want to fix:
1 : enable and start rsyncd.service with systemctl
2 : debmirror package is not installed, it will be required to manage debian deployments and repositories
3 : fencing tools were not found, and are required to use the (optional) power management features. install cma
n or fence-agents to use them
Restart cobblerd and then run 'cobbler sync' to apply changes.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# 第 1 个看到需要启动 rsyncd 服务
[root@linux-cobbler ~]# systemctl enable rsyncd
Created symlink from /etc/systemd/system/multi-user.target.wants/rsyncd.service to /usr/lib/systemd/system/rsyn
cd.service.[root@linux-cobbler ~]# systemctl start rsyncd
# 再检查一下
[root@linux-cobbler ~]# cobbler check
The following are potential configuration items that you may want to fix:
1 : debmirror package is not installed, it will be required to manage debian deployments and repositories
2 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them
Restart cobblerd and then run 'cobbler sync' to apply changes.
# 上面两个,一个deb 源,一个是电源管理,由于这里是虚拟机使用,不设置电源管理。

[root@linux-cobbler ~]# systemctl restart cobblerd
[root@linux-cobbler ~]# cobbler sync

3.3.配置cobbler管理DHCP

  • 启用 cobbler 管理 DHCP

    1
    2
    [root@linux-cobbler ~]# vim /etc/cobbler/settings    # 修改下面项,大概在 242 行
    manage_dhcp: 1
  • 修改 cobbler DHCP 模板

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    [root@linux-cobbler ~]# vim /etc/cobbler/dhcp.template
    subnet 192.168.2.0 netmask 255.255.255.0 { # 修改网段
    option routers 192.168.2.1; # 修改
    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; # 修改
    default-lease-time 21600;
    max-lease-time 43200;
    next-server $next_server; # 在 settings 文件里指定了
    class "pxeclients" {
    match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
    if option pxe-system-type = 00:02 {
    filename "ia64/elilo.efi";
    } else if option pxe-system-type = 00:06 {
    filename "grub/grub-x86.efi";
    } else if option pxe-system-type = 00:07 {
    filename "grub/grub-x86_64.efi";
    } else {
    filename "pxelinux.0";
    }
    }
    }
    [root@linux-cobbler ~]# systemctl restart cobblerd # 重新读取配置
    [root@linux-cobbler ~]# cobbler sync # 生成 DHCP 配置等
    [root@linux-cobbler ~]# cat /etc/dhcp/dhcpd.conf # 查看生成的配置,这里不贴出了

3.4.导入镜像

1
2
3
4
5
6
7
8
9
10
[root@linux-cobbler ~]# mount /dev/cdrom /mnt    #挂载镜像
mount: /dev/sr0 is write-protected, mounting read-only

# 导入镜像,path 指定导入来源,name 指定该镜像的名称,arch 指定架构
[root@linux-cobbler ~]# cobbler import --path=/mnt/ --name=CentOS-7-x86_64 --arch=x86_64
# 再导入一个镜像,这样在安装的时候,就可以进行选择了
[root@linux-cobbler ~]# cobbler import --path=/mnt/ --name=CentOS-6-x86_64 --arch=x86_64
[root@linux-cobbler ~]# ls /var/www/cobbler/ks_mirror/ # 镜像导入到这里了
CentOS-6-x86_64 CentOS-7-x86_64 config
[root@linux-cobbler ~]#

3.5.自定义kickstart配置并上传

本次实验自定义 ks文件为: CentOS-6-x86_64.cfg CentOS-7-x86_64.cfg,文件内容在文章末尾。

  • 上传 ks 配置文件

    1
    2
    3
    4
    [root@linux-cobbler ~]# cd /var/lib/cobbler/kickstarts/
    [root@linux-cobbler kickstarts]# rz
    [root@linux-cobbler kickstarts]# ls Cent*
    CentOS-6-x86_64.cfg CentOS-7-x86_64.cfg
  • cobbler profile 命令,指定 ks 文件

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    [root@linux-cobbler kickstarts]# cobbler profile        # 看看支持什么命令
    usage
    =====
    cobbler profile add
    cobbler profile copy
    cobbler profile dumpvars
    cobbler profile edit
    cobbler profile find
    cobbler profile getks
    cobbler profile list
    cobbler profile remove
    cobbler profile rename
    cobbler profile report
    [root@linux-cobbler kickstarts]# cobbler profile list # list 列出当前有几个 profile 配置
    CentOS-6-x86_64
    CentOS-7-x86_64
    [root@linux-cobbler kickstarts]#
  • 查看默认 ks 配置文件

    1
    2
    3
    4
    5
    6
    [root@linux-cobbler kickstarts]# cobbler profile report |grep Kickstart 
    Kickstart : /var/lib/cobbler/kickstarts/sample_end.ks
    Kickstart Metadata : {}
    Kickstart : /var/lib/cobbler/kickstarts/sample_end.ks
    Kickstart Metadata : {}
    [root@linux-cobbler kickstarts]#
  • 指定 ks 配置文件

    1
    2
    3
    [root@linux-cobbler ~]# cobbler profile edit --name=CentOS-7-x86_64 --kickstart=/var/lib/cobbler/kickstarts/CentOS-7-x86_64.cfg
    [root@linux-cobbler ~]# cobbler profile edit --name=CentOS-6-x86_64 --kickstart=/var/lib/cobbler/kickstarts/CentOS-6-x86_64.cfg
    [root@linux-cobbler ~]#
  • 修改内核参数
    CentOS-7 网卡名字默认生成的不是 eth0 这样的了。下面配置一下,使得网卡名称继续使用 eth0这种命名方式。

    1
    [root@linux-cobbler ~]# cobbler profile edit --name=CentOS-7-x86_64 --kopts='net.ifnames=0 biosdevname=0'
  • 重新生成配置,使得修改生效

    1
    [root@linux-cobbler ~]# cobbler sync

最好重启一下服务,还有确保几个服务都运行了:

1
2
3
4
5
[root@linux-cobbler ~]# systemctl restart dhcpd
[root@linux-cobbler ~]# systemctl restart cobblerd
[root@linux-cobbler ~]# systemctl restart tftp
[root@linux-cobbler ~]# systemctl restart rsyncd
[root@linux-cobbler ~]# systemctl restart httpd

设置服务开机启动:

1
2
3
4
5
[root@linux-cobbler ~]# systemctl enable dhcpd
[root@linux-cobbler ~]# systemctl enable cobblerd
[root@linux-cobbler ~]# systemctl enable tftp
[root@linux-cobbler ~]# systemctl enable rsyncd
[root@linux-cobbler ~]# systemctl enable httpd

我发现添加了开机启动,重启系统后dhcpd tftp还是没有起来。所以,在进行自动安装前,务必检查一下服务是否都正常运行了。

4.安装系统

新建一个虚拟机,并设置网卡为自定义 VMNet4,与 cobbler eht1 一致。
启动,选择一个系统进行安装,回车即可开始安装。

3.png

OK,到此 cobbler 自动化安装系统实验完成

注:kickstart 配置文件

  • CentOS-6-x86_64.cfg

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    #Kickstart Configurator for cobbler by Jason Zhao
    #platform=x86, AMD64, or Intel EM64T
    key --skip
    #System language
    lang en_US
    #System keyboard
    keyboard us
    #Sytem timezone
    timezone Asia/Shanghai
    #Root password
    rootpw --iscrypted $default_password_crypted
    #Use text mode install
    text
    #Install OS instead of upgrade
    install
    #Use NFS installation Media
    url --url=$tree
    #System bootloader configuration
    bootloader --location=mbr
    #Clear the Master Boot Record
    zerombr yes
    #Partition clearing information
    clearpart --all --initlabel
    #Disk partitioning information
    part /boot --fstype ext4 --size 1024 --ondisk sda
    part swap --size 2048 --ondisk sda # 生产环境物理机,可以给16384,即16G。
    part / --fstype ext4 --size 1 --grow --ondisk sda
    #System authorization infomation
    auth --useshadow --enablemd5
    #Network information
    $SNIPPET('network_config')
    #network --bootproto=dhcp --device=em1 --onboot=on
    #Reboot after installation
    reboot
    #Firewall configuration
    firewall --disabled
    #SELinux configuration
    selinux --disabled
    #Do not configure XWindows
    skipx
    #Package install information
    %packages
    @ base
    @ chinese-support
    @ core
    sysstat
    iptraf
    ntp
    e2fsprogs-devel
    keyutils-libs-devel
    krb5-devel
    libselinux-devel
    libsepol-devel
    lrzsz
    ncurses-devel
    openssl-devel
    zlib-devel
    OpenIPMI-tools
    mysql
    lockdev
    minicom
    nmap

    %post
    #/bin/sed -i 's/#Protocol 2,1/Protocol 2/' /etc/ssh/sshd_config
    /bin/sed -i 's/^ca::ctrlaltdel:/#ca::ctrlaltdel:/' /etc/inittab
    /sbin/chkconfig --level 3 diskdump off
    /sbin/chkconfig --level 3 dc_server off
    /sbin/chkconfig --level 3 nscd off
    /sbin/chkconfig --level 3 netfs off
    /sbin/chkconfig --level 3 psacct off
    /sbin/chkconfig --level 3 mdmpd off
    /sbin/chkconfig --level 3 netdump off
    /sbin/chkconfig --level 3 readahead off
    /sbin/chkconfig --level 3 wpa_supplicant off
    /sbin/chkconfig --level 3 mdmonitor off
    /sbin/chkconfig --level 3 microcode_ctl off
    /sbin/chkconfig --level 3 xfs off
    /sbin/chkconfig --level 3 lvm2-monitor off
    /sbin/chkconfig --level 3 iptables off
    /sbin/chkconfig --level 3 nfs off
    /sbin/chkconfig --level 3 ipmi off
    /sbin/chkconfig --level 3 autofs off
    /sbin/chkconfig --level 3 iiim off
    /sbin/chkconfig --level 3 cups off
    /sbin/chkconfig --level 3 openibd off
    /sbin/chkconfig --level 3 saslauthd off
    /sbin/chkconfig --level 3 ypbind off
    /sbin/chkconfig --level 3 auditd off
    /sbin/chkconfig --level 3 rdisc off
    /sbin/chkconfig --level 3 tog-pegasus off
    /sbin/chkconfig --level 3 rpcgssd off
    /sbin/chkconfig --level 3 kudzu off
    /sbin/chkconfig --level 3 gpm off
    /sbin/chkconfig --level 3 arptables_jf off
    /sbin/chkconfig --level 3 dc_client off
    /sbin/chkconfig --level 3 lm_sensors off
    /sbin/chkconfig --level 3 apmd off
    /sbin/chkconfig --level 3 sysstat off
    /sbin/chkconfig --level 3 cpuspeed off
    /sbin/chkconfig --level 3 rpcidmapd off
    /sbin/chkconfig --level 3 rawdevices off
    /sbin/chkconfig --level 3 rhnsd off
    /sbin/chkconfig --level 3 nfslock off
    /sbin/chkconfig --level 3 winbind off
    /sbin/chkconfig --level 3 bluetooth off
    /sbin/chkconfig --level 3 isdn off
    /sbin/chkconfig --level 3 portmap off
    /sbin/chkconfig --level 3 anacron off
    /sbin/chkconfig --level 3 irda off
    /sbin/chkconfig --level 3 NetworkManager off
    /sbin/chkconfig --level 3 acpid off
    /sbin/chkconfig --level 3 pcmcia off
    /sbin/chkconfig --level 3 atd off
    /sbin/chkconfig --level 3 sendmail off
    /sbin/chkconfig --level 3 haldaemon off
    /sbin/chkconfig --level 3 smartd off
    /sbin/chkconfig --level 3 xinetd off
    /sbin/chkconfig --level 3 netplugd off
    /sbin/chkconfig --level 3 readahead_early off
    /sbin/chkconfig --level 3 xinetd off
    /sbin/chkconfig --level 3 ntpd on
    /sbin/chkconfig --level 3 avahi-daemon off
    /sbin/chkconfig --level 3 ip6tables off
    /sbin/chkconfig --level 3 restorecond off
    /sbin/chkconfig --level 3 postfix off
  • CentOS-7-x86_64.cfg

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    # kickstart template for Fedora 8 and later.
    # (includes %end blocks)
    # do not use with earlier distros

    #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 --disable
    # 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
    $SNIPPET('network_config')
    # Reboot after installation
    reboot

    #Root password
    rootpw --iscrypted $default_password_crypted
    # 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
    # Allow anaconda to partition the system as needed
    part /boot --fstype xfs --size 1024 --ondisk sda
    part swap --size 2048 --ondisk sda
    part / --fstype xfs --size 1 --grow --ondisk sda
    #Do not configure XWindows
    skipx
    #Package install information
    %pre
    $SNIPPET('log_ks_pre')
    $SNIPPET('kickstart_start')
    $SNIPPET('pre_install_network_config')
    # Enable installation monitoring
    $SNIPPET('pre_anamon')
    %end

    %packages
    @base
    @core
    @compat-libraries
    @debugging
    @development
    sysstat
    tree
    iptraf
    ntp
    bash-completion
    nmap
    lrzsz
    openssl-devel
    screen
    zlib-devel
    ncurses-devel
    OpenIPMI-tools
    wget
    %end

    %post
    systemctl disable postfix.service

    $yum_config_stanza
    %end
文章目录
  1. 1.实验环境说明
  2. 2.安装cobbler等服务
    1. 2.1.安装yum epel源
    2. 2.2.安装cobbler等服务
  3. 3.cobbler等配置介绍和设置
    1. 3.1.配置介绍
    2. 3.2.配置cobbler设置
    3. 3.3.配置cobbler管理DHCP
    4. 3.4.导入镜像
    5. 3.5.自定义kickstart配置并上传
  4. 4.安装系统