利用Cobbler批量快速网络安装CentOS(2)
时间:2014-11-29 15:15 来源:www.it.net.cn 作者:IT网
第2条 不安装debian系统就不用修复
安装的话,下载debmirror这个对应版本的包进行安装
修复第3条:
-
[root@server1 ~]# openssl passwd -1 -salt 'thinkpad' '123456'
-
$1$thinkpad$NIq68XbeN51UgdtXiSOAE.
# thinkpad 这个是随机的数字或字母用来干扰以免被人看到 123456为root密码
然后再次编辑/etc/cobbler/settings,把以上生成的密码替换原有的密码(下面红色部分)
-
default_password_crypted: "$1$thinkpad$NIq68XbeN51UgdtXiSOAE."
9.导入镜像文件
镜像文件会存在/var/www/cobbler/ks_mirror/ 这个目录下
-
[root@server1 log]# mkdir /mnt/CentOS5.6
-
[root@server1 log]# mount /dev/cdrom /mnt/centos5.6/
-
mount: block device /dev/cdrom is write-protected, mounting read-only
-
[root@server1 log]# cobbler import --path=/mnt/centos5.6/ --name=centos5.6-i386 这个进行的时间比较长
-
task started: 2012-12-09_064244_import
-
task started (id=Media import, time=Sun Dec 9 06:42:44 2012)
-
Found a RedHat compatible signature: CentOS
-
adding distros
-
creating new distro: centos5.6-xen-i386
-
creating new profile: centos5.6-xen-i386
-
creating new distro: centos5.6-i386
-
creating new profile: centos5.6-i386
-
associating repos
-
traversing distro centos5.6-xen-i386
-
descent into /var/www/cobbler/ks_mirror/centos5.6-i386
-
processing repo at : /var/www/cobbler/ks_mirror/centos5.6-i386
-
need to process repo/comps: /var/www/cobbler/ks_mirror/centos5.6-i386
-
looking for /var/www/cobbler/ks_mirror/centos5.6-i386/repodata/*comps*.xml
-
running: createrepo -c cache -s sha --groupfile /var/www/cobbler/ks_mirror/centos5.6-i386/repodata/comps.xml /var/www/cobbler/ks_mirror/centos5.6-i386
-
2644/2644 - CentOS/boost-doc-1.33.1-10.el5.i386.rpm pm86.rpm
-
Saving Primary metadata
-
Saving file lists metadata
-
Saving other metadata
-
-
received on stderr: This option is deprecated
-
-
traversing distro centos5.6-i386
-
descent into /var/www/cobbler/ks_mirror/centos5.6-i386
-
processing repo at : /var/www/cobbler/ks_mirror/centos5.6-i386
-
need to process repo/comps: /var/www/cobbler/ks_mirror/centos5.6-i386
-
looking for /var/www/cobbler/ks_mirror/centos5.6-i386/repodata/*comps*.xml
-
running: createrepo -c cache -s sha --groupfile /var/www/cobbler/ks_mirror/centos5.6-i386/repodata/comps.xml /var/www/cobbler/ks_mirror/centos5.6-i386
-
2644/2644 - CentOS/boost-doc-1.33.1-10.el5.i386.rpm pm86.rpm
-
Saving Primary metadata
-
Saving file lists metadata
-
Saving other metadata
-
-
received on stderr: This option is deprecated
-
-
associating kickstarts
-
*** TASK COMPLETE *** <-看到这就代表成功完成
10.修复之后重启cobblerd ,然后做文件同步
-
[root@server1 ~]# service cobblerd restart
-
Stopping cobbler daemon: [确定]
-
Starting cobbler daemon: [确定]
-
[root@server1 ~]# cobbler sync
-
task started: 2012-12-09_070816_sync
-
task started (id=Sync, time=Sun Dec 9 07:08:16 2012)
-
running pre-sync triggers
-
cleaning trees
-
removing: /var/www/cobbler/images/centos5.6-i386
-
removing: /var/www/cobbler/images/centos5.6-xen-i386
-
removing: /tftpboot/pxelinux.cfg/default
-
removing: /tftpboot/grub/efidefault
-
removing: /tftpboot/grub/grub-x86_64.efi
-
removing: /tftpboot/grub/images
-
removing: /tftpboot/grub/grub-x86.efi
-
removing: /tftpboot/s390x/profile_list
-
copying bootloaders
-
trying hardlink /var/lib/cobbler/loaders/grub-x86_64.efi -> /tftpboot/grub/grub-x86_64.efi
-
trying hardlink /var/lib/cobbler/loaders/grub-x86.efi -> /tftpboot/grub/grub-x86.efi
-
copying distros to tftpboot
-
copying files for distro: centos5.6-xen-i386
-
trying hardlink /var/www/cobbler/ks_mirror/centos5.6-i386/images/xen/vmlinuz -> /tftpboot/images/centos5.6-xen-i386/vmlinuz
-
trying hardlink /var/www/cobbler/ks_mirror/centos5.6-i386/images/xen/initrd.img -> /tftpboot/images/centos5.6-xen-i386/initrd.img
-
copying files for distro: centos5.6-i386
-
trying hardlink /var/www/cobbler/ks_mirror/centos5.6-i386/images/pxeboot/vmlinuz -> /tftpboot/images/centos5.6-i386/vmlinuz
-
trying hardlink /var/www/cobbler/ks_mirror/centos5.6-i386/images/pxeboot/initrd.img -> /tftpboot/images/centos5.6-i386/initrd.img
-
copying images
-
generating PXE configuration files
-
generating PXE menu structure
-
copying files for distro: centos5.6-xen-i386
-
trying hardlink /var/www/cobbler/ks_mirror/centos5.6-i386/images/xen/vmlinuz -> /var/www/cobbler/images/centos5.6-xen-i386/vmlinuz
-
trying hardlink /var/www/cobbler/ks_mirror/centos5.6-i386/images/xen/initrd.img -> /var/www/cobbler/images/centos5.6-xen-i386/initrd.img
-
copying files for distro: centos5.6-i386
-
trying hardlink /var/www/cobbler/ks_mirror/centos5.6-i386/images/pxeboot/vmlinuz -> /var/www/cobbler/images/centos5.6-i386/vmlinuz
-
trying hardlink /var/www/cobbler/ks_mirror/centos5.6-i386/images/pxeboot/initrd.img -> /var/www/cobbler/images/centos5.6-i386/initrd.img
-
rendering DHCP files
-
generating /etc/dhcpd.conf
-
rendering TFTPD files
-
generating /etc/xinetd.d/tftp
-
cleaning link caches
-
rendering Rsync files
-
running post-sync triggers
-
running python triggers from /var/lib/cobbler/triggers/sync/post/*
-
running python trigger cobbler.modules.sync_post_restart_services
-
running: dhcpd -t -q
-
received on stdout:
-
received on stderr:
-
running: service dhcpd restart
-
received on stdout: 关闭 dhcpd:[确定]
-
启动 dhcpd:[确定]
-
-
received on stderr:
-
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 *** <-看到这就代表成功完成
查看导入结果:
[root@server1 ~]# cobbler distro list
centos5.6-i386 <- 这是刚刚导入的镜像的名字
centos5.6-xen-i386
11.启动xinetd服务
[root@server1 ~]# service xinetd start
12.先使用默认的kickstart配置文件来新建虚拟机测试
/var/lib/cobbler/kickstarts/sample.ks 这个是默认的,如果不为每个导入的镜像设置单独的配置,那么就默认会使用这个
安装完成之后会自动重启,重启后系统安装好了。
默认是:
计算机名未设置
IP地址自动获取
iptables 默认是开启状态,而且是有一一些规则在里面
selinux 默认是禁用的
默认分区方式:/boot 100M 剩余的做LVM,全部分给/
默认安装的软件包组;
Installed Groups:
Yum Utilities
拨号联网支持
系统工具
网络服务器
邮件服务器
gcc 未安装
(责任编辑:IT)
第2条 不安装debian系统就不用修复
安装的话,下载debmirror这个对应版本的包进行安装
修复第3条:
# thinkpad 这个是随机的数字或字母用来干扰以免被人看到 123456为root密码
然后再次编辑/etc/cobbler/settings,把以上生成的密码替换原有的密码(下面红色部分)
9.导入镜像文件
镜像文件会存在/var/www/cobbler/ks_mirror/ 这个目录下
10.修复之后重启cobblerd ,然后做文件同步
查看导入结果: [root@server1 ~]# cobbler distro list centos5.6-i386 <- 这是刚刚导入的镜像的名字 centos5.6-xen-i386
11.启动xinetd服务
[root@server1 ~]# service xinetd start
12.先使用默认的kickstart配置文件来新建虚拟机测试
/var/lib/cobbler/kickstarts/sample.ks 这个是默认的,如果不为每个导入的镜像设置单独的配置,那么就默认会使用这个
安装完成之后会自动重启,重启后系统安装好了。
默认是:
计算机名未设置
IP地址自动获取
iptables 默认是开启状态,而且是有一一些规则在里面
selinux 默认是禁用的
默认分区方式:/boot 100M 剩余的做LVM,全部分给/
默认安装的软件包组;
Installed Groups:
Yum Utilities 拨号联网支持 系统工具 网络服务器 邮件服务器
gcc 未安装 (责任编辑:IT) |