First, installation
The system environment is centos6.3 and is installed with Yum:
RPM-UVH http://mirrors.hustunique.com/epel/6/x86_64/epel-release-6-8.noarch.rpm
Yum-y Install Cobbler cobbler-web httpd rsync tftp-server xinetd DHCP python-ctypes debmirror pykickstart
Second, the configuration
1. Restart the system after shutting down the firewall and SELinux:
/etc/init.d/iptables Stop #关闭防火墙
Chkconfig iptables off
Sed-i '/selinux=/d '/etc/selinux/config && echo ' selinux=disabled ' >>/etc/selinux/config #关闭SELINUX
2. Modify the Cobbler configuration file:
' next_server:127.0.0.1 ' replaced with ' next_server:172.28.26.188 ' #DHCP服务地址
' server:127.0.0.1 ' replaced with ' server:172.28.26.188 ' #cobbler服务地址
' manage_dhcp:0 ' replaced with ' manage_dhcp:1 ' #cobbler管理dhcp
' manage_rsync:0 ' replaced with ' manage_rsync:1 ' #cobbler管理rsync功能
?
Sed-i ' s/next_server:127.0.0.1/next_server:172.28.26.188/g '/etc/cobbler/settings
Sed-i ' s/server:127.0.0.1/server:172.28.26.188/g '/etc/cobbler/settings
Sed-i ' s/manage_dhcp:0/manage_dhcp:1/g '/etc/cobbler/settings
Sed-i ' s/manage_rsync:0/manage_rsync:1/g '/etc/cobbler/settings
?
To modify the default password for the cobbler user, you can use the following command to generate a password and replace the password in/etc/cobbler/settings with the generated password
OpenSSL passwd-1-salt "Cobber" "123456"
Fill in the/etc/cobbler/settings configuration with the generated password default_password_crypted: The new password generated, this password is the root password after the system is loaded.
?
3. Modify the TFTP service and rsync service configuration:
Sed-i '/disable/c disable = no '/etc/xinetd.d/tftp #设置 ' disable ' for ' no '
Sed-i-E ' s/= yes/= no/g '/etc/xinetd.d/rsync #设置 ' disable ' for ' no '
4. Modify the DHCP Template:
Vim/etc/dhcp/dhcpd.conf
Subnet 192.168.66.0 netmask 255.255.255.0 {
Option routers 192.168.66.87;
Option Domain-name-servers 202.106.0.20;
Option Subnet-mask 255.255.255.0;
Range DYNAMIC-BOOTP 192.168.66.100 192.168.66.102;
Default-lease-time 21600;
Max-lease-time 43200;
Next-server $next _server;
}
?
5. Modify Cobbler-web Configuration
Sed-i ' s/module = Authn_denyall/module = Authn_configfile/g '/etc/cobbler/modules.conf #修改认证
Htdigest/etc/cobbler/users.digest "Cobbler" Cobbler #修改cobbler Web page admin password
6, start the related services
/ETC/INIT.D/HTTPD start
/etc/init.d/xinetd start
/ETC/INIT.D/DHCPD start
/etc/init.d/cobblerd start
Chkconfig--level httpd on
Chkconfig--level xinetd on
Chkconfig--level DHCPD on
Chkconfig--level Cobblerd on
7, the validation cobbler installation conditions:
Service Cobblerd Restart
Cobbler error message when you check the Get-loaders #修复cobbler
Cobbler Check
Third, the introduction of the mirror configuration:
1: Use disc mirroring
Mount ISO image to/mnt directory
Mount-o loop/data/centos_6.4_vm.iso/mnt/
Import the ISO and set it to "x86_64" and name it Centos6.4
Cobbler Import--path=/mnt/--name=centos_6.4--arch=x86_64
?
2: Mount the Linux CD:
mount/dev/cdrom/media/
Cobbler Import--path=/media/centos_6.4_final--name=centos6.4
View Import Results
Cobbler distro List
Synchronize all configurations after completion
Cobbler Sync
At this point, we have access to the Cobbler Web interface:
Four, the system needs to install the machine from the network card boot:
At this point, the Linux system was installed successfully.
Cobbler Installation Deployment