Cobbler

Cobbler部署

cobbler简介

Cobbler是一个免费开源系统安装部署软件,用于自动化网络安装操作系统。Cobbler 集成了 DNS, DHCP, 软件包更新,带外管理以及配置管理,方便操作系统安装自动化。Cobbler 可以支持PXE启动, 操作系统重新安装,以及虚拟化客户机创建,包括Xen, KVM or VMware. Cobbler透过koan程序以支持虚拟化客户机安装。Cobbler可以支持管理复杂网路环境,如建立在链路聚合以太网的桥接环境。

该工具使用python开发,小巧轻便(才15k行python代码),使用简单的命令即可完成PXE网络安装环境的配置,同时还可以管理DHCP、DNS、以及yum仓库、构造系统ISO镜像。

Cobbler支持命令行管理,web界面管理,还提供了API接口,可以方便二次开发使用。Cobbler客户端Koan支持虚拟机安装和操作系统重新安装,使重装系统更便捷

Cobbler特性

1、Cobbler是一个Linux服务器安装的服务,可以通过网络启动(PXE)的方式来快速安装、重装物理服务器和虚拟机,同时还可以管理DHCP,DNS等。
2、Cobbler可以使用命令行方式管理,也提供了基于Web的界面管理工具(cobbler-web),还提供了API接口,可以方便二次开发使用。
3、Cobbler是较早前的kickstart的升级版,优点是比较容易配置,还自带web界面比较易于管理。
4、Cobbler内置了一个轻量级配置管理系统,但它也支持和其它配置管理系统集成,如Puppet。

cobbler集成的服务

  • PXE服务支持
  • DHCP服务管理
  • DNS服务管理
  • 电源管理
  • Kickstart服务支持
  • YUM仓库管理
  • TFTP
  • Apache

cobbler工作原理

在这里插入图片描述
Server端

  • 启动Cobbler服务
  • 进行Cobbler错误检查,执行cobbler check命令
  • 进行配置同步,执行cobbler sync命令
  • 复制相关启动文件到TFTP目录中
  • 启动DHCP服务,提供地址分配
  • DHCP服务分配IP地址
  • TFTP传输启动文件
  • Server端接收安装信息
  • Server端发送ISO镜像与Kickstart文件

Client端

  • 客户端以PXE模式启动
  • 客户端获取IP地址
  • 通过TFTP服务器获取启动文件
  • 进入Cobbler安装选择界面
  • 根据配置信息准备安装系统
  • 加载Kickstart文件
  • 传输系统安装的其它文件
  • 进行安装系统

cobbler服务部署

说明:虚拟机网卡采用NAT模式或者仅主机模式,不要使用桥接模式,因为后面会搭建DHCP服务器,在同一个局域网多个DHCP服务会有冲突。
VMware的NAT模式的dhcp服务也关闭,避免干扰。

cobbler命令帮助

命令说明
cobbler check核对当前设置是否有问题
cobbler list列出所有的cobbler元素
cobbler report列出元素的详细信息
cobbler sync同步配置到数据目录,更改配置最好都执行一下
cobbler reposync同步yum仓库
cobbler distro查看导入的发行版系统信息
cobbler system查看添加的系统信息
cobbler profile查看配置信息
// 关闭防火墙
[root@localhost ~]# systemctl disable --now firewalld
Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

[root@localhost ~]# cat /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these three values:

[root@localhost ~]# reboot
SELINUX=disabled
[root@localhost ~]# getenforce 
Disabled


// 下载epel源
[root@localhost ~]# yum -y install epel-release

// 查看是否有cobbler包
[root@localhost ~]# yum list all | grep cobbler
cobbler.x86_64                           2.8.5-0.3.el7                 epel     
cobbler-web.noarch                       2.8.5-0.3.el7                 epel     

//安装cobbler以及相关的软件
[root@localhost ~]# yum -y install httpd dhcp tftp python-ctypes cobbler  xinetd cobbler-web pykickstart net-tools

//查看服务是否安装
[root@localhost ~]# rpm -qa | grep httpd
httpd-filesystem-2.4.37-40.module_el8.5.0+852+0aafc63b.noarch
centos-logos-httpd-85.8-1.el8.noarch
httpd-2.4.37-40.module_el8.5.0+852+0aafc63b.x86_64
httpd-tools-2.4.37-40.module_el8.5.0+852+0aafc63b.x86_64
[root@localhost ~]# rpm -qa | grep dhcp
dhcp-libs-4.3.6-42.el8.x86_64
dhcp-common-4.3.6-42.el8.noarch
dhcp-client-4.3.6-42.el8.x86_64
[root@localhost ~]# rpm -qa | grep tftp
tftp-server-5.2-24.el8.x86_64


/ 启动服务并设置开机自启
[root@localhost ~]# systemctl enable --now httpd
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.
[root@localhost ~]# systemctl enable --now cobblerd
Created symlink /etc/systemd/system/multi-user.target.wants/cobblerd.service → /usr/lib/systemd/system/cobblerd.service.
[root@localhost ~]# ss -antl
State   Recv-Q  Send-Q    Local Address:Port      Peer Address:Port  Process  
LISTEN  0       128             0.0.0.0:22             0.0.0.0:*              
LISTEN  0       5             127.0.0.1:25151          0.0.0.0:*              
LISTEN  0       128                   *:80                   *:*              
LISTEN  0       128                [::]:22                [::]:*              
LISTEN  0       128                   *:443                  *:*              

// 修改server的ip地址为本机ip
[root@localhost ~]# sed -i 's/^server: 127.0.0.1/server: 192.168.58.110/' /etc/cobbler/settings

// 设置tftp的ip地址为本机ip
[root@localhost ~]# sed -i 's/^next_server: 127.0.0.1/next_server: 192.168.58.110/' /etc/cobbler/settings

//开启tftp
[root@localhost ~]# sed -i '/disable/s/yes/no/g' /etc/xinetd.d/tftp

//生成加密的密码
[root@localhost ~]# openssl passwd -1 -salt "$RANDOM" '147258'
$1$5589$2DKLSK786Ie/i7OjjerJu.    //生成的加密密码

//将新生成的加密密码加入到配置文件
[root@localhost ~]# vim /etc/cobbler/settings 
# and put the output between the "" below.
default_password_crypted: "$1$5589$2DKLSK786Ie/i7OjjerJu."     // 将此处的密码改为刚刚生成的

//启动rsync并设置开机自启
[root@localhost ~]# systemctl enable --now rsyncd
Created symlink from /etc/systemd/system/multi-user.target.wants/rsyncd.service to /usr/lib/systemd/system/rsyncd.service.
[root@localhost ~]# systemctl status rsyncd
● rsyncd.service - fast remote file copy program daemon
   Loaded: loaded (/usr/lib/systemd/system/rsyncd.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2021-10-13 09:45:09 EDT; 15s ago
 Main PID: 11874 (rsync)
   CGroup: /system.slice/rsyncd.service
           └─11874 /usr/bin/rsync --daemon --no-detach

Oct 13 09:12:09 localhost.localdomain systemd[1]: Started fast remote file ...
Oct 13 09:12:09 localhost.localdomain systemd[1]: Starting fast remote file...
Oct 13 09:12:09 localhost.localdomain rsyncd[11874]: rsyncd version 3.1.2 s...
Hint: Some lines were ellipsized, use -l to show in full.

// 重启cobbler
[root@localhost ~]# systemctl restart cobblerd

//通过cobbler check 核对当前设置是否有问题
[root@localhost ~]# cobbler check
The following are potential configuration items that you may want to fix:

1 : 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.
2 : debmirror package is not installed, it will be required to manage debian deployments and repositories

Restart cobblerd and then run 'cobbler sync' to apply changes.

// 解决设置报错
[root@localhost ~]# yum -y install fence-agents debmirror yum-utils syslinux
[root@localhost ~]# sed -i  's|@dists=.*|#@dists=|'  /etc/debmirror.conf
[root@localhost ~]# sed -i  's|@arches=.*|#@arches=|'  /etc/debmirror.conf  
[root@localhost loaders]# systemctl restart cobblerd

//在centos8上传过来
[root@localhost ~]# ls /var/lib/cobbler/loaders/
menu.c32  pxelinux.0
[root@localhost ~]# rm -rf /var/lib/cobbler/loaders/*
[root@localhost ~]# ls /var/lib/cobbler/loaders/
[root@localhost ~]#
[root@localhost cobbler]# scp loaders/* root@192.168.58.110:/var/lib/cobbler/loaders     //从8上传到7上
[root@localhost cobbler]# ls loaders/
COPYING.syslinux  grub-x86_64.efi  menu.c32    README
COPYING.yaboot    grub-x86.efi     pxelinux.0  yaboot

//再次检查
[root@localhost ~]# cobbler check 
The following are potential configuration items that you may want to fix:

1 : 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.
// 忽略报错
Restart cobblerd and then run 'cobbler sync' to apply changes.    

//配置cobbler dhcp
//修改cobbler配置文件,让cobbler控制dhcp
[root@localhost ~]# sed -i '/^manage_dhcp/s/0/1/g' /etc/cobbler/settings
[root@localhost ~]# sed -n '/^manage_dhcp/p' /etc/cobbler/settings
manage_dhcp: 1

//配置dhcp配置文件
[root@localhost ~]# vim /etc/cobbler/dhcp.template
subnet 192.168.58.0 netmask 255.255.255.0 {    //192.168.58.0为本机网段
     option routers             192.168.58.110;    //本机IP
     option domain-name-servers 192.168.58.2;    //本机网段
     option subnet-mask         255.255.255.0;
     range dynamic-bootp        192.168.58.200 192.168.58.254;    //获取的IP范围
     default-lease-time         21600;
     max-lease-time             43200;
     next-server                $next_server;
     class "pxeclients" {
          match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";

//重启服务并同步配置,改完dhcp必须要sync同步配置
[root@localhost ~]# systemctl restart cobblerd
[root@localhost ~]# systemctl status cobblerd
● cobblerd.service - Cobbler Helper Daemon
   Loaded: loaded (/usr/lib/systemd/system/cobblerd.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2021-10-13 10:22:04 EDT; 11s ago
  Process: 12491 ExecStartPost=/usr/bin/touch /usr/share/cobbler/web/cobbler.wsgi (code=exited, status=0/SUCCESS)
 Main PID: 12490 (cobblerd)
   CGroup: /system.slice/cobblerd.service
           └─12490 /usr/bin/python2 -s /usr/bin/cobblerd -F

Oct 13 10:31:04 localhost.localdomain systemd[1]: Starting Cobbler Helper Da...
Oct 13 10:31:04 localhost.localdomain systemd[1]: Started Cobbler Helper Dae...
Hint: Some lines were ellipsized, use -l to show in full.

[root@localhost ~]# cobbler sync   
task started: 2021-10-13_102527_sync
task started (id=Sync, time=Wed Oct 13 10:25:27 2021)
running pre-sync triggers
cleaning trees
removing: /var/lib/tftpboot/grub/images
copying bootloaders
trying hardlink /var/lib/cobbler/loaders/pxelinux.0 -> /var/lib/tftpboot/pxelinux.0
trying hardlink /var/lib/cobbler/loaders/menu.c32 -> /var/lib/tftpboot/menu.c32
trying hardlink /var/lib/cobbler/loaders/yaboot -> /var/lib/tftpboot/yaboot
trying hardlink /usr/share/syslinux/memdisk -> /var/lib/tftpboot/memdisk
trying hardlink /var/lib/cobbler/loaders/grub-x86_64.efi -> /var/lib/tftpboot/grub/grub-x86_64.efi
trying hardlink /var/lib/cobbler/loaders/grub-x86.efi -> /var/lib/tftpboot/grub/grub-x86.efi
copying distros to tftpboot
copying images
generating PXE configuration files
generating PXE menu structure
rendering DHCP files
generating /etc/dhcp/dhcpd.conf
rendering TFTPD files
generating /etc/xinetd.d/tftp
cleaning link caches
running post-sync triggers
running python triggers from /var/lib/cobbler/triggers/sync/post/*
running python trigger cobbler.modules.sync_post_restart_services
running: dhcpd -t -q
received on stdout: 
received on stderr: 
running: service dhcpd restart
received on stdout: 
received on stderr: Redirecting to /bin/systemctl restart dhcpd.service

running shell triggers from /var/lib/cobbler/triggers/sync/post/*
running python triggers from /var/lib/cobbler/triggers/change/*
running python trigger cobbler.modules.manage_genders
running python trigger cobbler.modules.scm_track
running shell triggers from /var/lib/cobbler/triggers/change/*
*** TASK COMPLETE ***

//检查dhcp是否正常
[root@localhost ~]# netstat -anulp|grep dhcp
udp        0      0 0.0.0.0:67              0.0.0.0:*                           12543/dhcpd         

//导入镜像
[root@localhost ~]# mount /dev/sr0 /mnt
mount: /dev/sr0 is write-protected, mounting read-only
[root@localhost ~]# cobbler import --path=/mnt --name=centos-7 --arch=x86_64
task started: 2021-10-13_103035_import
task started (id=Media import, time=Wed Oct 13 10:30:35 2021)
Found a candidate signature: breed=redhat, version=rhel6
Found a candidate signature: breed=redhat, version=rhel7
Found a matching signature: breed=redhat, version=rhel7
Adding distros from path /var/www/cobbler/ks_mirror/centos-7-x86_64:
creating new distro: centos-7-x86_64
trying symlink: /var/www/cobbler/ks_mirror/centos-7-x86_64 -> /var/www/cobbler/links/centos-7-x86_64
creating new profile: centos-7-x86_64
associating repos
checking for rsync repo(s)
checking for rhn repo(s)
checking for yum repo(s)
starting descent into /var/www/cobbler/ks_mirror/centos-7-x86_64 for centos-7-x86_64
processing repo at : /var/www/cobbler/ks_mirror/centos-7-x86_64
need to process repo/comps: /var/www/cobbler/ks_mirror/centos-7-x86_64
looking for /var/www/cobbler/ks_mirror/centos-7-x86_64/repodata/*comps*.xml
Keeping repodata as-is :/var/www/cobbler/ks_mirror/centos-7-x86_64/repodata
*** TASK COMPLETE ***
//说明:
    --path      //镜像路径
    --name      //为安装源定义一个名字
    --arch      //指定安装源平台

//安装源的唯一标示就是根据name参数来定义,本例导入成功后,安装源的唯一标示就是:CentOS-7-x86_64,如果重复,系统会提示导入失败

//查看cobbler镜像列表
[root@localhost ~]# ls /var/www/cobbler/ks_mirror/
centos-7-x86_64  config
[root@localhost ~]# cobbler list
distros:
   centos-7-x86_64

profiles:
   centos-7-x86_64

systems:

repos:

images:

mgmtclasses:

packages:

files:

//创建kickstarts自动安装脚本
[root@localhost ~]# cat /var/lib/cobbler/kickstarts/centos-7-x86_64.ks
auth --enableshadow --passalgo=sha512
bootloader --location=mbr
clearpart --all --initlabel
part /boot --asprimary --fstype="ext4" --size=500
part swap --fstype="swap" --size=4096
part / --fstype="ext4" --grow --size=15000
text
firewall --disabled
firstboot --disable
keyboard us
lang en_US
url --url=http://192.168.58.110/cobbler/ks_mirror/centos-7-x86_64      // 修改为本机IP目录为刚刚生成的导入镜像名
$yum_repo_stanza
reboot

rootpw --iscrypted $6$XQgjEGNI2dmUXINR$Z8QxEF98XSPX8S8ncX0MuN8u5wROh1v7/0MVeq3Z/aYcBGGmc0cu69g.BOxAoTN3sXkYL4nH51uK183pYHu0I1   //复制本机上anaconda-ks.cfg中的

selinux --disabled
skipx
timezone Asia/Shanghai --isUtc --nontp
install
zerombr

%packages    //跟本机上的anaconda-ks.cfg中的一致
@^minimal
@core
chrony
kexec-tools

%end

%addon com_redhat_kdump --enable --reserve-mb='auto'

%end

%anaconda
pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty
pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty
%end

//检查ks文件语法是否有误
[root@localhost ~]# cobbler validateks
task started: 2021-10-13_104225_validateks
task started (id=Kickstart Validation, time=Wed Oct 13 10:42:25 2021)
----------------------------
osversion: rhel7
checking url: http://192.168.58.110/cblr/svc/op/ks/profile/centos-7-x86_64
running: /usr/bin/ksvalidator -v "rhel7" "http://192.168.58.110/cblr/svc/op/ks/profile/centos-7-x86_64"
received on stdout: 
received on stderr: 
*** all kickstarts seem to be ok ***
*** TASK COMPLETE ***

//查看当前cobbler有哪些配置文件
[root@localhost ~]# cobbler profile list
   centos-7-x86_64

//修改profile,将我们新建的ks文件设为默认的kickstarts安装文件
[root@localhost ~]# cobbler profile edit --name centos-7-x86_64 --kickstart=/var/lib/cobbler/kickstarts/centos-7-x86_64.ks
[root@localhost ~]# cobbler profile report
Name                           : centos-7-x86_64
TFTP Boot Files                : {}
Comment                        : 
DHCP Tag                       : default
Distribution                   : centos-7-x86_64
Enable gPXE?                   : 0
Enable PXE Menu?               : 1
Fetchable Files                : {}
Kernel Options                 : {}
Kernel Options (Post Install)  : {}
Kickstart                      : /var/lib/cobbler/kickstarts/centos-7-x86_64.ks
Kickstart Metadata             : {}
Management Classes             : []
Management Parameters          : <<inherit>>
Name Servers                   : []
Name Servers Search Path       : []
Owners                         : ['admin']
Parent Profile                 : 
Internal proxy                 : 
Red Hat Management Key         : <<inherit>>
Red Hat Management Server      : <<inherit>>
Repos                          : []
Server Override                : <<inherit>>
Template Files                 : {}
Virt Auto Boot                 : 1
Virt Bridge                    : xenbr0
Virt CPUs                      : 1
Virt Disk Driver Type          : raw
Virt File Size(GB)             : 5
Virt Path                      : 
Virt RAM (MB)                  : 512
Virt Type                      : kvm

//配置网卡名称为传统网卡名称eth0
[root@localhost ~]# cobbler profile edit --name centos-7-x86_64 --kopts='net.ifnames=0 biosdevname=0'
[root@localhost ~]# cobbler profile report
Name                           : centos-7-x86_64
TFTP Boot Files                : {}
Comment                        : 
DHCP Tag                       : default
Distribution                   : centos-7-x86_64    //仓库名字
Enable gPXE?                   : 0
Enable PXE Menu?               : 1
Fetchable Files                : {}
Kernel Options                 : {'biosdevname': '0', 'net.ifnames': '0'}    //网卡设为传统命名方式
Kernel Options (Post Install)  : {}
Kickstart                      : /var/lib/cobbler/kickstarts/centos-7-x86_64.ks    //使用的kickstarts配置文件的路径,必须为我们新建的ks文件的路径
Kickstart Metadata             : {}
Management Classes             : []
Management Parameters          : <<inherit>>
Name Servers                   : []
Name Servers Search Path       : []
Owners                         : ['admin']
Parent Profile                 : 
Internal proxy                 : 
Red Hat Management Key         : <<inherit>>
Red Hat Management Server      : <<inherit>>
Repos                          : []
Server Override                : <<inherit>>
Template Files                 : {}
Virt Auto Boot                 : 1
Virt Bridge                    : xenbr0
Virt CPUs                      : 1
Virt Disk Driver Type          : raw
Virt File Size(GB)             : 5
Virt Path                      : 
Virt RAM (MB)                  : 512
Virt Type                      : kvm

//同步cobbler
[root@localhost ~]# cobbler sync
task started: 2021-10-13_105021_sync
task started (id=Sync, time=Wed Oct 13 10:50:21 2021)
running pre-sync triggers
cleaning trees
removing: /var/www/cobbler/images/centos-7-x86_64
removing: /var/lib/tftpboot/pxelinux.cfg/default
removing: /var/lib/tftpboot/grub/images
removing: /var/lib/tftpboot/grub/grub-x86_64.efi
removing: /var/lib/tftpboot/grub/grub-x86.efi
removing: /var/lib/tftpboot/grub/efidefault
removing: /var/lib/tftpboot/images/centos-7-x86_64
removing: /var/lib/tftpboot/s390x/profile_list
copying bootloaders
trying hardlink /var/lib/cobbler/loaders/grub-x86_64.efi -> /var/lib/tftpboot/grub/grub-x86_64.efi
trying hardlink /var/lib/cobbler/loaders/grub-x86.efi -> /var/lib/tftpboot/grub/grub-x86.efi
copying distros to tftpboot
copying files for distro: centos-7-x86_64
trying hardlink /var/www/cobbler/ks_mirror/centos-7-x86_64/images/pxeboot/vmlinuz -> /var/lib/tftpboot/images/centos-7-x86_64/vmlinuz
trying hardlink /var/www/cobbler/ks_mirror/centos-7-x86_64/images/pxeboot/initrd.img -> /var/lib/tftpboot/images/centos-7-x86_64/initrd.img
copying images
generating PXE configuration files
generating PXE menu structure
copying files for distro: centos-7-x86_64
trying hardlink /var/www/cobbler/ks_mirror/centos-7-x86_64/images/pxeboot/vmlinuz -> /var/www/cobbler/images/centos-7-x86_64/vmlinuz
trying hardlink /var/www/cobbler/ks_mirror/centos-7-x86_64/images/pxeboot/initrd.img -> /var/www/cobbler/images/centos-7-x86_64/initrd.img
Writing template files for centos-7-x86_64
rendering DHCP files
generating /etc/dhcp/dhcpd.conf
rendering TFTPD files
generating /etc/xinetd.d/tftp
processing boot_files for distro: centos-7-x86_64
cleaning link caches
running post-sync triggers
running python triggers from /var/lib/cobbler/triggers/sync/post/*
running python trigger cobbler.modules.sync_post_restart_services
running: dhcpd -t -q
received on stdout: 
received on stderr: 
running: service dhcpd restart
received on stdout: 
received on stderr: Redirecting to /bin/systemctl restart dhcpd.service

running shell triggers from /var/lib/cobbler/triggers/sync/post/*
running python triggers from /var/lib/cobbler/triggers/change/*
running python trigger cobbler.modules.manage_genders
running python trigger cobbler.modules.scm_track
running shell triggers from /var/lib/cobbler/triggers/change/*
*** TASK COMPLETE ***

// 解决安装时报错
[root@localhost ~]# cp /usr/share/syslinux/pxelinux.0  /var/lib/cobbler/loaders/
cp: overwrite ‘/var/lib/cobbler/loaders/pxelinux.0’? y
[root@localhost ~]# cp /usr/share/syslinux/menu.c32 /var/lib/cobbler/loaders/
cp: overwrite ‘/var/lib/cobbler/loaders/menu.c32’? y

//为避免发生未知问题,先把服务端所有服务重启
[root@localhost ~]# systemctl restart xinetd
[root@localhost ~]# systemctl restart cobblerd
[root@localhost ~]# systemctl restart httpd
[root@localhost ~]# ss -antl
State       Recv-Q Send-Q Local Address:Port               Peer Address:Port              
LISTEN      0      5      127.0.0.1:25151                   *:*                  
LISTEN      0      5           *:873                     *:*                  
LISTEN      0      128         *:22                      *:*                  
LISTEN      0      100    127.0.0.1:25                      *:*                  
LISTEN      0      5          :::873                    :::*                  
LISTEN      0      128        :::80                     :::*                  
LISTEN      0      128        :::22                     :::*                  
LISTEN      0      100       ::1:25                     :::*                  
LISTEN      0      128        :::443                    :::*                  



在这里插入图片描述

自定义安装

cobblerweb界面的用户名和密码默认都为cobbler
在这里插入图片描述
自定义安装contos7如图
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
最后点击左上角的Save 保存
在这里插入图片描述

同步配置并重启相关服务
[root@localhost ~]# cobbler sync
[root@localhost ~]# systemctl restart httpd
[root@localhost ~]# systemctl restart cobblerd
[root@localhost ~]# systemctl restart xinetd

最后开机自动会安装系统
在这里插入图片描述
在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值