易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 4542|回复: 1
收起左侧

Centos7安装cobbler自动化部署工具

[复制链接]
发表于 2017-2-7 15:35:36 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?开始注册

x
  • cobbler简介

    4 n5 @) c& E, O( t$ m" d8 t

RHEL7默认提供的cobbler是2.6.9版本的,cobbler译文”补鞋匠“网络安装套件cobbler可以同时管理DHCP;DNS;YUM等,现在随便一家互联网公司机器数量成千上万,这个时候我们就不能那个U盘,或者光盘一台台的装,然后诞生了PXE+TFTP+DHCP+Kickstart(俗称PXE)然而PXE不能同时部署多种版本的系统,然而cobbler可以部署多种系统如centos5,6,7;redhat 5,6,7;cobbler还可以部署windows系统。该工具由python语言开发,支持web界面管理十分灵活。

PXE自动化部署参考:http://mictiger.blog.51cto.com/4854014/1577008

  • 配置yum源
    ; {! C, _7 F* s% M2 P

cobbler centos源没有cobbler包组,它是由epel提供,但是其依赖的软件包又是centos所提供,所以我们配置centos,epel 两个yum源
* H7 [: J" m' ~+ r' e4 T, e# g! n

[size=1em]1
% Y3 K& v! o! q4 W+ e7 D& b& |7 ^
[size=1em]2
# U/ e! X, q, A0 n1 K1 v) s
[size=1em]3
" `1 u: X8 K1 {. ]# @
[size=1em]4

! O. o. s/ j1 ~" ?! D) @
[size=1em]5

2 l2 O0 ~: p; G( A
[size=1em]6
* r- X; F1 G  ], ~
[size=1em]7
  _% f) B$ ?. c9 ~& U
[size=1em]8

% U: \: E% _; C1 A# q
[size=1em]9
# t2 c( ]5 `% A
[size=1em]10

5 J# U4 B0 b' s: K, z" L+ u0 ~% c
[size=1em]11
; I, q7 E' l5 {
[size=1em][size=1em][root@cobbler yum.repos.d]# cat aliyun.repo
+ O0 |* p) ^9 \, t+ M& D. R[size=1em][epel]
, B+ R; H( |. ]0 h: d* R9 L[size=1em]name=ailiyun# y/ ~  a0 m( T
[size=1em]baseurl=http://mirrors.aliyun.com/epel/7/x86_64/8 j% m& x* t5 n+ i9 ?- @: W
[size=1em]enabled=1, d! O- U/ I$ w0 ]) D5 i0 i8 H1 R
[size=1em]gpgcheck=09 ~3 Z* M% {* i+ t9 N9 k
[size=1em][centos]* q/ a( L/ b5 h% f) |
[size=1em]name=cobbler
% \- f) J5 r' u# v" Y/ N. y[size=1em]baseurl=http://mirrors.aliyun.com/centos/7/os/x86_64/
7 m9 L+ _% n1 c[size=1em]enabled=1  z% }4 J* q8 e. g7 X' h1 X2 j
[size=1em]gpgcheck=05 j( z+ ~. k3 E
# j* e/ j7 M  |7 B5 z6 Y1 k

, {# R' ^* x2 S* O  O' l
. u1 k, X1 v2 l, J  b  ]/ f
  • 开始安装

    ' q( t# i0 V% [9 E4 {
[size=1em]1

& r1 A$ `/ ]: A; o$ n
[size=1em]2
" S- g) p) C9 d8 [
[size=1em]3

2 \+ n# `0 ]+ m0 i7 R. _3 z
[size=1em]4

0 N9 T" e; i- X# S$ z& v1 w
[size=1em]5
0 Q# S: |) k$ ^) K6 w1 N
[size=1em]6
6 ~) v- }$ M% r  i5 I: p
[size=1em]7

/ {2 ~# P9 D  W
[size=1em]8
; g2 E: z& ?' i; C0 W3 p  y, @
[size=1em]9

% O5 F1 _( E9 N$ F/ y( {% O
[size=1em]10

# h9 [  J' X" T& @5 P
[size=1em]11

# |$ B' d2 j' P5 ?; }. S3 C9 {
[size=1em]12

; `' M7 E/ b( ^+ b
[size=1em]13
, D1 G9 u: Q! j0 C5 O
[size=1em]14

1 I4 C1 M. t# h) }! n
[size=1em]15

0 }, L* q5 o4 M% L0 q
[size=1em]16
3 F, g5 }# I- s) |, I7 B3 X. q
[size=1em]17

6 z2 |, s2 Y- |
[size=1em]18
" K7 C  y' c: g
[size=1em]19
5 J8 k  Z" N" F6 i+ U: L  [
[size=1em]20
* L5 ^: o" _9 f$ E1 L* A7 D
[size=1em]21
$ o/ {( v0 R$ @% e% P
[size=1em]22
0 ?, g, S  b% H0 b. A7 Q
[size=1em]23
# ^, b! R1 J( j6 [9 p" a, N
[size=1em]24
" V- `5 t& @5 a1 E
[size=1em]25
. ~; H4 X% V, L
[size=1em]26
8 s4 T% V' f, \$ ], P" A7 ^+ g
[size=1em]27

& a2 v8 d& [. q( \; d
[size=1em]28

$ a2 o$ M2 n( k1 I; ]
[size=1em][size=1em][root@cobbler yum.repos.d]# yum install cobbler cobbler-web pykickstart debmirror
& C3 _& M$ q0 \2 @0 Z3 A5 g# x! \[size=1em][root@cobbler ~]# rpm -qi cobbler
% z3 R- R" g( k% I- ?9 U[size=1em]Name        : cobbler5 x5 m8 K! `6 g" ~5 ]; }# V
[size=1em]Version     : 2.6.9
* [9 `+ A' D( `[size=1em]Release     : 1.el7. J6 n' y8 Y  @. y; r, N
[size=1em]Architecture: noarch
2 y# `5 Z, L% @[size=1em]Install Date: Thu 20 Aug 2015 09:00:46 PM CST* Z/ H5 H* n' b1 r
[size=1em]Group       : Applications/System+ G% z; Y# D& r3 @( f
[size=1em]Size        : 21776342 A9 i% G9 T9 u. x5 `3 g
[size=1em]License     : GPLv2+2 i1 ~3 m+ v2 J" @# W
[size=1em]Signature   : RSA/SHA256, Wed 24 Jun 2015 04:36:07 AM CST, Key ID 6a2faea2352c64e55 a) r2 e, R" E; n
[size=1em]Source RPM  : cobbler-2.6.9-1.el7.src.rpm* r, _" w* H" @5 n/ z
[size=1em]Build Date  : Tue 23 Jun 2015 02:06:19 AM CST0 D4 s* E: ?4 n% o
[size=1em]Build Host  : buildppc-02.phx2.fedoraproject.org
' `8 {1 d8 X, B0 Q$ a# c8 o( l[size=1em]Relocations : (not relocatable)
# ~5 k0 t5 C0 a  G# r) H8 W) k[size=1em]Packager    : Fedora Project8 A! o+ Y0 p# b) Q  h
[size=1em]Vendor      : Fedora Project  n+ N4 D; ^" Q" f) B
[size=1em]URL         : http://www.cobblerd.org/# R7 `- E( z, T
[size=1em]Summary     : Boot server configurator9 E2 \" O% a: V
[size=1em]Description :
4 @; }* x3 M& t$ C4 \% M' m& X6 m, U[size=1em]Cobbler is a network install server.  Cobbler supports PXE, ISO8 v" p+ z. V5 p/ B7 K
[size=1em]virtualized installs, and re-installing existing Linux machines.  g/ k, a) _8 y: }; A1 o
[size=1em]The last two modes use a helper tool, 'koan', that integrates with3 C8 c, _2 h  J6 u1 B, ?
[size=1em]cobbler.  There is also a web interface 'cobbler-web'.  Cobbler's
8 q4 j; q- x% W5 C* C( \4 w[size=1em]advanced features include importing distributions from DVDs and rsync
6 ?8 q& Q3 i' T$ J[size=1em]mirrors, kickstart templating, integrated yum mirroring, and built-in# [2 {) p1 p2 R" z
[size=1em]DHCP/DNS Management.  Cobbler has a XMLRPC API for integration with
, o% \8 G) k: q0 j/ i* g[size=1em]other applications.
* z5 D0 _2 z+ A
( C4 V2 ]  @+ u3 z0 A7 D3 V" h  x

% L& j. s0 w# e0 j+ A: O

1 U0 d- D) E2 k5 \4 J
  • 启动cobbler,httpd服务
    . i5 b3 P* f9 v
[size=1em]1

! D; k+ l7 o! a
[size=1em]2

  O: O  a* s& \# s, A7 R" Y; h; a/ K
[size=1em][size=1em][root@cobbler ~]# systemctl start httpd.service
, U0 ]( H/ I; \( T[size=1em][root@cobbler ~]# systemctl start cobblerd.service" d& ^9 }8 V. }% h: P

! K. _: q. o3 d" ?
* V. \" n& D6 b

1 F9 p. Z+ j1 N( c: t: j9 B1 n# ~3 A, J3 o
  • 关闭selinux
    4 s! q' v- _: B+ j8 d
[size=1em]1

/ u0 e# Y7 h7 M8 |
[size=1em]2

2 z+ P8 e/ v9 X) R" [
[size=1em]3

+ i5 P" J4 d7 C9 T" d
[size=1em]4
2 o- G5 H' l4 @  D2 V& m7 j
[size=1em]5

: g4 n* {) y4 t0 c+ _. [: s
[size=1em]6
( r/ r0 I* p$ J9 r2 L
[size=1em]7
$ P9 a2 Y/ j3 a
[size=1em]8

/ k5 q4 d+ O3 u5 O5 f  A& \5 H
[size=1em]9

( m  _2 c' {' `9 B$ k
[size=1em]10

- F8 K, X- p  ^/ J
[size=1em]11
6 X+ I3 V2 N4 [! s5 D* V: H
[size=1em]12

3 J& @8 j$ O5 M9 \5 E/ }
[size=1em]13

+ I) U( w$ g. l; V4 N
[size=1em]14

0 Q& {0 `4 T) \3 g+ P5 g
[size=1em]15

. d& z3 Q* x: Q8 ^8 E1 c& V5 [5 n7 ]
[size=1em]16
2 X* q( R4 d2 Y. \& ?1 W
[size=1em]17
8 @' u0 x3 U4 Y' {( A
[size=1em]18

( \! h! s0 Z+ h. C$ l/ [; p, B& U
[size=1em]19

! e6 Z& Y+ w% R( S
[size=1em]20
3 s) w9 B" w. G: [" L
[size=1em]21
8 S0 v1 W; O5 W- ?9 K$ v3 O
[size=1em]22
2 g2 Q6 a0 R  q* E8 m* m% P, c
[size=1em]23
1 u8 f( u' h& R( B5 P8 F
[size=1em]24

% T0 V& m/ K2 E1 Q
[size=1em]25

0 F4 @! T5 ?9 Z9 d8 N
[size=1em]26
4 W" |& u8 `4 V1 W( Z% r2 X
[size=1em]27
( L4 @: b+ e; v; H9 @
[size=1em]28

' D: O: f7 y6 _, c) Q1 C
[size=1em]29

7 k: \7 n& l0 Y4 H: E1 D- Y+ ?3 j
[size=1em]30
  @9 c3 X. _4 ]# h# K
[size=1em][size=1em][root@cobbler ~]# cat /etc/selinux/config + Y) H# f" A* G' o- J7 ?

; S8 ?, M/ h* L9 {# M" m[size=1em]# This file controls the state of SELinux on the system.. ]$ Z/ k' ?* j3 p- l
[size=1em]# SELINUX= can take one of these three values:
: y! G/ R1 Y+ B$ _) ?) F[size=1em]#     enforcing - SELinux security policy is enforced.
2 d$ b" S3 ~* V) q+ S, g4 C[size=1em]#     permissive - SELinux prints warnings instead of enforcing.
+ [* ~) M% m4 w, [$ p5 C[size=1em]#     disabled - No SELinux policy is loaded.
: E; M7 r4 r% M5 H, B[size=1em]SELINUX=disabled
3 \2 ^" z4 r: X+ c6 F/ {3 h+ I! j- Q[size=1em]# SELINUXTYPE= can take one of these two values:
$ F% g* i3 h' j8 ~. s7 g5 K) E' T[size=1em]#     targeted - Targeted processes are protected,  C$ k' V( B) }' n! L3 j
[size=1em]#     minimum - Modification of targeted policy. Only selected processes are protected. % @  d% [3 q0 O4 U5 S4 t
[size=1em]#     mls - Multi Level Security protection.0 p7 L, u/ ?- i& ~9 X
[size=1em]SELINUXTYPE=targeted
8 o  E4 o3 k# ^6 ^3 f' ?[size=1em][root@cobbler ~]# getenforce ' Y+ `- J/ t3 ?4 m' s& ~8 O
[size=1em]Permissive  或者  Disabled8 ~4 R- d, h$ @/ F2 Q: a
[size=1em][root@cobbler ~]# cobbler check
/ p( T- Y+ x0 Y0 j[size=1em]The following are potential configuration items that you may want to fix:: _8 g* U; w+ C: _( S

& ^# f4 N7 X  h! k# a' t: B[size=1em]1 : The 'server' field in /etc/cobbler/settings must be set to something other than localhost, or kickstarting features will not work.  This should be a resolvable hostname or IP for the boot server as reachable by all machines that will use it.
4 B% L( S+ S8 Q+ j: N[size=1em]2 : For PXE to be functional, the 'next_server' field in /etc/cobbler/settings must be set to something other than 127.0.0.1, and should match the IP of the boot server on the PXE network.
( V$ I( m, a- K$ X* P[size=1em]3 : SELinux is enabled. Please review the following wiki page for details on ensuring cobbler works correctly in your SELinux environment:% \! r0 u/ l# e% D2 W3 }; I( V
[size=1em]    https://github.com/cobbler/cobbler/wiki/Selinux
8 b* Q  O, a7 X9 S/ |% l; e[size=1em]4 : change 'disable' to 'no' in /etc/xinetd.d/tftp8 E, k8 n+ T2 d3 a
[size=1em]5 : some network boot-loaders are missing from /var/lib/cobbler/loaders, you may run 'cobbler get-loaders' to download them, or, if you only want to handle x86/x86_64 netbooting, you may ensure that you have installed a *recent* version of the syslinux package installed and can ignore this message entirely.  Files in this directory, should you want to support all architectures, should include pxelinux.0, menu.c32, elilo.efi, and yaboot. The 'cobbler get-loaders' command is the easiest way to resolve these requirements.
) f6 F# s, Q! L# f$ D0 B[size=1em]6 : file /etc/xinetd.d/rsync does not exist/ p" X. R  ]: v) M  R' H8 j
[size=1em]7 : debmirror package is not installed, it will be required to manage debian deployments and repositories$ U& H6 }" B3 @7 C' S
[size=1em]8 : The default password used by the sample templates for newly installed machines (default_password_crypted in /etc/cobbler/settings) is still set to 'cobbler' and should be changed, try: "openssl passwd -1 -salt 'random-phrase-here' 'your-password-here'" to generate new one
4 O; N' p) ]3 H2 r" H1 w' d/ U+ Y. j[size=1em]9 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them
: i7 f; m4 N+ Z' h
7 V- J/ |* P) V- Y+ r/ g9 l5 F[size=1em]Restart cobblerd and then run 'cobbler sync' to apply changes.' ^# D% b( a8 F( R" l7 l
' V, O) V2 n$ c2 h

. O; |, b8 L- M6 b5 g2 p

$ P9 }7 W2 `7 u& A/ {3 Y8 ~! f1 O

解决以上报告信息

  • 修改参数
    4 S; H: n/ R7 D
[size=1em]1

7 |% u% f0 R0 U& L: q
[size=1em]2

5 d" G# f5 |5 v' P9 \
[size=1em]3
+ J; H# Q' y/ s% L1 f# i+ ~
[size=1em]4
" \& s7 T  u) j6 v  W2 w0 }
[size=1em]5

9 O7 j0 e/ ~) B0 \
[size=1em]6

6 _2 F+ L5 v$ I0 [6 C0 w0 [
[size=1em]7

, n' o$ \# G7 H1 |
[size=1em]8
; m2 m" F% A' p$ E" @
[size=1em]9

" b7 a  {2 V% k  f7 ^; e3 N
[size=1em]10

" a; r% h- B, Z# b/ j1 |) b! p
[size=1em]11
0 `6 n3 {4 S" S
[size=1em]12

( ^- K5 w# ~7 c( ~0 j
[size=1em]13

# ]1 ]6 T- X2 Z# Q: v3 F8 m& N
[size=1em]14
  p$ n) n/ a0 g' C1 l6 N
[size=1em]15
2 I$ t% r8 e( B+ n9 O
[size=1em]16

9 @& A( j9 j2 K+ ~& j0 @
[size=1em]17

2 P2 ?- e- C: l1 ]9 J: e# t3 B
[size=1em]18
" f; i# U& U& R; z; p5 l% X8 u$ o# O
[size=1em][size=1em]修改 /etc/cobbler/settings
8 J1 o/ \0 ^6 I[size=1em]next_server: 192.168.3.100; p- j! {- f# i& j! W
[size=1em]server: 192.168.3.100
; ?- {/ l3 ~# m) u; J' }[size=1em][root@cobbler ~]# cobbler get-loaders  w9 M( y) f8 |7 y
[size=1em]如果网络不行可以直接去 http://cobbler.github.com/loaders/下载COPYING.elilo  COPYING.syslinux  COPYING.yaboot  elilo-ia64.efi  grub-x86_64.efi  grub-x86.efi  menu.c32  pxelinux.0  README  yaboot这些软件包
8 Z+ U  Q$ R  R- {[size=1em][root@cobbler ~]# cobbler get-loaders
% n! a7 R! X) m/ T& D[size=1em]task started: 2015-08-20_215034_get_loaders+ M* K! I$ [$ B& j: u6 d
[size=1em]task started (id=Download Bootloader Content, time=Thu Aug 20 21:50:34 2015)' r6 f1 b5 `1 v5 o* o
[size=1em]downloading http://cobbler.github.com/loaders/README to /var/lib/cobbler/loaders/README3 O! Z' x( g" [, A! ^, t. t' ~
[size=1em][root@cobbler ~]# yum install fence-agents cman
( o$ U: w0 R( k[size=1em]注释/etc/debmirror.conf 中以下两项
1 n0 C0 r* [, A3 ]; [, E( n8 d[size=1em]#@dists="sid";
. l& B7 \+ M! `! V[size=1em]#@arches="i386";* A% Y5 I! {/ Z- |& s. X
[size=1em][root@cobbler ~]# openssl passwd -1 -salt `openssl rand -hex 4`0 w# |$ Z  |! ?  |
[size=1em]Password: * F. r) A: w% y& O
[size=1em]$1$a6a60411$ltytuO4WzxCYFOJhNFIlh1' E% o4 p; D' ~, P7 g
[size=1em][root@cobbler ~]# vim /etc/cobbler/settings 5 ^- Y0 {5 K. M# w
[size=1em]default_password_crypted: "$1$a6a60411$ltytuO4WzxCYFOJhNFIlh1"/ r' H$ f+ G: n0 i5 `+ k& p' t5 T: \* _
) H; Z: w, z* v0 Z* H

# ^$ Z+ m- J' `/ E' q0 i! r
4 |" u( @5 u1 Z# r: d  ]

检查是否配置完成

[size=1em]1
! \1 H* a; l" a9 o$ K2 [( L
[size=1em]2
8 |: x" ]; r1 y6 `; Q* {5 E
[size=1em]3
3 l  ]" J0 t: @7 w3 `
[size=1em]4
7 H/ @. U' D% W; ~
[size=1em]5
8 n1 d* w, \- z5 L
[size=1em]6

% G* l* {" W7 [$ L7 a) D
[size=1em]7
  N0 d4 W+ Z" ]. w7 T! M
[size=1em]8

% C" i' S5 @6 ?7 }$ t5 _& v" ^
[size=1em]9
, I& |+ [$ P4 y5 ~
[size=1em]10

2 a8 y4 G! }% Z! g0 b
[size=1em]11
3 `: E) ~% h4 q  _3 _
[size=1em]12
( ]2 q# q9 ]3 Q& A& n/ Y
[size=1em]13
) g: F4 T7 J( L- i! r
[size=1em]14
3 X0 i) E+ K' N7 {2 {: U- t
[size=1em][size=1em][root@cobbler ~]# cobbler check
# f7 G8 ^; S4 h: S" z" x, f[size=1em]No configuration problems found.  All systems go.& P5 h- I- l  D
[size=1em]安装配置DHCP
9 E) M/ y5 I! `. r, Y1 E! z* ~8 P/ J$ n[size=1em][root@cobbler ~]# yum install dhcp' z7 J- I. a! e& n
[size=1em][root@cobbler loaders]# vim /etc/dhcp/dhcpd.conf
/ l1 U* q7 \5 H9 o3 l[size=1em]default-lease-time  86400;
! L% d6 e' g5 S! O  ?+ W7 Z[size=1em]max-lease-time  7200;6 i: F7 N+ w% i4 Z
[size=1em]log-facility local7;* }( `0 w% z& g
[size=1em]subnet  192.168.3.0 netmask 255.255.255.0 {: t, k' T5 @. l: L4 I0 L3 M, O
[size=1em] range 192.168.3.105   192.168.3.120;
1 x4 i1 T2 D% B. h, M2 P$ ][size=1em] option    routers 192.168.3.100;
' U2 P. F) A7 }5 y% e: a! F[size=1em]}/ f7 D; V+ ^! h. w0 G3 K" Q
[size=1em]next-server 192.168.3.100;
7 u* ~# k+ b, ^5 e: D[size=1em]filename="pxelinux.0";
6 @$ i& @( L% h
: j. X+ J( i" B& Q6 l
0 S' x0 J( `# Q  s+ g3 }
! K% ^, w+ x% F; p( N
  • 准备安装yum
    * S* Z- W7 T/ Q# n. e" h
[size=1em]1

0 }& ^& i( o0 z: ]4 ?5 {% M. Q
[size=1em]2

7 r( `! N- z: g7 ^) ]' z
[size=1em]3

, I  _# L: i& t; g9 k
[size=1em]4

* C' f4 Q$ t# @/ s8 _
[size=1em][size=1em][root@cobbler media]# mkdir centos6
# h. |) A4 k) G* A0 C. d( T4 a[size=1em][root@cobbler media]# mkdir centos7
3 u# a1 Q  g0 f( ~9 L% ~  v" N[size=1em][root@cobbler ~]# mount -o loop CentOS-6.6-x86_64-bin-DVD1.iso /media/centos6
, K# x$ J) J& z9 o) h& e[size=1em][root@cobbler ~]# mount -o loop CentOS-7.0-1406-x86_64-DVD.iso /media/centos7
9 ~5 Y* R; }0 |$ S: D
5 s& v+ Y. O& u1 \
$ D6 ?2 L% ~$ O( O: Z, w. Y7 R

5 u* A2 L$ H7 N

安装system-config-kickstart 用于编写ks.cfg文件基于系统的anaconda-ks.cfg这个文件是本系统安装中的配置

[size=1em]1
3 o; X5 K4 ]' e9 D& Z& Q' s: g
[size=1em]2
2 _/ a+ b) `9 x0 U" \+ E5 A
[size=1em][size=1em][root@cobbler ~]# yum install  system-config-kickstart ! z: V' `1 ^' ~; x0 t' ^
[size=1em][root@cobbler ~]# system-config-kickstart8 M0 N4 O- x6 ]' h2 L  m1 L1 Z
5 t0 q. Q- q7 J4 m

( {: [/ J8 p' Q: @: z- E

) ~2 v9 A+ H2 Y; a

3 _8 W, E& F$ q: r' ~, p
                               
登录/注册后可看大图

  • 导入系统镜像

    * S9 ^' Z  M" [# O
[size=1em]1

. U0 _+ [& i8 O) c0 K
[size=1em]2
# R6 S$ A8 v: f' _9 A* I
[size=1em]3
% e4 v. m( p6 o4 _" D
[size=1em]4

9 u: U; e% Y; Y# j; Q
[size=1em]5

( J7 A' L; [% T: R
[size=1em]6
% \, `8 D. l& s0 x: h
[size=1em]7
, [- |$ J# o5 k2 O1 b* I/ S
[size=1em][size=1em][root@cobbler ~]# cobbler import --name="centos6" --path=/media/centos6
4 ?' q! t- s/ B' U/ |[size=1em][root@cobbler ~]# cobbler distro list% u9 L) u" x' d" ~
[size=1em]   centos6-x86_64
% T% N) U' A! q+ Y+ p2 X[size=1em][root@cobbler cobbler]# cobbler profile add --name=centos6.6 --distro=centos6-x86_64 --kickstart=/var/lib/cobbler/kickstarts/centos6.cfg) R6 x" P2 ~3 @2 ]" X9 f4 O9 D/ W
[size=1em][root@cobbler cobbler]# cobbler profile list, E2 u5 A) j3 H. S2 ~- P
[size=1em]   centos6-x86_646 y1 T0 y3 ^% \. n* R4 }6 Q) K
[size=1em]   centos6.62 D) `0 Y; B6 W# ]9 Y

3 I+ |8 {* @6 H, B/ j/ A
$ l* C3 G9 i4 \. b8 V: P1 k

: V. j* ?3 H* i8 {

配置完成后一定要sync

[size=1em]1

- x' a: ^3 T3 x$ g7 g: M0 |
[size=1em]2

, c/ K( Q% r: ?; Q2 `
[size=1em]3

: F2 G& d: z; g8 B: C6 p2 z! u7 Y  m
[size=1em]4

5 @1 g# o% E- m" ?. T
[size=1em]5

  p, h0 f4 n2 J2 q; t
[size=1em]6

, V6 O9 M  M' n. a* J2 |' K* B
[size=1em]7

; ^% _* H& N2 k, T
[size=1em]8

+ C' s6 U( Z: E9 d; Q8 k5 s. P
[size=1em]9
+ V8 q$ T7 u9 N# k
[size=1em]10

7 w9 B* m* \) z1 l6 o5 C) L3 _( m
[size=1em]11

7 W2 w7 m" ?: ], |! o
[size=1em]12
& L% n5 ~& ~) @3 S
[size=1em]13
. X. F8 z9 _. c& t' v& L: ?3 \: G% @
[size=1em]14

9 I4 \+ h) f' l% D7 b
[size=1em]15

* @: O9 q( p. _8 s5 D% @  q
[size=1em]16
. [! \3 |- N9 i* O8 v" l4 h
[size=1em]17

2 L+ j* r' }; G+ D
[size=1em]18
" l% ]  X; Z, S% H
[size=1em]19
+ ?+ i: d& x# ~) m7 h0 W' y% W
[size=1em]20
% d9 l* e' K( w! ~
[size=1em]21
* Z/ l' K9 F, I! C$ o- I6 p
[size=1em]22
6 x$ x6 v. h) ?" |( X
[size=1em]23

0 [5 K3 L" `* U
[size=1em]24

* B. R5 R1 l9 `
[size=1em]25
; m( N5 }9 ~8 O
[size=1em]26
" [8 V7 h( R% q% |
[size=1em]27

" t5 i; U; e3 z0 E/ O0 G
[size=1em]28
7 y* @1 o; `9 h, u3 K* c2 ~; R; ^/ X1 Y
[size=1em]29
5 S9 ]+ j( T4 b4 c2 R& W
[size=1em]30
; t/ C( p: h  P8 I
[size=1em]31

! j! s  M7 J! K
[size=1em]32
$ I- x5 g3 n* M- T+ |0 P
[size=1em]33

* Z, n  M+ e, W* s4 v- o% v
[size=1em]34
0 c/ e" g( t2 Z' A1 o! G( Y: w* {
[size=1em]35

% V! l9 _* k. ?: U
[size=1em]36

) V7 s3 k3 m  r- }
[size=1em]37

, D; |+ A/ A% c! O+ {; V
[size=1em]38

$ r; v& X0 a& x
[size=1em]39

- i; T5 Y/ K. N+ O. z. d
[size=1em]40
$ O: X$ w- T0 U: b4 p
[size=1em]41
$ y# f; _/ ?7 ~8 _2 ]( g$ K, G! s
[size=1em]42

! B; T4 Z" B5 x% q$ L; S
[size=1em]43

8 k8 G2 w% n( u0 f
[size=1em]44
- g' S' z6 [; U. |5 M
[size=1em]45
5 k' v; s- j( }
[size=1em][size=1em][root@cobbler ~]# cobbler sync
$ l" \: t& ^6 g4 P[size=1em]task started: 2015-08-22_011824_sync8 q, G! Z9 p7 p) g4 m0 j0 L. x
[size=1em]task started (id=Sync, time=Sat Aug 22 01:18:24 2015)
7 r: @; o: u) m, w5 G! g[size=1em]running pre-sync triggers1 H& d5 @6 w% ^# t. m! p8 i9 e* e
[size=1em]cleaning trees
7 J+ }9 T. |; V3 g% i3 L( L/ g  n[size=1em]removing: /var/www/cobbler/images/centos6-x86_64
( h+ m9 ~6 o0 H. u  }$ v[size=1em]removing: /var/lib/tftpboot/pxelinux.cfg/default
6 o1 `* O* g; `# N$ c& o' y[size=1em]removing: /var/lib/tftpboot/grub/images/ y/ J8 A  i1 v) X" g' ~/ c
[size=1em]removing: /var/lib/tftpboot/grub/grub-x86_64.efi
9 _* {* q* w6 M. |* b/ j) }" g[size=1em]removing: /var/lib/tftpboot/grub/grub-x86.efi
1 |- {3 b9 @" T. I: u1 [' C7 e[size=1em]removing: /var/lib/tftpboot/grub/efidefault
5 }+ I6 o7 B0 {- H[size=1em]removing: /var/lib/tftpboot/images/centos6-x86_64" ?% e: }' Y  j5 u: v  F  {
[size=1em]removing: /var/lib/tftpboot/s390x/profile_list: C2 \" v. S  S, A
[size=1em]copying bootloaders' }& c) j" ?) L1 g/ a) u
[size=1em]trying hardlink /var/lib/cobbler/loaders/pxelinux.0 -> /var/lib/tftpboot/pxelinux.0( p, p- r2 p" a0 A6 O. o
[size=1em]copying: /var/lib/cobbler/loaders/pxelinux.0 -> /var/lib/tftpboot/pxelinux.0
5 d& ^" D) t+ h" t/ z[size=1em]trying hardlink /var/lib/cobbler/loaders/menu.c32 -> /var/lib/tftpboot/menu.c324 ^( ?' p! i* r2 b! f
[size=1em]copying: /var/lib/cobbler/loaders/menu.c32 -> /var/lib/tftpboot/menu.c32
1 E7 I* E/ p" o3 V& D$ ?6 n4 E[size=1em]trying hardlink /var/lib/cobbler/loaders/yaboot -> /var/lib/tftpboot/yaboot
& m9 [- R# |3 r2 B" |# b) [" [[size=1em]copying: /var/lib/cobbler/loaders/yaboot -> /var/lib/tftpboot/yaboot9 q( [8 l8 f, Y% y
[size=1em]trying hardlink /var/lib/cobbler/loaders/grub-x86_64.efi -> /var/lib/tftpboot/grub/grub-x86_64.efi
7 Q. J+ r3 Q7 _. f2 A2 M: C0 p7 N) f5 r[size=1em]trying hardlink /var/lib/cobbler/loaders/grub-x86.efi -> /var/lib/tftpboot/grub/grub-x86.efi
/ a" W# y# N& z" M[size=1em]copying distros to tftpboot7 E# n; Z+ I, I3 w! _$ x
[size=1em]copying files for distro: centos6-x86_64
. S" K; h, y0 m# K3 e: ][size=1em]trying hardlink /var/www/cobbler/ks_mirror/centos6/images/pxeboot/vmlinuz -> /var/lib/tftpboot/images/centos6-x86_64/vmlinuz& T5 ?# P. J# |, g7 ]
[size=1em]trying hardlink /var/www/cobbler/ks_mirror/centos6/images/pxeboot/initrd.img -> /var/lib/tftpboot/images/centos6-x86_64/initrd.img
) L: I, |' I% |5 m" Z8 g1 a[size=1em]copying images
! o- `, M' {  W% h* }( A[size=1em]generating PXE configuration files9 A' |' L5 H  a! K
[size=1em]generating PXE menu structure! o- Q8 Z5 ?/ g; @( e
[size=1em]copying files for distro: centos6-x86_64
0 z8 o. w- a( }! m[size=1em]trying hardlink /var/www/cobbler/ks_mirror/centos6/images/pxeboot/vmlinuz -> /var/www/cobbler/images/centos6-x86_64/vmlinuz4 q/ n) N& S; \9 g* r7 M7 j2 {
[size=1em]trying hardlink /var/www/cobbler/ks_mirror/centos6/images/pxeboot/initrd.img -> /var/www/cobbler/images/centos6-x86_64/initrd.img; a7 F# N" n: t
[size=1em]Writing template files for centos6-x86_64
  B1 P8 b$ }4 ~9 h9 i" n3 T. B6 n[size=1em]rendering TFTPD files6 k  v" t( @: D# y' S/ e
[size=1em]generating /etc/xinetd.d/tftp* B* T. n8 [9 v6 W
[size=1em]processing boot_files for distro: centos6-x86_645 z( I/ \! S' q0 N9 U2 f
[size=1em]cleaning link caches
3 G7 s/ n7 W: q$ P+ F( {[size=1em]running post-sync triggers
( t( l. ~) w4 V1 g[size=1em]running python triggers from /var/lib/cobbler/triggers/sync/post/*  X* _" n. p) K
[size=1em]running python trigger cobbler.modules.sync_post_restart_services
9 e( E+ H6 U$ _% V' s[size=1em]running shell triggers from /var/lib/cobbler/triggers/sync/post/*7 H5 H' W" ]' o6 K9 n
[size=1em]running python triggers from /var/lib/cobbler/triggers/change/*
4 ]7 ^) i! `3 S4 ][size=1em]running python trigger cobbler.modules.scm_track# b4 C7 Q4 _/ Q2 Z$ B& K' n0 O7 l" v
[size=1em]running shell triggers from /var/lib/cobbler/triggers/change/** L5 R) e/ p& F7 F4 ]. ~; L
[size=1em]*** TASK COMPLETE ***
2 D* ?/ w' n! a# G* ?: ?) w& I+ \

- |1 U: K. a* l; v9 H! a) u" {5 L- B

7 j% V' W2 C/ B( u

查看是否配置成功

[size=1em]1
4 {% d) P% ~9 \0 V# u$ G+ \& u
[size=1em]2

4 ]2 v' b" R1 ?
[size=1em]3
& i% f" F5 o6 @3 n; m
[size=1em]4

6 U9 e4 g$ ]% l- a0 e
[size=1em]5
. c* Y3 q* u6 p  |; m
[size=1em]6

5 B6 A4 f/ U; ~9 j$ e
[size=1em]7

# [5 i# D: ~$ f4 D8 b
[size=1em]8

/ G+ P5 Y8 j/ ^* X0 U
[size=1em]9
4 G* d4 f' k% @; i+ o
[size=1em]10
+ q) h. n8 v0 o. c& J
[size=1em]11

( N5 B+ X! I' I! t( T5 H0 l- O
[size=1em]12

, N2 k9 l6 ~2 P, T% V+ c9 U% [
[size=1em]13
; D% ~/ R( R3 a' w% B7 |+ F) s1 R
[size=1em]14

" Q$ Z) I9 }5 C
[size=1em]15
* i: R, A" l* l# o0 v4 q
[size=1em]16
9 B) U; \3 _/ D3 Z$ ~9 o
[size=1em]17
2 e( U5 F% X: H8 T% b( o
[size=1em]18

3 M# o- J* `9 m. y+ Z
[size=1em]19
3 y. ?5 b* R6 a1 _+ v4 [/ b7 B
[size=1em]20
3 D% o) l+ a- u, f$ G) Z% w, J
[size=1em]21
, @) q# x9 \- c$ Z' m1 S
[size=1em]22
9 c( B! H1 b/ [! P# h
[size=1em]23
3 w/ n6 B/ B' ~8 O1 H; t
[size=1em]24

8 P2 p2 T3 o7 D4 R% u4 q) x
[size=1em][size=1em][root@cobbler cobbler]# cat /var/lib/tftpboot/pxelinux.cfg/default
( B9 D, r# S0 q; i% \[size=1em]DEFAULT menu4 [$ a9 s" d4 @0 S
[size=1em]PROMPT 0
. ^- m) o4 E+ I- i0 R) A[size=1em]MENU TITLE Cobbler | http://cobbler.github.com" e$ `; \5 M; ?
[size=1em]TIMEOUT 200
. t) _# ^. M, Q- }/ n& t' t" h[size=1em]TOTALTIMEOUT 6000
, B: S' F8 |' j# Q3 ~2 y[size=1em]ONTIMEOUT local5 G( E% R7 C) Q1 L

- }* @" B: ~# s6 \, e[size=1em]LABEL local
2 r* m% U, X' ]- P" R& [[size=1em]        MENU LABEL (local)
, |% c9 e' J( p# |[size=1em]        MENU DEFAULT
; s; n% `7 ~. V[size=1em]        LOCALBOOT -1
) o+ u" Y8 s! K4 l! C0 i
$ T: M' [1 }. O[size=1em]LABEL centos6-x86_64
8 c3 P+ N' q* f- {7 R[size=1em]        kernel /images/centos6-x86_64/vmlinuz
/ ~0 E4 K4 t: L, f' n0 `[size=1em]        MENU LABEL centos6-x86_641 a, }' {- w. h& d& T" y5 l
[size=1em]        append initrd=/images/centos6-x86_64/initrd.img ksdevice=bootif lang=  kssendmac text  ks=http://192.168.3.100/cblr/svc/op/ks/profile/centos6-x86_644 d+ k; O: |/ k
[size=1em]        ipappend 2
9 X& ~5 x+ Q4 y' E; |: x( X- ?/ l* k' G- j; H7 |
[size=1em]LABEL centos6.6" ?$ D) r0 ~. ^3 A( N$ T& X, E: }! ?
[size=1em]        kernel /images/centos6-x86_64/vmlinuz; X7 c3 W6 m& t* T2 T+ Q
[size=1em]        MENU LABEL centos6.6
. Q- z6 D& t2 I5 z- X[size=1em]        append initrd=/images/centos6-x86_64/initrd.img ksdevice=bootif lang=  kssendmac text  ks=http://192.168.3.100/cblr/svc/op/ks/profile/centos6.6
6 _% ?) u1 N: ?* w; Z3 Y( N[size=1em]        ipappend 2
( `3 b8 C* e  m) {) P
9 A/ g; `& {* m8 ^( ~/ }2 X
2 r6 `3 d7 f9 d( C
/ p% j6 }( a: B! F+ h

开始安装

* a2 }- _: d% B) B/ N* h4 J
                               
登录/注册后可看大图
+ t) }* b3 ?& q& i: q4 q( u

7 ?$ w8 C8 W+ e( P9 y6 I
                               
登录/注册后可看大图


/ `" ^1 a. D9 i: Y2 m; w% ?, k                               
登录/注册后可看大图

7 N. Z, I, f8 O- T
                               
登录/注册后可看大图

' {" {+ R. ^8 @3 q2 Y
                               
登录/注册后可看大图


  ~/ E8 d; |( ~, q! G/ W1 I


; c8 a, Y3 @& v- g$ v4 D% J
  • 配置cobbler安装Centos7

    % y% T& o, u5 W9 C, t$ a% W
[size=1em]1

# n. d8 g: Y6 s0 z  Q. O
[size=1em]2

+ Z+ U0 N( a6 B, K. F, H" K5 X4 _
[size=1em]3

' e  g0 p4 _4 V3 V2 s* O
[size=1em]4
6 B; M) B$ v3 N$ `* i, @; C- B
[size=1em]5
1 k, V; C1 f  F9 k/ `: G: G
[size=1em]6
2 R1 h/ w) ]/ B: t6 w, S2 I+ x' Q2 V
[size=1em]7
. j8 x6 T! r% F" U& f
[size=1em]8

1 v! j% `8 n8 h; I1 y
[size=1em]9

) H  m! I' l/ R( M
[size=1em]10

1 e7 @$ p$ p) w1 @# @% `* L
[size=1em]11
( O. s  z! I! ?% X  H& z- e
[size=1em]12
, f3 K8 J/ j7 a) ]' Z) S" I! u) u; T
[size=1em]13
& o. h  |* H9 U0 t- G9 k/ z# O' o% C
[size=1em]14

$ J, a" m4 I5 _% n: e
[size=1em]15

* f) J1 i- k) V" s' Q+ U$ G
[size=1em]16
: D. S/ [; A4 k. X* c% E
[size=1em]17
7 c- T" |8 w" E) L0 b- z
[size=1em]18
  V. r$ {- S8 J, q: n7 u- f# o
[size=1em]19

/ N3 C& z; P& h: F! b
[size=1em]20

0 P8 C! `: b. C, E: n! W# G( k
[size=1em]21
5 `) g9 g$ X) W5 u2 M# D/ V
[size=1em]22
2 i+ i$ E  P( \
[size=1em]23
2 ?$ M4 k* v  l5 g; j
[size=1em][size=1em][root@cobbler ~]# cobbler import --name="centos7" --path=/media/centos7
) @  H+ ~) D: h0 A' Q  a[size=1em]task started: 2015-08-22_014024_import
+ h; l9 g" r2 c. l  |[size=1em]task started (id=Media import, time=Sat Aug 22 01:40:24 2015)! |7 R- H; ~) _2 u( ^" [$ E  O: D
[size=1em]Found a candidate signature: breed=redhat, version=rhel6
- E# B3 X+ Y) z) @[size=1em]Found a candidate signature: breed=redhat, version=rhel7' @7 W; b2 T( r3 T2 _1 e
[size=1em]Found a matching signature: breed=redhat, version=rhel79 N8 W9 C8 e# Y' @
[size=1em]Adding distros from path /var/www/cobbler/ks_mirror/centos7:5 i: z/ ^( B$ y# \
[size=1em]creating new distro: centos7-x86_64$ \" B- `0 b2 m5 p! u2 k, a
[size=1em]trying symlink: /var/www/cobbler/ks_mirror/centos7 -> /var/www/cobbler/links/centos7-x86_64; Q( c- }7 ~& S5 z2 O
[size=1em]creating new profile: centos7-x86_64
* E3 `2 c$ H; K# r[size=1em]associating repos
4 G8 l" C& q; X* D2 j[size=1em]checking for rsync repo(s)
2 S1 I3 a9 Q4 X9 S" C4 c4 E8 P( L[size=1em]checking for rhn repo(s)2 @6 Q0 X1 N% c" o
[size=1em]checking for yum repo(s)
3 }. ]& ^$ z' l- W6 v7 q! ]) p9 e[size=1em]starting descent into /var/www/cobbler/ks_mirror/centos7 for centos7-x86_64
. s3 f: s* @! Q% ^1 L- {* b[size=1em]processing repo at : /var/www/cobbler/ks_mirror/centos7
' G9 H: D6 t! J' A) B[size=1em]need to process repo/comps: /var/www/cobbler/ks_mirror/centos7
, K! o) x+ R6 f$ O) |6 E5 Z7 m[size=1em]looking for /var/www/cobbler/ks_mirror/centos7/repodata/*comps*.xml( T2 O/ E; |) F5 j: O! G/ \
[size=1em]Keeping repodata as-is :/var/www/cobbler/ks_mirror/centos7/repodata
5 Q9 y, a. v4 \- P+ q: U" z[size=1em]*** TASK COMPLETE ***
3 D% r' c/ w7 W1 w8 Q[size=1em][root@cobbler ~]# cobbler distro list
0 L' U* x* B& A  J( q! H[size=1em]   centos6-x86_64
2 J0 a! T/ v+ Y- S% z4 j) o# ]! }[size=1em]   centos7-x86_64
; z" o1 C9 t# S/ Q
9 Q" T% ?; U* W8 H/ {1 [

$ _' i; S5 e$ Y6 m
" ?9 E$ s* |) O/ u) W9 S7 d% `

出现以下问题是要将做好的ks移动到 /var/lib/cobbler/kickstarts/  这个路径是专门存放ks文件模板的

[size=1em]1

2 s5 g( r8 S2 M
[size=1em]2
- {; R" h" u! q% k7 |4 W, ~: Y
[size=1em][size=1em][root@cobbler ks]# cobbler profile add --distro="centos7-x86_64" --name=centos7 --kickstart=/root/ks/centos7.cfg
# q/ _1 Z4 ?! O4 g[size=1em]exception on server: 'Invalid kickstart template file location /root/ks/centos7.cfg, it is not inside /var/lib/cobbler/kickstarts/'
' i$ P3 d# S2 ~9 r4 Z* e" x4 e+ c! O* V
$ S! I' a( v/ O* k# F% N# ?0 }
) |4 f2 E: r! F% p
[size=1em]1

- O. n: ?4 i9 N: G; G' N
[size=1em]2

. q6 ^/ M! y8 p
[size=1em]3
" n6 H- _; a6 r% R& P2 h
[size=1em]4

8 b3 }( m& m% x8 H( T3 `
[size=1em]5
/ ^; a3 E) I6 S. y3 h
[size=1em]6

  ?, b) Z7 \. ]' @; m6 r
[size=1em]7
) l6 s, ]$ p0 g: G" m
[size=1em]8

! v! L" ]5 I0 a. D' X7 ^* c
[size=1em]9
# G* O5 l( Y" u" q' d4 T* f! ~% ^* g
[size=1em]10
6 k, w" o- i5 s" G( P
[size=1em]11

) o  J# T; x0 i$ K! u% o) \% M
[size=1em]12

1 b3 Z9 N: `# }. R3 q1 l
[size=1em]13
( P8 ^# U/ _* k8 b- W
[size=1em]14
$ Z. Y9 F6 b9 k
[size=1em]15
: Z2 X1 `3 P# d4 q
[size=1em]16

2 O6 l4 u% ?! J6 f. I: v: o
[size=1em]17
( @; [+ ]+ G7 ]
[size=1em]18
+ t; \1 V  r& `4 B' ^* V
[size=1em]19
, @# [) [) ~7 i) d  R& u
[size=1em]20

5 ?$ ~. `; i  H4 b; k2 M) w
[size=1em]21
( Y$ s: |9 a! K8 C# o2 a/ d
[size=1em]22
* V3 s& d( r7 U8 X+ u3 T- |
[size=1em]23
. u) }+ |" M8 C" u1 U8 ]5 X) \& I
[size=1em]24

( Q7 n( G4 a8 P
[size=1em]25

3 a0 {9 J5 w' i0 m( J% B5 j
[size=1em]26
6 q" i* O7 i, _- I" D5 {
[size=1em]27

2 X- g# Z, s$ k# ^$ M! n
[size=1em]28
1 D1 O6 {7 M2 F9 M5 v6 r" J
[size=1em]29
7 m0 ^1 a' [8 y* [! Y3 }, e5 |  C2 Z7 ~
[size=1em]30

2 t4 G% Q& D4 Z
[size=1em]31
" y# }  \5 |# c' N; Y. j5 K# M+ q
[size=1em]32

. c% h- k6 Y% P" [- M
[size=1em]33
/ i# N. y0 h/ r( {7 Z2 r
[size=1em]34
- H- l. i; f& |6 H% L( U2 V
[size=1em]35

4 o! ]4 M+ Y" ^6 H! {) g
[size=1em]36

+ h8 f' S6 \6 V  o/ A
[size=1em]37

. C2 b4 A" L3 ]* {# g
[size=1em]38

7 e8 \% M: ]; |
[size=1em]39
$ m6 b6 X7 Q9 Q) V8 b! X  }
[size=1em]40

  f5 S" }4 K* Y# E
[size=1em]41
8 F! \# }3 Q( {- E9 w
[size=1em]42
/ B: k: i; Y5 o) E. g% i; e
[size=1em]43
% o  F4 `3 j1 ~4 z4 ]9 {
[size=1em]44
( E" r- {: d/ h  Y
[size=1em]45
+ [  x" m! u: p* O! H; Q
[size=1em]46

5 l" K0 V; S! f2 j9 M3 @% F
[size=1em]47
( G& q, U6 v( O. C6 _3 v
[size=1em]48
: ?, l& o3 U$ i$ f9 j- B6 ?
[size=1em]49
0 }  S. a& z/ I
[size=1em]50

! e' E$ i+ D. C( [6 [
[size=1em]51

* O8 h; J/ A/ T& w9 ?5 t$ q
[size=1em]52

& C! W, ]$ ^3 Y
[size=1em]53
) o0 L& R6 l) ^8 p" i  _, U+ F
[size=1em]54
. Q* f6 r3 r1 A! r( ?+ V. @
[size=1em]55
2 z2 u  [! Y9 C7 K
[size=1em]56
' C6 {) }. C; l
[size=1em]57

2 f( v/ _: s) y4 T- H
[size=1em]58

1 \3 E4 w9 J) \1 Q. `1 p" M
[size=1em]59
+ }: ~3 i4 k/ J5 o) x% v6 J9 L4 A
[size=1em]60
: s9 E1 P0 Y! U5 m1 O% V
[size=1em]61
' R7 ^8 u/ `5 l8 r
[size=1em][size=1em][root@cobbler ks]# cobbler profile add --distro="centos7-x86_64" --name=centos7 --kickstart=/var/lib/cobbler/kickstarts/centos7.cfg
& O  i4 {) e& e/ ?[size=1em][root@cobbler ks]# cobbler sync
( T7 e7 S7 `1 M( s. z1 U& E. t! b[size=1em]task started: 2015-08-22_015615_sync9 P- D$ T+ E) |+ S0 n
[size=1em]task started (id=Sync, time=Sat Aug 22 01:56:15 2015)4 y* Y9 g/ X. X7 ~; L8 f5 `
[size=1em]running pre-sync triggers2 |/ a1 [! [/ }) h( P( C) u
[size=1em]cleaning trees: T+ `$ t$ J$ l0 g( c
[size=1em]removing: /var/www/cobbler/images/centos6-x86_64
. }! S+ H* b$ Y" x1 a[size=1em]removing: /var/www/cobbler/images/centos7-x86_64
3 e9 t4 d& t% s8 `+ g[size=1em]removing: /var/lib/tftpboot/pxelinux.cfg/default
( H) R; F1 l2 f4 h[size=1em]removing: /var/lib/tftpboot/grub/images
4 c( i! ]: P: H[size=1em]removing: /var/lib/tftpboot/grub/grub-x86_64.efi' T4 g7 y# f6 e( c: j4 E
[size=1em]removing: /var/lib/tftpboot/grub/grub-x86.efi
! K$ e, k' ]6 u" z& z[size=1em]removing: /var/lib/tftpboot/grub/efidefault/ p3 K" D* X* R  B
[size=1em]removing: /var/lib/tftpboot/images/centos6-x86_649 V. m6 E9 N$ @1 ?6 i! \
[size=1em]removing: /var/lib/tftpboot/images/centos7-x86_64: ]4 D5 R- A/ Z; j7 v8 U* C
[size=1em]removing: /var/lib/tftpboot/s390x/profile_list
3 P- u* \' d. K% n[size=1em]copying bootloaders+ H, b+ [2 l- O
[size=1em]trying hardlink /var/lib/cobbler/loaders/pxelinux.0 -> /var/lib/tftpboot/pxelinux.0
' M: \: I/ J) u7 ~+ O  d[size=1em]copying: /var/lib/cobbler/loaders/pxelinux.0 -> /var/lib/tftpboot/pxelinux.0
3 x; y; }- ]$ u[size=1em]trying hardlink /var/lib/cobbler/loaders/menu.c32 -> /var/lib/tftpboot/menu.c32
" O5 ?3 z: x, x, T& _[size=1em]copying: /var/lib/cobbler/loaders/menu.c32 -> /var/lib/tftpboot/menu.c32, W3 k) [7 B/ F: Y4 E
[size=1em]trying hardlink /var/lib/cobbler/loaders/yaboot -> /var/lib/tftpboot/yaboot1 u5 l$ m! J/ F
[size=1em]copying: /var/lib/cobbler/loaders/yaboot -> /var/lib/tftpboot/yaboot
7 B( I7 H. D  b5 I7 J; p[size=1em]trying hardlink /var/lib/cobbler/loaders/grub-x86_64.efi -> /var/lib/tftpboot/grub/grub-x86_64.efi3 o: h3 Q4 }1 ^9 Y* u
[size=1em]trying hardlink /var/lib/cobbler/loaders/grub-x86.efi -> /var/lib/tftpboot/grub/grub-x86.efi: ^) P0 M3 K: k$ ~7 l! \
[size=1em]copying distros to tftpboot4 }3 N$ T$ s; c3 g# ?; b+ t' b
[size=1em]copying files for distro: centos7-x86_64" u/ n& }3 h2 o
[size=1em]trying hardlink /var/www/cobbler/ks_mirror/centos7/images/pxeboot/vmlinuz -> /var/lib/tftpboot/images/centos7-x86_64/vmlinuz% P5 N5 n( o# g  m  @
[size=1em]trying hardlink /var/www/cobbler/ks_mirror/centos7/images/pxeboot/initrd.img -> /var/lib/tftpboot/images/centos7-x86_64/initrd.img7 O# @* [6 R8 l, c  C0 N* Y  p
[size=1em]copying files for distro: centos6-x86_647 j: k! G# V  |1 {7 n
[size=1em]trying hardlink /var/www/cobbler/ks_mirror/centos6/images/pxeboot/vmlinuz -> /var/lib/tftpboot/images/centos6-x86_64/vmlinuz! z) A; K7 }8 _
[size=1em]trying hardlink /var/www/cobbler/ks_mirror/centos6/images/pxeboot/initrd.img -> /var/lib/tftpboot/images/centos6-x86_64/initrd.img; p8 G3 J7 T7 H% n. E8 b
[size=1em]copying images+ A. M* l/ H6 m4 `9 n
[size=1em]generating PXE configuration files' X+ J  q/ X, z2 u* e, q, J9 O/ U
[size=1em]generating PXE menu structure% `  u7 m4 H- ]/ x" G% v
[size=1em]copying files for distro: centos7-x86_64
; {8 {; h6 \- {5 f) S. U8 W- {[size=1em]trying hardlink /var/www/cobbler/ks_mirror/centos7/images/pxeboot/vmlinuz -> /var/www/cobbler/images/centos7-x86_64/vmlinuz
% l' L' y/ U9 f1 H[size=1em]trying hardlink /var/www/cobbler/ks_mirror/centos7/images/pxeboot/initrd.img -> /var/www/cobbler/images/centos7-x86_64/initrd.img7 y; N3 v1 e" F7 ]- X$ l/ c
[size=1em]Writing template files for centos7-x86_64
$ b0 |7 t+ i# z* G2 w8 ~[size=1em]copying files for distro: centos6-x86_64
# _4 V  T! p6 R[size=1em]trying hardlink /var/www/cobbler/ks_mirror/centos6/images/pxeboot/vmlinuz -> /var/www/cobbler/images/centos6-x86_64/vmlinuz1 d+ F6 a* O6 U5 m
[size=1em]trying hardlink /var/www/cobbler/ks_mirror/centos6/images/pxeboot/initrd.img -> /var/www/cobbler/images/centos6-x86_64/initrd.img
! N1 z3 z2 r/ |, K8 n  v$ g& z[size=1em]Writing template files for centos6-x86_64( U: h. I) Q9 e( |9 h$ J% }2 @
[size=1em]rendering TFTPD files
0 i# D( S2 S0 H: ]# U* `# X[size=1em]generating /etc/xinetd.d/tftp6 e6 ^/ {1 _) ]" {0 w4 l
[size=1em]processing boot_files for distro: centos7-x86_64
( v8 g' k8 u6 l; O7 `[size=1em]processing boot_files for distro: centos6-x86_64+ y; ]& Q; q7 U7 W8 b5 x5 ]
[size=1em]cleaning link caches
+ v/ t1 l* e' P+ n4 s[size=1em]running post-sync triggers8 t7 Z$ ]% q# r( G
[size=1em]running python triggers from /var/lib/cobbler/triggers/sync/post/*: n5 x4 c. J+ o8 I' ^2 Q
[size=1em]running python trigger cobbler.modules.sync_post_restart_services, Y; F# z9 s7 Q8 d$ T
[size=1em]running shell triggers from /var/lib/cobbler/triggers/sync/post/*% Z9 r: M. w/ t4 X6 \3 R/ a
[size=1em]running python triggers from /var/lib/cobbler/triggers/change/*$ O# P8 K4 [7 C/ I, R1 l
[size=1em]running python trigger cobbler.modules.scm_track
, I4 O, i4 @9 z[size=1em]running shell triggers from /var/lib/cobbler/triggers/change/*
. O: u3 Z8 c* ^! t5 ^. R% L[size=1em]*** TASK COMPLETE ***. B+ `; Z8 u3 z. m' [* O1 Q
[size=1em][root@cobbler ks]# cobbler profile list
; L; F: w; r& X8 R6 J[size=1em]   centos6-x86_64
0 X) d* B( z0 {4 Z( _! w( g[size=1em]   centos6.6; T# ]$ o4 `* P+ c* X/ N
[size=1em]   centos7
6 B6 @3 @! j7 r$ r[size=1em]   centos7-x86_64
* q2 h8 q& y6 [" T1 B1 i# ?0 q. ]9 l( k; B: ?: D# }  f
4 f3 e3 T+ U* i

: g  r# x; u/ g  t7 M

开始安装


/ o0 a& F2 f! v) \                               
登录/注册后可看大图

0 ~4 A* R6 t1 [6 D) u( K* I, L
                               
登录/注册后可看大图


2 M' c9 v* f1 g! I                               
登录/注册后可看大图

5 @8 l- ]) g7 b0 E4 }' P( h' C
                               
登录/注册后可看大图

9 |. Z3 R3 t4 O# U4 H, t
% o7 w1 B$ d1 I; D8 O# `. P) B+ R

附上我自己的ks文件参考

[size=1em]1
+ w1 a0 n" H* v  [
[size=1em]2
' g  C2 K& h/ Z* t
[size=1em]3

* P6 L9 t" R4 l1 c
[size=1em]4
# ~/ P/ U# H" o
[size=1em]5
5 x9 ]% u) N5 L4 L
[size=1em]6

  f! q  b) p& e$ d
[size=1em]7

( @% u: t6 }" y0 w
[size=1em]8

5 Z) {( g0 M4 w: L1 z) l
[size=1em]9
! p! ?6 @8 L3 x$ G- [
[size=1em]10

' ?/ k1 D$ G: [; H2 e
[size=1em]11
% c* A; ~6 l; @8 H5 o& U
[size=1em]12

0 T+ ^2 a& ]) b: ^! f+ w$ k/ q
[size=1em]13
# g$ W/ S& I" a' S9 r) U9 k+ v
[size=1em]14

( U9 B5 O' I2 K& E9 `
[size=1em]15

2 F7 d( q1 r, m7 B- }
[size=1em]16

" q+ E) e' h. W0 i$ m3 g
[size=1em]17

) H% \* t& b% C7 X& o- F# s
[size=1em]18

% d; n9 o/ ?8 C  U7 ?/ n0 P) P# S
[size=1em]19

2 `9 |, x; g# m+ T
[size=1em]20

' ~6 [- O- {/ Q4 Z& F; _
[size=1em]21
2 N4 O3 f! B9 `+ W: q% @' h
[size=1em]22

  s; S' K  X, x
[size=1em]23
$ r  e% a( E) g( G
[size=1em]24
) `5 o" r5 g$ f! j/ {, d$ U0 |0 ?9 N
[size=1em]25

$ }3 x+ ~- m" S) ?3 F! a7 Z/ _
[size=1em]26

  Q; W" f. N) `0 p$ [; U
[size=1em]27
7 J9 j: N( Z( f
[size=1em]28

6 i+ k6 t5 l; c: J. l" x, g
[size=1em]29

3 o5 l- D9 F; }, N& J
[size=1em]30

" y% l: F& V. ~3 f
[size=1em]31
4 m  D- F5 d  h6 ~* V
[size=1em]32
) e* i: E5 B1 b- }
[size=1em]33
2 H( ]* {8 z$ {
[size=1em]34

. Q0 |: k( S- C; u' {5 ^
[size=1em]35
2 ?8 R+ P1 |+ ~" [" S: S: k
[size=1em]36

# j& ~4 y* m) }8 m
[size=1em]37

, Y( s) D, ^* ?0 _
[size=1em]38
5 u* @9 C  U: B: q2 A
[size=1em]39

) W4 u+ }2 l  V! s- v5 O" l
[size=1em]40
) b* ~9 j" `/ M& M; `  ]3 s
[size=1em]41

5 j$ o) v- I9 z
[size=1em]42

( \6 J- [- O5 G5 T" T! L
[size=1em]43
& G3 `/ M5 y- T* h1 t
[size=1em]44
& a, {: q7 ~: Q# p
[size=1em]45
9 [# @& N+ r* b0 m7 z- a* G
[size=1em]46
  \" r7 w& I0 C4 `' H
[size=1em]47

% C1 m' @# ^- A* |$ Y
[size=1em]48

  E2 k3 O4 H: X+ d
[size=1em]49

6 S9 _) }+ |2 @( L" p3 I8 x
[size=1em]50

4 N' k( b* E9 N. r
[size=1em]51
3 Y. \. z3 r1 M. {/ n  w
[size=1em]52
8 E; p/ j% r- |2 h' T; w0 s
[size=1em]53
0 y8 }) x  }" i- j0 A% {  r% Z
[size=1em]54
5 d) n. h6 n' E  e) N+ o# _* Y
[size=1em]55
- d3 h7 S/ n* e" x. |/ ^
[size=1em]56
5 U! O# r1 C2 p, c1 {: G0 Z
[size=1em]57
6 U: ?; H) O3 J  S; S
[size=1em]58
& k- J  t7 E+ m, m7 c$ {" \' X6 U
[size=1em]59
% e7 m* K( e* i0 B
[size=1em]60
  c0 J  S% n8 Z6 z9 ]  u5 E" v( V7 G$ U
[size=1em]61

) p' p: j# L2 |- d' `
[size=1em]62
9 H0 f% G0 h  @4 s4 p8 L
[size=1em]63
2 x+ k/ Y' t5 Y! J& Y
[size=1em][size=1em][root@cobbler ks]# cat centos6.cfg
" O6 N/ d# \" E0 F5 Y! N[size=1em]#platform=x86, AMD64, or Intel EM64T" y* P* }- |* {# I* O* E
[size=1em]#version=DEVEL' O2 F+ o; t$ y) O' j
[size=1em]# Install OS instead of upgrade
; v6 R' o' h  |[size=1em]install
8 y1 k; r" t& c5 X3 ~[size=1em]# Keyboard layouts/ ^' a0 c0 Q$ h$ k9 [% k" H
[size=1em]keyboard 'us'# Reboot after installation! k; {) z+ y( s2 Q# R
[size=1em]reboot7 h1 Q8 T$ C% s% G- e: y7 Y% r: G1 V
[size=1em]# Root password2 A5 {5 S( j  ]6 i2 C
[size=1em]rootpw --iscrypted $1$JrbIN3YW$buJKv8Y7FfZhCEhOg/eD01
* ]  ]# ^0 }) h5 L9 o[size=1em]# System timezone
' v8 T) I; i* y; B[size=1em]timezone Asia/Chongqing --isUtc5 ^7 Y( s  L+ `: b1 F; }. Q
[size=1em]# Use network installation
1 t6 c8 n! \( f* m. l& E$ _[size=1em]url --url="http://192.168.3.100/cobbler/ks_mirror/centos6/"! k9 g% Z; s5 f7 j
[size=1em]# System language6 {+ j- W' i! l- ~9 S
[size=1em]lang en_US5 Q' |& c& W& N
[size=1em]# Firewall configuration  W7 v# n0 J5 k  a4 s
[size=1em]firewall --disabled& G  P, r9 z" e- `
[size=1em]# Network information
8 b) y( i( y0 C' E+ _: _[size=1em]network  --bootproto=dhcp --device=eth0
8 b+ ]2 @; ^4 X% v7 c- _& U2 g. K[size=1em]# System authorization information% [, t' J, P* I/ g6 g: A: O
[size=1em]auth  --useshadow  --passalgo=sha512
8 l/ W- }7 }9 L, _5 T, n[size=1em]# Use graphical install. E, F3 u8 C. V  ?
[size=1em]graphical
9 o. V, p) L; e- J, Y& }% V. ^[size=1em]firstboot --disable
3 ~, Y) ^! }$ L" y# [! W& |$ e' u[size=1em]# SELinux configuration8 l( e. G( J4 f
[size=1em]selinux --disabled
2 c1 Y+ K; r  x' I[size=1em]# Installation logging level
& ]3 v, h1 G4 s  H[size=1em]logging --level=info9 F% |; \, u( V  ~, @! u- M
[size=1em]# System bootloader configuration; i! ~+ b, F; K5 V
[size=1em]bootloader --append="crashkernel=auto rhgb quiet" --location=mbr --driveorder="sda"! E6 q' T$ q6 s" r2 l9 K2 i& ^
[size=1em]# Clear the Master Boot Record
4 c' R9 d5 V* N[size=1em]zerombr
1 }/ e+ `' n- @[size=1em]# Partition clearing information
) |9 p4 Z% D' S. X: D" K) B[size=1em]clearpart --all --initlabel 9 S' t3 `& d& k; K% p
[size=1em]# Disk partitioning information
3 q/ ?# Q5 |3 m1 p[size=1em]part /boot --fstype="ext4" --size=500
- c5 i6 J; q( s7 c[size=1em]part pv.008002 --grow --size=14 {$ w1 b8 S6 G* n% R& C

; v) D2 `6 {/ q. a/ V[size=1em]%packages
; {2 t7 |" G" o" z/ _+ [; _1 u[size=1em]@base. [6 O% i: F: [0 K+ E8 j% h
[size=1em]@basic-desktop
5 h- D* Y% S1 V7 R[size=1em]@core- K  s$ \$ P1 I! n5 t! F, W
[size=1em]@debugging5 v6 Z" x, @" o$ O+ i
[size=1em]@desktop Platform Development" C! g- |4 g6 ?. r$ j
[size=1em]@desktop-debugging
+ o# [& q3 R5 z8 n! e6 K- e[size=1em]@desktop-platform5 E+ t- ?/ q2 K6 r
[size=1em]@development tools! T7 b3 @0 D+ Q9 |8 }
[size=1em]@directory-client; h' \( G& y4 [1 |
[size=1em]@fonts4 ]7 l& X4 `  r
[size=1em]@input-methods
9 }* e- Y0 ~1 J' x& A[size=1em]@internet-browser% {& o5 S' U6 c3 r3 b2 L
[size=1em]@java-platform* V% l# W; ]# L- w: R/ ~
[size=1em]@legacy-x( [# q" t9 `6 x8 ~
[size=1em]@network-file-system-client
: v, W$ J8 Y* {3 J: F( L8 v[size=1em]@print-client  z$ R' {0 a: w# W8 _( C
[size=1em]@remote-desktop-clients
# V. d* d4 Q6 y' V& f[size=1em]@server Platform Development4 \4 L! v# K- s& U# a5 m
[size=1em]@server-platform8 R. O5 |# D: w% s/ H: c2 q
[size=1em]@server-policy
  E7 a0 ]# y2 C. T( ][size=1em]@x11
4 j! m0 X* r* S  ?# c+ g- D/ }6 ]' `# A8 y1 L' q( }
[size=1em]%end- C) z* B) ?* T/ F4 R( G& ?, K8 w
, a, P+ Q; ~1 a& j/ g

4 u9 K3 g, ]. S+ @' [' B
4 `1 b: y2 Q/ ?* L7 R" [$ t

centos7 ks文件

[size=1em]1
6 @  _" r, c6 r# W
[size=1em]2

0 r4 `  F8 f! j/ k$ p& \
[size=1em]3
0 M6 b; N1 F9 i) Y5 Q. Y
[size=1em]4
( o6 t- }# f( ]2 x/ R
[size=1em]5
0 G3 q7 ?, O+ H# z5 ^
[size=1em]6

( D1 {( l/ A* Z3 c0 r- [, y
[size=1em]7

0 d9 M! A) |3 ]6 N
[size=1em]8
' V1 o" l/ m( h% b7 ]& k' [. E" t2 p
[size=1em]9
. b4 u: p+ N/ m1 r
[size=1em]10
) F$ j3 q( u# A0 ~2 F
[size=1em]11
; ^- e  W0 m) o' ~) s4 i
[size=1em]12
" M- t& g' N/ d# J' P
[size=1em]13
  @: f* E# t3 e+ d, H9 S5 @' N  S1 M
[size=1em]14

! U8 t) r2 r( v' n* X. U
[size=1em]15

. Y, X/ X: d6 H( t
[size=1em]16
# n  @, f9 b% y
[size=1em]17

7 M  c! a- Z% W; R/ B8 k3 A
[size=1em]18
' M# b& o& S! ?' N' G3 r3 b6 m
[size=1em]19

. u2 R9 m+ ]. b! Q( L) }* m( ]& X
[size=1em]20
1 q+ J1 V& K/ l+ ~8 u' n
[size=1em]21
! _7 G0 `$ ~6 k
[size=1em]22
' u) X2 M# F* j+ ^; k+ N, m
[size=1em]23

: h: o% N6 _+ U4 j* V
[size=1em]24
# r/ e5 |( [6 t1 Y; |: D* l
[size=1em]25

: A, R4 G# \6 l7 c
[size=1em]26

9 ^' e/ b- }+ ]$ s
[size=1em]27
! ^9 B* U) z  t
[size=1em]28
6 \# n5 i* |" q- U+ l2 X% z6 n
[size=1em]29

* {1 R1 l* L  c! a5 E
[size=1em]30

0 J/ T: c& |3 j1 Z5 v
[size=1em]31

& T4 W" Q. S$ M
[size=1em]32

1 X8 T3 v! ~% O, C& b8 @7 x
[size=1em]33

  i/ p5 y# ~1 T* x9 ]
[size=1em]34

% V$ A1 ?4 y3 v# G5 y
[size=1em]35
+ ]  m9 L9 h" Y0 b
[size=1em]36
) i6 O* Q& ~1 z' V* v5 u9 o
[size=1em]37
+ t5 Y  p! o5 t/ @
[size=1em]38

( O  G! V4 A6 v
[size=1em]39

+ n7 l9 t0 [5 Z& D& q
[size=1em]40

! \+ g9 N# h2 X5 W3 V" L" A
[size=1em]41

2 w1 L# s& B% r! M) I' y5 G
[size=1em]42

% \+ z% ?5 _# V. }+ }% P
[size=1em]43

. y% G, [2 i5 V. p! u! A8 m* Y3 s
[size=1em]44

/ k" U/ k  B2 c; s9 i) I( Q- R
[size=1em]45
. V, C1 ]) f- p
[size=1em]46
( p" ~' A3 u! O. T, I$ X2 f
[size=1em]47

+ H& b0 |6 |1 P
[size=1em]48
  N( {, Z: f1 X- O
[size=1em]49
7 e2 Z" U7 m# H5 g* [
[size=1em]50
; e5 Y$ b5 z% H( B: L$ V
[size=1em]51

0 L+ Q5 i" f5 D7 g; V
[size=1em]52

: `8 K4 U$ O' K3 `# Y+ j! X! V2 ~; |
[size=1em]53

4 K8 n4 R& p$ R
[size=1em]54

3 u: l+ g( b$ K# K8 S9 U
[size=1em]55

  Q$ D' p( w5 d+ E5 [
[size=1em]56

) T1 V6 x4 C+ @' ]' A
[size=1em]57
  ]. v; C) H+ v
[size=1em]58
% W( T0 E; {0 W
[size=1em]59
3 ?' M2 X* s3 w+ G7 p
[size=1em]60
) j: D6 ~* f/ f  f/ R' w
[size=1em]61

8 k/ x( y& B8 o. a* O% K
[size=1em]62
! L* C2 }" x; `; l, t4 U% y
[size=1em]63

% X: X6 n# b6 R% b; o$ r
[size=1em]64
& \; i& `; y& N  ^" b0 f5 \1 }
[size=1em]65

1 d& d0 q8 o5 R& e) s
[size=1em]66

: j, t) u, H* l6 |; c$ w8 T. z
[size=1em]67

5 N% ^2 c. q+ s& c
[size=1em]68

) J3 W# V; ^4 Y3 E% C( ]9 d/ m
[size=1em][size=1em][root@cobbler ks]# cat centos7.cfg
% G4 n2 `$ @8 g; C4 t[size=1em]#platform=x86, AMD64, or Intel EM64T
/ G9 H, |# w9 }7 `5 u[size=1em]#version=DEVEL
3 {$ _2 G/ @8 v% c3 w( I' I4 c- c! V[size=1em]# Install OS instead of upgrade
, M; q2 Q0 d' Q  W[size=1em]install
- S' ]( z' P9 Q) l& H[size=1em]# X Window System configuration information. R# X; k8 |0 N; S
[size=1em]xconfig  --startxonboot2 E7 ?7 {0 z$ c- p' \3 M
[size=1em]# Keyboard layouts
3 l4 J8 Q$ E( j9 X[size=1em]# old format: keyboard us
/ c: E3 o, ]) i5 U, I9 Z[size=1em]# new format:. N5 d* R: N7 |& t% h1 @
[size=1em]keyboard --vckeymap=us --xlayouts='us'2 ?0 K( N- ~4 H! e( e& Z9 l
5 f, T. e$ i: W/ b3 ?  A# R" e
[size=1em]# Halt after installation
/ z% T- q3 I7 ?, w5 g' u; H[size=1em]reboot
! U& j5 y/ L2 Z# R$ d; ]+ n[size=1em]# Root password
+ O  W" G( I6 g7 M[size=1em]rootpw --iscrypted $1$L7lKtlWj$DvBzrvndeOQd7EHfRGOnj/
( o4 s' K7 f9 ]) E: m- q* H[size=1em]# System timezone
( I- i0 ]" ^0 A/ H& V6 g: x* z[size=1em]timezone Asia/Chongqing --isUtc --nontp- W% o, `8 {' ~1 c
[size=1em]# Use network installation
) @1 ]3 G! x5 D& N1 a1 R' O: p& ]3 X9 n[size=1em]url --url="http://192.168.3.100/cobbler/ks_mirror/centos7/"
5 g4 R% m% L! d" ?. R& d[size=1em]# System language1 `3 J0 t- y* O, g# }
[size=1em]lang en_US --addsupport=zh_CN.UTF-83 b( F6 ?/ z  T
[size=1em]# Firewall configuration7 U0 X1 E: K! S1 C
[size=1em]firewall --disabled
' c0 z& a; E7 g3 X1 n+ B; g[size=1em]# Network information
  S/ F: R- s% U3 b- b0 \1 F& V[size=1em]network  --bootproto=dhcp --device=eno167777362 T5 v( t2 Y" z7 F# Y: S
[size=1em]network  --bootproto=dhcp --device=None
% V: ^% _9 n( U9 v[size=1em]# System authorization information9 n: D, m1 ?0 H
[size=1em]auth  --useshadow  --passalgo=sha512+ Y/ z4 [5 O/ g  Z' C
[size=1em]# Use graphical install/ Y, C: l$ D' J
[size=1em]graphical
: l* d3 m- j4 e[size=1em]# Run the Setup Agent on first boot: t" P- b2 r$ [3 b
[size=1em]firstboot --enable% \, C# e7 o( w) R2 Q: t1 n0 A
[size=1em]# SELinux configuration
* W; R6 b' D8 z2 s4 q. |/ O( [( D" A4 |( \[size=1em]selinux --disabled) V5 z6 s. A8 O2 f
$ F/ K+ K6 m3 X3 X% W
[size=1em]ignoredisk --only-use=sda
  h" V/ N5 b/ Q) {[size=1em]# System bootloader configuration: x: }1 |9 F6 B* y" R/ [; P4 Q
[size=1em]bootloader --location=mbr --boot-drive=sda* k3 I  n( ~+ i6 ^, v
[size=1em]# Clear the Master Boot Record
% ]- e0 Z% R$ q( y[size=1em]zerombr6 |* [; R+ Y/ Z& h
[size=1em]# Partition clearing information, \9 G) {1 s, u! e' R9 Q
[size=1em]clearpart --all --initlabel
* \9 |2 F3 m% \( B[size=1em]# Disk partitioning information
6 j; k0 Y0 a8 g* |2 G; e6 o- i# x[size=1em]part pv.10 --fstype="lvmpv" --ondisk=sda --size=35339
5 V. R9 J' m$ K- e8 Z[size=1em]part /boot --fstype="xfs" --ondisk=sda --size=5007 @# [; \4 f" Q1 v4 J
[size=1em]volgroup centos --pesize=4096 pv.10
) V, k. }- F8 X$ g4 k: ~1 A[size=1em]logvol /  --fstype="xfs" --grow --maxsize=51200 --size=1024 --name=root --vgname=centos9 Y( @$ n; }9 l* U, o' l
[size=1em]logvol swap  --fstype="swap" --size=2064 --name=swap --vgname=centos
; i5 ~4 _! b1 [[size=1em]%packages
7 Z* _# \% R5 {  r) M[size=1em]@base1 A( D' S1 h, |7 A- ^
[size=1em]@core
' p% s4 d: c- Y9 l9 i0 g8 k[size=1em]@desktop-debugging
) h5 u" e$ C& @0 ~[size=1em]@dial-up
; [( s0 z) x. a& Q+ I[size=1em]@directory-client- w9 H5 k* R- t1 i0 U
[size=1em]@fonts* `0 h8 w% Q7 m2 t' N  H
[size=1em]@guest-agents
. {" S8 x- f1 L# m[size=1em]@guest-desktop-agents
9 H6 V! q4 ]$ u- ^, R[size=1em]@input-methods
$ R( ]3 Z, i0 B$ D' H+ y, x+ a- D8 Z[size=1em]@internet-browser
8 |/ I& K: A, [) T. ~7 }( s- p[size=1em]@java-platform  q+ F" k. m2 X7 [9 k  N
[size=1em]@kde-desktop
" ^. }( N: g& {. J) f[size=1em]@multimedia) w2 P' @1 `" E  `4 x. i" ?" c+ Z
[size=1em]@network-file-system-client" W  ~/ P2 Q- y' p8 A# J
[size=1em]@print-client
5 ]/ y1 i) ?3 u/ e5 T0 w[size=1em]@x11$ C" r3 v# A0 u; n( c

9 Q) w* K9 k# T2 g4 M5 L) J[size=1em]%end; R3 T, L$ C7 U5 {" H. U
! G6 i* s1 L' _' I3 ]2 c: q, O

$ ^4 Z2 z6 `7 n+ P/ {
* U2 d+ ]& R* u; ~

cobbler web界面配置

使用系统用户(pam)或者configfile定义用户登录管理cobbler web

[size=1em]1
! B* R( z6 x# A" c" B
[size=1em]2
" F$ L  B  c3 t
[size=1em]3
9 j9 I* z( b# B6 b
[size=1em][size=1em][authentication]
% g  u- o4 E! x6 W' ?* G4 r7 G[size=1em]#module = authn_configfile (默认值)1 S5 A; o( W) b/ e
[size=1em]module = authn_pam) [9 K) b$ N1 U5 J7 F

/ d* s3 C% [6 P* B7 J2 l' P

6 r8 Q- B. |: ~; x

# X& \& x1 \9 o  o0 e
[size=1em]1
( M! C, D% i2 a: v  x8 g
[size=1em]2
9 a1 ^6 J$ E& }$ ?  T% ?- K
[size=1em]3
5 k, X- _  s, r, G1 _8 E% ^# p; F" G
[size=1em]4

- {6 X0 f: P/ D1 U1 }
[size=1em]5

1 A' H! m/ x& ]) _8 W
[size=1em]6
1 ^; L$ t7 i% d3 Q3 s
[size=1em]7
( p7 F" W! O  W9 b& z# X
[size=1em]8

3 M1 P9 S) k" h9 l3 z: Q+ `" h
[size=1em][size=1em][root@cobbler ~]# vim /etc/cobbler/modules.conf
! b# N. h3 `8 s6 H, R[size=1em][root@cobbler ~]# useradd cobbler
) `6 P7 ^3 J9 y# g* h4 t! U  z$ j: F[size=1em][root@cobbler ~]# echo "cobbler" | passwd --stdin cobbler
9 l% h) o. T2 f, Y1 Z& ?) i[size=1em]Changing password for user cobbler.( N4 b' ]( I% a, C: h7 S. a  M
[size=1em]passwd: all authentication tokens updated successfully.% D- _* X3 W0 y4 x# l  H% q9 C! A2 N
[size=1em][root@cobbler ~]# vim /etc/cobbler/users.conf
, N, V& O" ~1 U% F3 w$ g[size=1em][admins]% {. L. z+ X9 o1 Q- N! k$ O7 l
[size=1em]admin = "cobbler", \$ Q: M6 X% u

: n% [6 ^0 m; e
" ?! Y4 C5 ], W; n" a) V1 G% |
$ q, K; I) B& x5 r


0 P! A) `0 o4 |; U$ z                               
登录/注册后可看大图


, s3 T# Y1 \- P+ N                               
登录/注册后可看大图

[size=1em]1
6 R8 ?- R% f+ J& [* I+ p
[size=1em]2
. i6 A9 b! F/ {- p
[size=1em]3
, f; m2 a( I: S) x7 j& H
[size=1em]4

  }' }) O: H& [, F# b5 {
[size=1em]5

. j8 s2 a* x8 u" \1 v6 E7 K, j
[size=1em]6
3 Z3 K0 W  y3 X- @* N1 t
[size=1em]7
; s9 q4 |' }) a
[size=1em][size=1em][root@cobbler ~]# vim /etc/cobbler/modules.conf
& S: G% g* \" Z  c7 S  O[size=1em][authentication]
8 n' q1 A, P% h# t' V* A2 g[size=1em]module = authn_configfile2 _; N6 I1 s/ ?9 z+ S* Z
[size=1em][root@cobbler ~]# htdigest /etc/cobbler/users.digest "Cobbler" admin
5 D( a9 d# O2 F* q* n[size=1em]Adding user admin in realm Cobbler% _$ I, _2 X+ G: q4 x
[size=1em]New password: ! a# s0 \# b1 i4 S
[size=1em]Re-type new password:0 U' P; ~6 h4 {6 e# \, u5 j7 a6 M

7 D% i* j( i2 {% t( x( s' ~
6 \4 U' ~/ @/ A

4 h; n+ x3 B/ O6 x' W

! O. J. ?. R5 P# Y. m0 x4 }

: K( q% h5 _% M1 T( J0 k4 o7 S! o/ B: W9 q9 J/ U4 J. u
 楼主| 发表于 2017-2-21 00:12:38 | 显示全部楼层
# cobbler get-loaders4 C/ B) M2 s" {' l! F8 V7 D! n0 E
Traceback (most recent call last):
  j4 C. X2 j( P7 J  File "/usr/bin/cobbler", line 36, in <module>
! \) e3 x- |/ V    sys.exit(app.main())' B- W' s8 e9 ?2 ^  w
  File "/usr/lib/python2.6/site-packages/cobbler/cli.py", line 657, in main
6 ]8 @" s/ \/ M  ^    rc = cli.run(sys.argv)1 ?- |" y: g5 {, L
  File "/usr/lib/python2.6/site-packages/cobbler/cli.py", line 270, in run5 S  x' b! y* @/ X$ t  v2 J5 G- w
    self.token         = self.remote.login("", self.shared_secret)
) Q" {# T( b- R. y/ [  File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
2 L) O) W: E& n. _4 b) z    return self.__send(self.__name, args)/ m. O  w1 ?5 v* T, ?- @; n
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request; J9 t' y9 u% M$ X; E
    verbose=self.__verbose
' ]# w9 E# v2 M( D3 a7 y- Y7 E  File "/usr/lib64/python2.6/xmlrpclib.py", line 1253, in request
8 b0 I5 z5 f# V! k+ m    return self._parse_response(h.getfile(), sock)
- ]- ~8 q3 G% f. D- E1 ?  File "/usr/lib64/python2.6/xmlrpclib.py", line 1392, in _parse_response8 U, P% a2 z2 f& ~0 |
    return u.close()
6 x% a) T: a+ W' }- s- n  File "/usr/lib64/python2.6/xmlrpclib.py", line 838, in close
( L/ y5 d0 \) i& t1 G    raise Fault(**self._stack[0])
" h) F$ ~/ t9 d8 y2 Q, Bxmlrpclib.Fault: <Fault 1: "<class 'cobbler.cexceptions.CX'>:'login failed'">- ^& v; F7 W; K7 H* B, h
[root@Cobbler loaders]# serv
! K+ c, y; p- j4 N0 M* S  Gservertool  service     , m3 B/ T; o2 k! }! Y
[root@Cobbler loaders]# serv
; c5 d% d7 q# p. j9 G) j8 A- Pservertool  service     ; j, H' ]% R3 o5 V6 u/ r) f8 P
[root@Cobbler loaders]# service cobblerd restart
6 Q' }$ E& I  q; h5 |0 YStopping cobbler daemon:                                   [确定]6 m" t/ g( w) ?, t1 r
Starting cobbler daemon:                                   [确定]$ i$ F, W7 T7 x! M
[root@Cobbler loaders]# cobbler get-loaders7 R$ |% D$ \+ T2 R( M
task started: 2017-02-21_001121_get_loaders
5 L/ N; r" ^4 R7 d% j! U7 Ytask started (id=Download Bootloader Content, time=Tue Feb 21 00:11:21 2017)
8 T2 V" M6 A1 w; ~# i( adownloading http://cobbler.github.io/loaders/README to /var/lib/cobbler/loaders/README
* ~1 @* A/ f2 H3 ^downloading http://cobbler.github.io/loaders/COPYING.elilo to /var/lib/cobbler/loaders/COPYING.elilo
/ e) |$ p) m. |/ o9 F& i! q" G2 V! edownloading http://cobbler.github.io/loaders/COPYING.yaboot to /var/lib/cobbler/loaders/COPYING.yaboot
4 i$ j. _9 }( O6 X# i, Bdownloading http://cobbler.github.io/loaders/COPYING.syslinux to /var/lib/cobbler/loaders/COPYING.syslinux
+ h% {8 \: s6 @# |- k% V( n- Z( vdownloading http://cobbler.github.io/loaders/elilo-3.8-ia64.efi to /var/lib/cobbler/loaders/elilo-ia64.efi
# ]( a* N& P$ Adownloading http://cobbler.github.io/loaders/yaboot-1.3.17 to /var/lib/cobbler/loaders/yaboot; t! @4 E1 r/ ?5 N& X+ s
downloading http://cobbler.github.io/loaders/pxelinux.0-3.86 to /var/lib/cobbler/loaders/pxelinux.02 p$ S  y- D9 ]7 P! t2 E9 ^6 ?; p( @
downloading http://cobbler.github.io/loaders/menu.c32-3.86 to /var/lib/cobbler/loaders/menu.c32! q# Q( l% T+ a  g/ s; ~
downloading http://cobbler.github.io/loaders/grub-0.97-x86.efi to /var/lib/cobbler/loaders/grub-x86.efi* e- _2 O' X: N
downloading http://cobbler.github.io/loaders/grub-0.97-x86_64.efi to /var/lib/cobbler/loaders/grub-x86_64.efi
6 i6 t! O* w0 o5 @+ N*** TASK COMPLETE ***
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 点击这里给我发消息

GMT+8, 2026-4-8 10:37 , Processed in 0.077052 second(s), 24 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

快速回复 返回顶部 返回列表