1. Install epel;
[[email protected] apps]# wget http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm[[email protected] apps]# rpm -ivhepel-release-6-8.noarch.rpm
2. Install cobbler services;
[[email protected] apps]# yum install -ycobbler httpd tftp-server xinetd dhcp rsync
3. Start related services and check the configuration;
[[email protected] ~]# chkconfig httpd on[[email protected] ~]# chkconfig cobbleron[[email protected] ~]# chkconfig xinetdon[[email protected] apps]#/etc/init.d/cobblerd restartStopping cobbler daemon: [ OK ]Starting cobbler daemon: [ OK ][[email protected] apps]#/etc/init.d/httpd restartStopping httpd: [ OK ]Starting httpd: httpd:apr_sockaddr_info_get() failed for cobbler-serverhttpd: Could not reliably determine theserver‘s fully qualified domain name, using 127.0.0.1 for ServerName [ OK ]
[[email protected] apps]# cobbler checkThe following are potential configurationitems that you may want to fix: 1 : The ‘server‘ field in /etc/cobbler/settingsmust be set to something other than localhost, or kickstarting features willnot work. This should be a resolvablehostname or IP for the boot server as reachable by all machines that will useit.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 : some network boot-loaders are missingfrom /var/lib/cobbler/loaders, you may run ‘cobbler get-loaders‘ to downloadthem, or, if you only want to handle x86/x86_64 netbooting, you may ensure thatyou have installed a *recent* version of the syslinux package installed and canignore this message entirely. Files inthis directory, should you want to support all architectures, should includepxelinux.0, menu.c32, elilo.efi, and yaboot. The ‘cobbler get-loaders‘ commandis the easiest way to resolve these requirements.4 : change ‘disable‘ to ‘no‘ in/etc/xinetd.d/rsync5 : debmirror package is not installed, itwill be required to manage debian deployments and repositories6 : ksvalidator was not found, installpykickstart7 : The default password used by the sampletemplates 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 one8 : fencing tools were not found, and arerequired to use the (optional) power management features. install cman or fence-agentsto use them Restart cobblerd and then run ‘cobblersync‘ to apply changes.
Based on the above prompts, we will solve the problem one by one:
1) edit the/etc/cobbler/settings file, find the server option, and change it to the actual IP address of the server (about 384 lines ).
384 rver: 10.0.1.7
2) edit the/etc/cobbler/settings file, find the next_server option, and change it to the actual IP address of the server (About 272 lines ).
272 xt_server: 10.0.1.7
3) execute cobblerget-loaders and the system automatically downloads the loader program to complete the restoration.
[[Email protected] apps] # cobblerget-loaders
4) edit/etc/xinetd. d/rsync and change the disable field configuration in the file to yes to No.
[[Email protected] apps] # Vim/etc/xinetd. d/rsync
Service rsync
{
Disable = No
Flags = IPv6
Socket_type = stream
Wait = No
User = root
Server =/usr/bin/rsync
Server_args = -- daemon
Log_on_failure + = userid
}
5) The system prompts that debmirror is not installed. If it is not a Debian system, you can ignore it.
6) The system prompts you to install pykickstart.
[[Email protected] apps] # Yum install-ypykickstart
7) modify the default cobbler password and change the/etc/cobbler/settings file.
[[Email protected] apps] # OpenSSL passwd-1-salt 'random-phrase-Here '123'
$1 $ random-p $ mzxq/sx848sxgvfwjcozm0
[[Email protected] apps] # Vim/etc/cobbler/settings (Row 3)
101 default_password_crypted: "$1 $ random-p $ mzxq/sx848sxgvfwjcozm0"
8) the system prompts you to install CMAN.
[[Email protected] apps] # Yum install-ycman
4. Restart cobbler and check the configuration file.
[[email protected] apps]#/etc/init.d/cobblerd restartStopping cobbler daemon: [ OK ]Starting cobbler daemon: [ OK ][[email protected] apps]# cobbler checkThe following are potential configurationitems that you may want to fix: 1 : debmirror package is not installed, itwill be required to manage debian deployments and repositories Restart cobblerd and then run ‘cobblersync‘ to apply changes.
5. Import the installation file;
[[email protected] apps]# lsCentOS-6.5-x86_64-bin-DVD1.iso epel-release-6-8.noarch.rpm[[email protected] apps]#mount -o loop -tiso9660 CentOS-6.5-x86_64-bin-DVD1.iso /mnt[[email protected] apps]# cobbler import--path=/mnt --name=CentOS-6.5-x86_64-bin-DVD1
6. Configure the DHCP service;
Edit/etc/cobbler/settings to modify 242 Behavior 1 as follows:
[[email protected] apps]# vim/etc/cobbler/settings242 manage_dhcp: 1
Edit/etc/cobbler/DHCP. template to modify the cobbler DHCP management template
[[Email protected] apps] # Vim/etc/cobbler/DHCP. modify the template as follows: Subnet 10.0.1.0 netmask quota 255.255.0 {Option routers 10.0.1.254; optiondomain-name-servers 202.106.0.20; Option subnet-mask quota 255.255.0; range dynamic-BOOTP 10.0.1.100 10.0.1.120; default-lease-time 21600; max-lease-time 43200; next-server $ next_server; [[email protected] apps] #/etc/init. d/xinetd restartstopping xinetd: [OK] Starting xinetd: [OK]
7. Synchronize cobbler configurations;
[[email protected] apps]# cobbler synctask started: 2014-09-03_153036_synctask started (id=Sync, time=Wed Sep 3 15:30:36 2014)running pre-sync triggerscleaning treesremoving:/var/www/cobbler/images/CentOS-6.5-bin-DVD1-x86_64removing:/var/lib/tftpboot/pxelinux.cfg/defaultremoving: /var/lib/tftpboot/grub/imagesremoving:/var/lib/tftpboot/grub/grub-x86_64.efiremoving: /var/lib/tftpboot/grub/efidefaultremoving:/var/lib/tftpboot/grub/grub-x86.efiremoving:/var/lib/tftpboot/images/CentOS-6.5-bin-DVD1-x86_64removing: /var/lib/tftpboot/s390x/profile_listcopying bootloaderstrying hardlink/var/lib/cobbler/loaders/grub-x86_64.efi ->/var/lib/tftpboot/grub/grub-x86_64.efitrying hardlink/var/lib/cobbler/loaders/grub-x86.efi -> /var/lib/tftpboot/grub/grub-x86.eficopying distros to tftpbootcopying files for distro:CentOS-6.5-bin-DVD1-x86_64trying hardlink/var/www/cobbler/ks_mirror/CentOS-6.5-x86_64-bin-DVD1/images/pxeboot/vmlinuz-> /var/lib/tftpboot/images/CentOS-6.5-bin-DVD1-x86_64/vmlinuztrying hardlink/var/www/cobbler/ks_mirror/CentOS-6.5-x86_64-bin-DVD1/images/pxeboot/initrd.img-> /var/lib/tftpboot/images/CentOS-6.5-bin-DVD1-x86_64/initrd.imgcopying imagesgenerating PXE configuration filesgenerating PXE menu structurecopying files for distro: CentOS-6.5-bin-DVD1-x86_64trying hardlink/var/www/cobbler/ks_mirror/CentOS-6.5-x86_64-bin-DVD1/images/pxeboot/vmlinuz-> /var/www/cobbler/images/CentOS-6.5-bin-DVD1-x86_64/vmlinuztrying hardlink/var/www/cobbler/ks_mirror/CentOS-6.5-x86_64-bin-DVD1/images/pxeboot/initrd.img-> /var/www/cobbler/images/CentOS-6.5-bin-DVD1-x86_64/initrd.imgWriting template files forCentOS-6.5-bin-DVD1-x86_64rendering DHCP filesgenerating /etc/dhcp/dhcpd.confrendering TFTPD filesgenerating /etc/xinetd.d/tftpprocessing boot_files for distro:CentOS-6.5-bin-DVD1-x86_64cleaning link cachesrunning post-sync triggersrunning python triggers from/var/lib/cobbler/triggers/sync/post/*running python triggercobbler.modules.sync_post_restart_servicesrunning: dhcpd -t -qreceived on stdout:received on stderr:running: service dhcpd restartreceived on stdout: Starting dhcpd: [ OK ] received on stderr:running shell triggers from/var/lib/cobbler/triggers/sync/post/*running python triggers from/var/lib/cobbler/triggers/change/*running python triggercobbler.modules.scm_trackrunning shell triggers from/var/lib/cobbler/triggers/change/**** TASK COMPLETE ***
The cobbler configuration has been completed and can be tested using a virtual machine.
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/49/46/wKiom1QSVD3iJb-_AADBHhHwPKA114.jpg "Title =" 1.png" alt = "wKiom1QSVD3iJb-_AADBHhHwPKA114.jpg"/>
8. Install cobbler-web;
[[email protected] ~]# yum install -ycobbler-web[[email protected] ~]# /etc/init.d/httpdrestartStopping httpd: [ OK ]Starting httpd: httpd:apr_sockaddr_info_get() failed for cobbler-serverhttpd: Could not reliably determine theserver‘s fully qualified domain name, using 127.0.0.1 for ServerName [ OK ]
Access address: http: // ip/cobbler_web
Username: Cobbler
Password: Cobbler
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/49/47/wKioL1QSVKKiBIr9AAFh_GVHAxA392.jpg "style =" float: none; "Title =" 2.png" alt = "wkiol1qsvkkibir9aafh_gvhaxa392.jpg"/>
Interface after login:
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/49/46/wKiom1QSVNnRo6B-AAIYNJ49-zg420.jpg "Title =" 3.png" alt = "wKiom1QSVNnRo6B-AAIYNJ49-zg420.jpg"/>
This article is from the "Jerry on the road" blog, please be sure to keep this source http://jerry0117.blog.51cto.com/1664014/1551439
Centos + cobbler installation Configuration