CentOS 7安装Cobbler2.6.9自动化部署工具(2)

修改 /etc/cobbler/settings
next_server: 192.168.3.100
server: 192.168.3.100
[root@cobbler ~]# cobbler get-loaders
如果网络不行可以直接去 下载COPYING.elilo  COPYING.syslinux  COPYING.yaboot  elilo-ia64.efi  grub-x86_64.efi  grub-x86.efi  menu.c32  pxelinux.0  README  yaboot这些软件包
[root@cobbler ~]# cobbler get-loaders 
task started: 2015-08-20_215034_get_loaders
task started (id=Download Bootloader Content, time=Thu Aug 20 21:50:34 2015)
downloading to /var/lib/cobbler/loaders/README
[root@cobbler ~]# yum install fence-agents cman
注释/etc/debmirror.conf 中以下两项
#@dists="sid";
#@arches="i386";
[root@cobbler ~]# openssl passwd -1 -salt `openssl rand -hex 4`
Password: 
$1$a6a60411$ltytuO4WzxCYFOJhNFIlh1
[root@cobbler ~]# vim /etc/cobbler/settings 
default_password_crypted: "$1$a6a60411$ltytuO4WzxCYFOJhNFIlh1"

检查是否配置完成
[root@cobbler ~]# cobbler check
No configuration problems found.  All systems go.
安装配置DHCP
[root@cobbler ~]# yum install dhcp
[root@cobbler loaders]# vim /etc/dhcp/dhcpd.conf 
default-lease-time  86400;
max-lease-time  7200;
log-facility local7;
subnet  192.168.3.0 netmask 255.255.255.0 {
 range 192.168.3.105  192.168.3.120;
 option    routers 192.168.3.100;
}
next-server 192.168.3.100;
filename="pxelinux.0";

准备安装yum

[root@cobbler media]# mkdir centos6
[root@cobbler media]# mkdir centos7
[root@cobbler ~]# mount -o loop CentOS-6.6-x86_64-bin-DVD1.iso /media/centos6
[root@cobbler ~]# mount -o loop CentOS-7.0-1406-x86_64-DVD.iso /media/centos7

安装system-config-kickstart 用于编写ks.cfg文件基于系统的anaconda-ks.cfg这个文件是本系统安装中的配置
[root@cobbler ~]# yum install  system-config-kickstart 
[root@cobbler ~]# system-config-kickstart

CentOS 7安装Cobbler2.6.9自动化部署工具

导入系统镜像

[root@cobbler ~]# cobbler import --name="centos6" --path=/media/centos6
[root@cobbler ~]# cobbler distro list
  centos6-x86_64
[root@cobbler cobbler]# cobbler profile add --name=centos6.6 --distro=centos6-x86_64 --kickstart=/var/lib/cobbler/kickstarts/centos6.cfg
[root@cobbler cobbler]# cobbler profile list
  centos6-x86_64
  centos6.6

配置完成后一定要sync
[root@cobbler ~]# cobbler sync
task started: 2015-08-22_011824_sync
task started (id=Sync, time=Sat Aug 22 01:18:24 2015)
running pre-sync triggers
cleaning trees
removing: /var/www/cobbler/images/centos6-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/centos6-x86_64
removing: /var/lib/tftpboot/s390x/profile_list
copying bootloaders
trying hardlink /var/lib/cobbler/loaders/pxelinux.0 -> /var/lib/tftpboot/pxelinux.0
copying: /var/lib/cobbler/loaders/pxelinux.0 -> /var/lib/tftpboot/pxelinux.0
trying hardlink /var/lib/cobbler/loaders/menu.c32 -> /var/lib/tftpboot/menu.c32
copying: /var/lib/cobbler/loaders/menu.c32 -> /var/lib/tftpboot/menu.c32
trying hardlink /var/lib/cobbler/loaders/yaboot -> /var/lib/tftpboot/yaboot
copying: /var/lib/cobbler/loaders/yaboot -> /var/lib/tftpboot/yaboot
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: centos6-x86_64
trying hardlink /var/www/cobbler/ks_mirror/centos6/images/pxeboot/vmlinuz -> /var/lib/tftpboot/images/centos6-x86_64/vmlinuz
trying hardlink /var/www/cobbler/ks_mirror/centos6/images/pxeboot/initrd.img -> /var/lib/tftpboot/images/centos6-x86_64/initrd.img
copying images
generating PXE configuration files
generating PXE menu structure
copying files for distro: centos6-x86_64
trying hardlink /var/www/cobbler/ks_mirror/centos6/images/pxeboot/vmlinuz -> /var/www/cobbler/images/centos6-x86_64/vmlinuz
trying hardlink /var/www/cobbler/ks_mirror/centos6/images/pxeboot/initrd.img -> /var/www/cobbler/images/centos6-x86_64/initrd.img
Writing template files for centos6-x86_64
rendering TFTPD files
generating /etc/xinetd.d/tftp
processing boot_files for distro: centos6-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 shell triggers from /var/lib/cobbler/triggers/sync/post/*
running python triggers from /var/lib/cobbler/triggers/change/*
running python trigger cobbler.modules.scm_track
running shell triggers from /var/lib/cobbler/triggers/change/*
*** TASK COMPLETE ***

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/13318.html