此内容没有您所选择的语言版本。
Chapter 11. Cobbler
RHN Satellite features the Cobbler server that allows administrators to centralize their system installation and provisioning infrastructure. Cobbler is an installation server that collects the various methods of performing unattended system installations, whether it be server, workstation, or guest systems in a full or para-virtualized setup.
Cobbler has several tools to assist in pre-installation guidance, kickstart file management, installation environment management, and more. Features of Cobbler include:
- Installation environment analysis using the
cobbler check
command - Multi-site installation server configuration with
cobbler replicate
- Kickstart template creation and management using the Cheetah template engine and Kickstart Snippets
- Virtual machine guest installation automation with the
koan
client-side tool.
11.1. Cobbler Requirements 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
To use Cobbler as a PXE boot server, you should check the following guidelines:
- If you plan to use Cobbler to install systems using PXE, you must have
tftp-server
installed and configured. - If you plan to use Cobbler to PXE boot systems for installation, you must have either the ability to act as a DHCP server for Cobbler PXE booting or access to your network DHCP server
/etc/dhcp.conf
to changenext-server
to the hostname or IP address of your Cobbler server.
11.1.1. Configuring Cobbler with /etc/cobbler/settings 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
Cobbler configuration is mainly done within the
/etc/cobbler/settings
file. The file contains several configurable settings, and offers detailed explanations for each setting regarding how it affects the functionality of Cobbler and whether it is recommended for users to change the setting for their environment.
Most of the settings can be left default and Cobbler will run as intended. For more information about configuring Cobbler settings, consult the
/etc/cobbler/settings
file, which documents each setting in detail.
11.1.2. Cobbler and DHCP 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
Cobbler supports bare-metal kickstart installation of systems configured to perform network boots using a PXE boot server. To properly implement a Cobbler installation server, administrators need to either have administrative access to the network's DHCP server or implement DHCP on the Cobbler server itself.
11.1.2.1. Configuring an Existing DHCP Server 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
If you have a DHCP server deployed on another system on the network, you will need administrative access to the DHCP server in order to to edit the DHCP configuration file so that it points to the Cobbler server and PXE boot image.
As root on the DHCP server, edit the /etc/dhcpd.conf file and append a new class with options for performing PXE boot installation. For example:
Following each action step-by-step in the above example:
- The administrator enables network booting with the
bootp
protocol. - Then, the administrator creates a class called
PXE
, which, if a system that is configured to have PXE first in its boot priority, identifies itself asPXEClient
. - Then DHCP server then directs the system to the Cobbler server at 192.168.2.1.
- Finally, the DHCP server retrieves the
pxelinux.0
bootloader file.
11.1.3. Xinetd and TFTP 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
Xinetd is a daemon that manages a suite of services, including TFTP, the FTP server used for transferring the boot image to a PXE client.
To configure TFTP, you must first enable the service via Xinetd. To do this, edit the
/etc/xinetd.d/tftp
as root and change the disable = yes
line to disable = no
.
Before TFTP can start serving the
pxelinux.0
boot image, you must start the Xinetd service.
chkconfig --level 345 xinetd on /sbin/service xinetd start
chkconfig --level 345 xinetd on
/sbin/service xinetd start
The
chkconfig
command turns on the xinetd
service for all user runlevels, while the /sbin/service
command turns on xinetd
immediately.
Red Hat Enterprise Linux is installed with SELinux support in addition to secure firewall enabled by default. To properly configure a Red Hat Enterprise Linux server to use Cobbler, you must first configure these system and network safeguards to allow connections to and from the Cobbler Server.
11.1.4.1. SELinux Configuration 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
To enable SELinux for Cobbler support, you must set the SELinux boolean to allow HTTPD web service components. Run the following command as root on the Cobbler server:
setsebool -P httpd_can_network_connect true
setsebool -P httpd_can_network_connect true
The
-P
switch is essential, as it enables HTTPD connection persistently across all system reboots.
11.1.4.2. IPTables Configuration 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
Once you have configured SELinux, you must then configure IPTables to allow incoming and outgoing network traffic on the Cobbler server.
If you have an existing firewall ruleset using IPTables, you need to add the following rules to open the requisite Cobbler-related ports. The following lists each of the requisite rules with their associated service.
- For TFTP:
/sbin/iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 69 -j ACCEPT /sbin/iptables -A INPUT -m state --state NEW -m udp -p udp --dport 69 -j ACCEPT
/sbin/iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 69 -j ACCEPT /sbin/iptables -A INPUT -m state --state NEW -m udp -p udp --dport 69 -j ACCEPT
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - For HTTPD:
/sbin/iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT /sbin/iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
/sbin/iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT /sbin/iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - For Cobbler and Koan XMLRPC:
/sbin/iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 25151 -j ACCEPT
/sbin/iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 25151 -j ACCEPT
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Once those firewall rules are entered, be sure to save the firewall configuration:
/sbin/iptables-save
/sbin/iptables-save
11.1.5. Syncing and Starting the Cobbler Service 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
Once all the prerequisites specified in
cobbler check
are configured to your needs, you can now start the Cobbler service.
Start the Satellite server with the following command:
/usr/sbin/rhn-satellite start
/usr/sbin/rhn-satellite start
Warning
Do not start or stop the
cobblerd
service independent of the Satellite service, as doing so may cause errors and other issues.
Always use
/usr/sbin/rhn-satellite
to start or stop RHN Satellite.