原创作品,允许转载,转载时请务必以超链接形式标明文章
原始出处 、作者信息和本声明。否则将追究法律责任。
http://dgd2010.blog.51cto.com/1539422/1672569
1
|
sudo
apt-get
install
cobbler cobbler-web
|
1
2
3
4
|
# install epel repo
yum
install
http:
//dl
.fedoraproject.org
/pub/epel/6/x86_64/epel-release-6-8
.noarch.rpm
# cobbler
yum
install
cobbler cobbler-web -y
|
1
2
3
4
5
6
7
8
|
ipaddr=$(ip addr show to 0.0.0.0
/0
scope global |
awk
'/[[:space:]]inet / { print gensub("/.*","","g",$2) }'
)
operationfile=
/etc/cobbler/settings
bakoperationfile=$operationfile$(
date
+-%F-%H-%M-%S)
"~"
cp
$operationfile $bakoperationfile
chown
-R --reference=$operationfile $bakoperationfile
chcon -R --reference=$operationfile $bakoperationfile
sed
-i
"s/next_server: 127.0.0.1/next_server: $ipaddr/g"
$operationfile
sed
-i
"s/server: 127.0.0.1/server: $ipaddr/g"
$operationfile
|
1
2
3
4
5
6
7
8
9
10
|
http:
//www
.cobblerd.org
/loaders/README
to
/var/lib/cobbler/loaders/README
http:
//www
.cobblerd.org
/loaders/COPYING
.elilo to
/var/lib/cobbler/loaders/COPYING
.elilo
http:
//www
.cobblerd.org
/loaders/COPYING
.yaboot to
/var/lib/cobbler/loaders/COPYING
.yaboot
http:
//www
.cobblerd.org
/loaders/COPYING
.syslinux to
/var/lib/cobbler/loaders/COPYING
.syslinux
http:
//www
.cobblerd.org
/loaders/elilo-3
.8-ia64.efi to
/var/lib/cobbler/loaders/elilo-ia64
.efi
http:
//www
.cobblerd.org
/loaders/yaboot-1
.3.14-12 to
/var/lib/cobbler/loaders/yaboot
http:
//www
.cobblerd.org
/loaders/pxelinux
.0-3.86 to
/var/lib/cobbler/loaders/pxelinux
.0
http:
//www
.cobblerd.org
/loaders/menu
.c32-3.86 to
/var/lib/cobbler/loaders/menu
.c32
http:
//www
.cobblerd.org
/loaders/grub-0
.97-x86.efi to
/var/lib/cobbler/loaders/grub-x86
.efi
http:
//www
.cobblerd.org
/loaders/grub-0
.97-x86_64.efi to
/var/lib/cobbler/loaders/grub-x86_64
.efi
|
1
2
3
|
yum
install
debmirror pykickstart fence-agents cman -y
yum
install
dhcp dhcp-devel -y
yum
install
syslinux
|
1
2
3
4
5
6
7
8
|
subnet 10.20.0.0 netmask 255.255.255.0 {
option routers 10.20.0.2;
option domain-name-servers 114.114.114.114, 8.8.4.4;
option subnet-mask 255.255.255.0;
range dynamic-bootp 10.20.0.200 10.20.0.210;
default-lease-
time
21600;
max-lease-
time
43200;
next-server $next_server;
|
1
2
3
4
5
6
7
8
9
|
setenforce 0
service httpd start
service cobblerd start
service xinetd start
service iptables stop
ps
-ef |
grep
$(
lsof
|
grep
tftp |
grep
xinetd |
awk
'{print $2}'
)
ps
-ef |
grep
dhcp |
grep
-
v
grep
cobbler check
cobbler
sync
|
1
2
|
mount
-t iso9660 CentOS-6.6-x86_64-minimal.iso
/mnt
-o loop,ro
cobbler
import
--path=
/mnt
--name=CentOS-6.6-x86_64-minimal
|
1
2
|
cobbler distro list
cobbler
sync
|