Cobbler Installation on Centos/Redhat 7

Cobbler version:
 2.6.0
Linux version:Centos/Redhat 7.0

Steps

  1. Set SELinux to “permissive” mode (Doc)

  2. EPEL repo configuration:

    sudo rpm -Uvh http://mir01.syntis.net/epel//7/x86_64/e/epel-release-7-5.noarch.rpm
    
  3. Installation

    yum install pykickstart cobbler cobbler-web
    
  4. Activate TFTP

    vim /etc/xinetd.d/tftp
    #   disable = yes                    <- Change this line to "no"
    chkconfig tftp on
    

    Note

    Configuration may be different according to Linux breed

  5. Configure the firewall:

    # For TFTP:
    firewall-cmd --direct --permanent --add-rule ipv4 filter INPUT 0 -p tcp --dport 69 -j ACCEPT
    firewall-cmd --direct --permanent --add-rule ipv4 filter INPUT 0 -p udp --dport 69 -j ACCEPT
    # For HTTP
    firewall-cmd --direct --permanent --add-rule ipv4 filter INPUT 0 -p tcp --dport 80 -j ACCEPT
    firewall-cmd --direct --permanent --add-rule ipv4 filter INPUT 0 -p tcp --dport 443 -j ACCEPT
    # For Cobbler XML-RPC
    firewall-cmd --direct --permanent --add-rule ipv4 filter INPUT 0 -p tcp --dport 25150 -j ACCEPT
    firewall-cmd --direct --permanent --add-rule ipv4 filter INPUT 0 -p tcp --dport 25151 -j ACCEPT
    
    firewall-cmd --reload
    

    Note

    If you want to check these rules are correctly saved:

    firewall-cmd --permanent --direct --get-rules ipv4 filter INPUT
    
  6. (optional) If you want to use command “cobbler replicate”, you have to configure rsync

    $ vi /etc/xinetd.d/rsync
    
    # default: off
    # description: The rsync server is a good addition to an ftp server, as it \
    #      allows crc checksumming etc.
    service rsync
    {
       disable= no # change
       flags= IPv6
       socket_type= stream
       wait= no
       user= root
       server= /usr/bin/rsync
       server_args= --daemon
       log_on_failure+= USERID
    }
    
    $ chkconfig rsync on
    
  7. Cobbler configuration:

    vim /etc/cobbler/settings
    

    Change following lines:

    # manage_rsync: 0   <---- set to 1 to enable Cobbler's RSYNC management features.
    # server: 127.0.0.1 <---- set to the real Cobbler ip address.
    # anamon_enabled: 0 <---- set to 1 to enable Anamon log.
    # next_server: 127.0.0.1 <---- set to the real Cobbler ip address.
    
  8. Start Cobbler service:

    service cobblerd start
    chkconfig cobblerd on
    
    service httpd start
    chkconfig httpd on
    
  9. Download loaders:

    cobbler get-loaders
    
  10. (optional) If you want to change the WEB interface password (cobbler/cobbler):

    openssl passwd -1 -salt 'random-phrase-here' 'your-password-here'
    

    And put the key in /etc/cobbler/settings:

    # default_password_crypted: "$1$company$prqgnhJ6izx5.S9FVItCB/"
    

    Then change the web user interface setting:

    htdigest /etc/cobbler/users.digest "Cobbler" cobbler
    
  11. Sync all:

    cobbler sync
    

Note

You can check your installation with:

cobbler check