[root@localhost ~]# netstat -lnup|grep dhcp
udp 0 0 0.0.0.0:39776 0.0.0.0:* 53381/dhcpd
udp 0 0 0.0.0.0:67 0.0.0.0:* 53381/dhcpd
udp6 0 0 :::46146 :::* 53381/dhcpd
[root@localhost ~]# mount /dev/cdrom /mnt # 挂载光盘镜像 mount: /dev/sr0 is write-protected, mounting read-only
[root@localhost ~]# cobbler import --path=/mnt --name=Centos-7.2 --arch=x86_64 # cobbler导入镜像
task started: 2017-10-15_145401_import
task started (id=Media import, time=Sun Oct 15 14:54:01 2017)
Found a candidate signature: breed=redhat, version=rhel6
Found a candidate signature: breed=redhat, version=rhel7
Found a matching signature: breed=redhat, version=rhel7
Adding distros from path /var/www/cobbler/ks_mirror/Centos-7.2-x86_64: # 导入镜像的位置
creating new distro: Centos-7.2-x86_64
trying symlink: /var/www/cobbler/ks_mirror/Centos-7.2-x86_64 -> /var/www/cobbler/links/Centos-7.2-x86_64
creating new profile: Centos-7.2-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-7.2-x86_64 for Centos-7.2-x86_64
processing repo at : /var/www/cobbler/ks_mirror/Centos-7.2-x86_64
need to process repo/comps: /var/www/cobbler/ks_mirror/Centos-7.2-x86_64
looking for /var/www/cobbler/ks_mirror/Centos-7.2-x86_64/repodata/*comps*.xml
Keeping repodata as-is :/var/www/cobbler/ks_mirror/Centos-7.2-x86_64/repodata
*** TASK COMPLETE ***
# --path 镜像路径
# --name 为安装源定义一个名字
# --arch 指定安装源是32位、64位、ia64, 目前支持的选项有: x86│x86_64│ia64
# 安装源的唯一标示就是根据name参数来定义,本例导入成功后,安装源的唯一标示就是:CentOS-7.1-x86_64,如果重复,系统会提示导入失败
[root@localhost ks_mirror]# cobbler list
distros:
Centos-7.2-x86_64
profiles:
Centos-7.2-x86_64
systems:
repos:
images:
mgmtclasses:
packages:
files:
[root@localhost kickstarts]# ls
default.ks esxi5-ks.cfg legacy.ks sample_autoyast.xml sample_esx4.ks sample_esxi5.ks sample_old.seed
esxi4-ks.cfg install_profiles pxerescue.ks sa