12.执行一下同步操作并检查配置文件
[root@node2 ~]# cobbler sync
task started: 2013-11-13_153610_sync
task started (id=Sync, time=Wed Nov 13 15:36:10 2013)
running pre-sync triggers
cleaning trees
mkdir: /var/lib/tftpboot/pxelinux.cfg
mkdir: /var/lib/tftpboot/grub
mkdir: /var/lib/tftpboot/s390x
mkdir: /var/lib/tftpboot/ppc
mkdir: /var/lib/tftpboot/etc
removing: /var/lib/tftpboot/grub/images
copying bootloaders
trying hardlink /var/lib/cobbler/loaders/pxelinux.0 -> /var/lib/tftpboot/pxelinux.0
trying hardlink /var/lib/cobbler/loaders/menu.c32 -> /var/lib/tftpboot/menu.c32
trying hardlink /var/lib/cobbler/loaders/yaboot -> /var/lib/tftpboot/yaboot
trying hardlink /usr/share/syslinux/memdisk -> /var/lib/tftpboot/memdisk
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 images
generating PXE configuration files
generating PXE menu structure
rendering DHCP files
generating /etc/dhcp/dhcpd.conf
rendering TFTPD files
generating /etc/xinetd.d/tftp
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: dhcpd -t -q
received on stdout:
received on stderr:
running: service dhcpd restart
received on stdout: 正在启动 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@node2 ~]# cobbler check
No configuration problems found. All systems go.
好了,到这里我们Cobbler安装就全部完成了,最后我们来重新启动一下xinetd并查看一下启动的端口。
[root@node2 ~]# service xinetd restart
停止 xinetd: [确定]
正在启动 xinetd:
[确定]
[root@node2 ~]# netstat -ntulp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1010/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1087/master
tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN 1125/sshd
tcp 0 0 127.0.0.1:6011 0.0.0.0:* LISTEN 1478/sshd
tcp 0 0 127.0.0.1:25151 0.0.0.0:* LISTEN 1643/python
tcp 0 0 :::80 :::* LISTEN 1525/httpd
tcp 0 0 :::22 :::* LISTEN 1010/sshd
tcp 0 0 ::1:25 :::* LISTEN 1087/master
tcp 0 0 ::1:6010 :::* LISTEN 1125/sshd
tcp 0 0 ::1:6011 :::* LISTEN 1478/sshd
tcp 0 0 :::873 :::* LISTEN 1777/xinetd
udp 0 0 0.0.0.0:67 0.0.0.0:* 1715/dhcpd
udp 0 0 0.0.0.0:69 0.0.0.0:* 1777/xinetd
udp 0 0 0.0.0.0:69 0.0.0.0:* 1618/in.tftpd
13.导入CentOS6.4镜像文件
[root@node2 ~]# mount /dev/cdrom /mnt
mount: block device /dev/sr0 is write-protected, mounting read-only
[root@node2 ~]# cd /mnt/
[root@node2 mnt]# ls
CentOS_BuildTag GPL Packages RPM-GPG-KEY-CentOS-6 RPM-GPG-KEY-CentOS-Testing-6
EFI images RELEASE-NOTES-en-US.html RPM-GPG-KEY-CentOS-Debug-6 TRANS.TBL
EULA isolinux repodata RPM-GPG-KEY-CentOS-Security-6
[root@node2 ~]# cobbler import --path=/mnt/ --name=CentOS-6.4 --arch=x86_64
task started: 2013-11-13_154155_import
task started (id=Media import, time=Wed Nov 13 15:41:55 2013)
Found a candidate signature: breed=RedHat, version=rhel6
Found a matching signature: breed=redhat, version=rhel6
Adding distros from path /var/www/cobbler/ks_mirror/CentOS-6.4-x86_64:
creating new distro: CentOS-6.4-x86_64
trying symlink: /var/www/cobbler/ks_mirror/CentOS-6.4-x86_64 -> /var/www/cobbler/links/CentOS-6.4-x86_64
creating new profile: CentOS-6.4-x86_64
associating repos
checking for rsync repo(s)
checking for rhn repo(s)
checking for yum repo(s)
starting descent into /var/www/cobbler/ks_mirror/CentOS-6.4-x86_64 for CentOS-6.4-x86_64
processing repo at : /var/www/cobbler/ks_mirror/CentOS-6.4-x86_64
need to process repo/comps: /var/www/cobbler/ks_mirror/CentOS-6.4-x86_64
looking for /var/www/cobbler/ks_mirror/CentOS-6.4-x86_64/repodata/*comps*.xml
running: createrepo -c cache -s sha --groupfile /var/www/cobbler/ks_mirror/CentOS-6.4-x86_64/repodata/2727fcb43fbe4c1a3588992af8c19e4d97167aee2f6088959221fc285cab6f72-c6-x86_64-comps.xml /var/www/cobbler/ks_mirror/CentOS-6.4-x86_64
received on stdout: Spawning worker 0 with 3955 pkgs
Workers Finished
Gathering worker results
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete
received on stderr:
*** TASK COMPLETE ***
[root@node2 ~]# cobbler list
distros:
CentOS-6.4-x86_64
profiles:
CentOS-6.4-x86_64
systems:
repos:
images:
mgmtclasses:
packages:
files:
14.查看一下导入镜像的详细信息
[root@node2 ~]# cobbler report
distros:
==========
Name : CentOS-6.4-x86_64
Architecture : x86_64
TFTP Boot Files : {}
Breed : redhat
Comment :
Fetchable Files : {}
Initrd : /var/www/cobbler/ks_mirror/CentOS-6.4-x86_64/images/pxeboot/initrd.img
Kernel : /var/www/cobbler/ks_mirror/CentOS-6.4-x86_64/images/pxeboot/vmlinuz
Kernel Options : {}
Kernel Options (Post Install) : {}
Kickstart Metadata : {'tree': 'http://@@http_server@@/cblr/links/CentOS-6.4-x86_64'}
Management Classes : []
OS Version : rhel6
Owners : ['admin']
Red Hat Management Key : <<inherit>>
Red Hat Management Server : <<inherit>>
Template Files : {}
profiles:
==========
Name : CentOS-6.4-x86_64
TFTP Boot Files : {}
Comment :
DHCP Tag : default
Distribution : CentOS-6.4-x86_64
Enable gPXE? : 0
Enable PXE Menu? : 1
Fetchable Files : {}
Kernel Options : {}
Kernel Options (Post Install) : {}
Kickstart : /var/lib/cobbler/kickstarts/sample_end.ks
Kickstart Metadata : {}
Management Classes : []
Management Parameters : <<inherit>>
Name Servers : []
Name Servers Search Path : []
Owners : ['admin']
Parent Profile :
Proxy :
Red Hat Management Key : <<inherit>>
Red Hat Management Server : <<inherit>>
Repos : []
Server Override : <<inherit>>
Template Files : {}
Virt Auto Boot : 1
Virt Bridge : xenbr0
Virt CPUs : 1
Virt Disk Driver Type : raw
Virt File Size(GB) : 5
Virt Path :
Virt RAM (MB) : 512
Virt Type : kvm
systems:
==========
repos:
==========
images:
==========
mgmtclasses:
==========
packages:
==========
files:
==========