Linux 运维自动化之Cobbler的管理与使用详解

简介:

大纲

一、前言

二、Cobbler 命令详解

三、导入要安装的镜像文件

四、客户端安装操作系统

注,操作系统 CentOS 6.4 x86_64,软件版本 Cobbler-2.4.0-1。(目前最新版


一、前言

在上一篇博客中(http://freeloda.blog.51cto.com/2033581/1320090)我们详细的讲解了Cobbler安装与基本配置,在最后的实验中我们已经安装好了Cobbler。在这一篇博客中我们来主要讲解一下Cobbler命令的使用与相关配置目录的说明。好了,下面废话不多说直接上干货。(注,这一篇博客的内容是跟着上一篇博客的内容写的,对安装不了解的博友可以先参考上一篇博客。


二、Cobbler 命令详解

1.查看一下Cobbler命令

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
[root@node2 ~] # cobbler
usage 
===== 
cobbler <distro|profile|system|repo|image|mgmtclass|package| file > ... 
     [add|edit|copy|getks*|list|remove|rename|report] [options|--help] 
cobbler <aclsetup|buildiso| import |list|replicate|report|reposync| sync |validateks|version> [options|--help]
注,大家可以在上面的显示中可以看到cobbler命令有很多的选项,想获得相关选项的帮助只需要加--help即可。
[root@node2 ~] # cobbler profile --help
usage 
===== 
cobbler profile add 
cobbler profile copy 
cobbler profile dumpvars 
cobbler profile edit 
cobbler profile  find 
cobbler profile getks 
cobbler profile list 
cobbler profile remove 
cobbler profile rename 
cobbler profile report
[root@node2 ~] # cobbler profile add --help
Usage: cobbler [options]
Options:
  -h, --help      show this help message and  exit 
  --name=NAME      Name (Ex: F10-i386-webserver) 
  --uid=UID     
  --owners=OWNERS    Owners (Owners list  for  authz_ownership (space 
             delimited)) 
  --distro=DISTRO    Distribution (Parent distribution) 
  --parent=PARENT    Parent Profile 
  -- enable -gpxe=ENABLE_GPXE 
             Enable gPXE? (Use gPXE instead of PXELINUX  for 
             advanced booting options) 
  -- enable -menu=ENABLE_MENU 
             Enable PXE Menu? (Show this profile  in  the PXE menu?) 
  --kickstart=KICKSTART 
             Kickstart (Path to kickstart template) 
  --kopts=KERNEL_OPTIONS 
             Kernel Options (Ex: selinux=permissive) 
  --kopts-post=KERNEL_OPTIONS_POST 
             Kernel Options (Post Install) (Ex: clocksource=pit 
             noapic) 
  --ksmeta=KS_META   Kickstart Metadata (Ex: dog=fang agent=86) 
  --proxy=PROXY     Proxy (Proxy URL) 
  --repos=REPOS     Repos (Repos to auto-assign to this profile) 
  --comment=COMMENT   Comment (Free form text description) 
  --virt-auto-boot=VIRT_AUTO_BOOT 
             Virt Auto Boot (Auto boot this VM?) 
  --virt-cpus=VIRT_CPUS 
             Virt CPUs (integer) 
  --virt- file -size=VIRT_FILE_SIZE 
             Virt File Size(GB) 
  --virt-disk-driver=VIRT_DISK_DRIVER 
             Virt Disk Driver Type (The on-disk  format  for  the 
             virtualization disk) 
  --virt- ram =VIRT_RAM  Virt RAM (MB) 
  --depth=DEPTH   
  --virt- type =VIRT_TYPE 
             Virt Type (Virtualization technology to use) (valid 
             options: xenpv,xenfv,qemu,kvm,vmware,openvz) 
  --virt-path=VIRT_PATH 
             Virt Path (Ex:  /directory  OR VolGroup00) 
  --virt-bridge=VIRT_BRIDGE 
             Virt Bridge 
  --dhcp-tag=DHCP_TAG  DHCP Tag (See manpage or leave blank) 
  --server=SERVER    Server Override (See manpage or leave blank) 
  --ctime=CTIME   
  --mtime=MTIME   
  --name-servers=NAME_SERVERS 
             Name Servers (space delimited) 
  --name-servers-search=NAME_SERVERS_SEARCH 
             Name Servers Search Path (space delimited) 
  --mgmt-classes=MGMT_CLASSES 
             Management Classes (For external configuration 
             management) 
  --mgmt-parameters=MGMT_PARAMETERS 
             Management Parameters (Parameters  which  will be handed 
             to your management application (Must be valid YAML 
             dictionary)) 
  --boot-files=BOOT_FILES 
             TFTP Boot Files (Files copied into tftpboot beyond the 
             kernel /initrd
  --fetchable-files=FETCHABLE_FILES 
             Fetchable Files (Templates  for  tftp or wget) 
  --template-files=TEMPLATE_FILES 
             Template Files (File mappings  for  built- in  config 
             management) 
  --redhat-management-key=REDHAT_MANAGEMENT_KEY 
             Red Hat Management Key (Registration key  for  RHN, 
             Spacewalk, or Satellite) 
  --redhat-management-server=REDHAT_MANAGEMENT_SERVER 
             Red Hat Management Server (Address of Spacewalk or 
             Satellite Server) 
  --template-remote-kickstarts=TEMPLATE_REMOTE_KICKSTARTS 
  --clobber       allow add to overwrite existing objects 
  -- in -place      edit items  in  kopts or ksmeta without clearing the 
             other items

2.Cobbler 常用命令详解

  • cobbler check #检查cobbler配置

  • cobbler sync #同步配置到dhcp/pxe和数据目录

  • cobbler list #列出所有的cobbler元素

  • cobbler import #导入安装的系统镜像

  • cobbler report #列出各元素的详细信息

  • cobbler distro #查看导入的发行版系统信息

  • cobbler profile #查看配置信息

  • cobbler system #查看添加的系统信息

  • cobbler reposync #同步yum仓库到本地

(1).cobbler check

1
2
[root@node2 ~] # cobbler check 
No configuration problems found. All systems go.

注,主要用于检查cobbler配置是否有错。

(2).cobbler sync

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
[root@node2 ~] # cobbler sync 
task started: 2013-11-11_133827_sync  
task started ( id =Sync,  time =Mon Nov 11 13:38:27 2013)  
running pre- sync  triggers  
cleaning trees  
removing:  /var/lib/tftpboot/pxelinux .cfg /default  
removing:  /var/lib/tftpboot/grub/grub-x86_64 .efi  
removing:  /var/lib/tftpboot/grub/images  
removing:  /var/lib/tftpboot/grub/efidefault  
removing:  /var/lib/tftpboot/grub/grub-x86 .efi  
removing:  /var/lib/tftpboot/s390x/profile_list  
copying bootloaders  
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:[确定]  
正在启动 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 ***

注,同步cobbler配置到数据目录中,更改某些配置后得执行一下,同步一下配置。

(3).cobbler list

1
2
3
4
5
6
7
8
9
[root@node2 ~] # cobbler list 
distros:  #导入的发行版本
profiles:  #安装的配置信息
systems:  #增加的系统信息
repos:  #yum仓库
images:  #存储所有导入发行版的Kernel和initrd镜像用于远程网络启动
mgmtclasses:
packages:
files:

注,用cobbler list 命令可以列出cobbler所有元素。

(4).cobbler import

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[root@node2 ~] # cobbler import --help 
Usage: cobbler [options]
Options: 
  -h, --help      show this help message and  exit  
  --arch=ARCH      OS architecture being imported  
  --breed=BREED     the breed being imported  
  --os-version=OS_VERSION  
             the version being imported  
  --path=PATH       local  path or  rsync  location  
  --name=NAME      name, ex  'RHEL-5'  
  --available-as=AVAILABLE_AS  
             tree is here, don't mirror  
  --kickstart=KICKSTART_FILE  
             assign this kickstart  file  
  -- rsync -flags=RSYNC_FLAGS  
             pass additional flags to  rsync

注,cobbler import 命令可以导入我们要安装的镜像文件(ISO文件)。

(5).cobbler report

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[root@node2 ~] # cobbler report 
distros:  
==========
profiles: 
==========
systems: 
==========
repos: 
==========
images: 
==========
mgmtclasses: 
==========
packages: 
==========
files: 
==========

注,由于我们还没有导入任何的系统镜像文件,所以这里显示为空。一会我们导入完系统镜像后,就可以看到详细信息。

(6).cobbler distro

1
2
3
4
5
6
7
8
9
10
11
[root@node2 ~] # cobbler distro 
usage  
=====  
cobbler distro add  
cobbler distro copy  
cobbler distro edit  
cobbler distro  find  
cobbler distro list  
cobbler distro remove  
cobbler distro rename  
cobbler distro report

注,cobbler distro 命令不但可以查看导入的发行版系统信息还可以增加与修改等。

(7).cobbler profile

1
2
3
4
5
6
7
8
9
10
11
12
13
[root@node2 ~] # cobbler profile 
usage  
=====  
cobbler profile add  
cobbler profile copy  
cobbler profile dumpvars  
cobbler profile edit  
cobbler profile  find  
cobbler profile getks  
cobbler profile list  
cobbler profile remove  
cobbler profile rename  
cobbler profile report

注,cobbler profile命令不但可以查看Kickstart文件而且还可以编辑与删除此文件。

(8).cobbler system

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[root@node2 ~] # cobbler system 
usage  
=====  
cobbler system add  
cobbler system copy  
cobbler system dumpvars  
cobbler system edit  
cobbler system  find  
cobbler system getks  
cobbler system list  
cobbler system poweroff  
cobbler system poweron  
cobbler system powerstatus  
cobbler system reboot  
cobbler system remove  
cobbler system rename  
cobbler system report

注,cobbler system 命令可以将cobbler的配置安装文件与客户端相关联。下面是具体的案例,

1
2
3
4
5
6
7
8
9
[root@node2 ~] # cobbler system add --name=desktop-xfce-1 \
                    --profile=Fedora17-xfce \
                    --mac=52:54:00:b8:5e:8f \
                    --ip-address=192.168.122.10
[root@node2 ~] # cobbler system add --name=desktop-gnome-1 \
                    --profile=Fedora17-gnome \
                    --mac=52:54:00:88:f3:44 \
                    --ip-address=192.168.122.11
[root@node2 ~] # cobbler system report

(9).cobbler reposync

1
2
3
4
5
6
[root@node2 ~] # cobbler reposync
task started: 2013-11-11_144127_reposync
task started ( id =Reposync,  time =Mon Nov 11 14:41:27 2013)
hello, reposync
run, reposync, run!
*** TASK COMPLETE ***

注,cobbler reposync命令可以同步远程的yum源到本地。


三、导入要安装的镜像文件

1.镜像文件

  • CentOS-5.5-x86_64-bin-DVD-1of2.iso

  • CentOS-6.4-x86_64-bin-DVD1.iso

注,这里我们主要演示两个系统。一个是CentOS 5.5,另一个是CentOS6.4。这两个系统是现在比较常用的两个,重点给大家演示一下怎么导入系统。(在上篇博客中我们已经安装好Cobbler,并修改好相关配置,但是没有导入任何系统,不清楚的博友可以先参考一下上一篇博客:http://freeloda.blog.51cto.com/2033581/1320090。下面我们就来具体演示一下!)


2.导入CentOS 5.5镜像

(1).选择CentOS 5.5镜像

2013-11-11_153115

(2).选择 “使用ISO映像文件”

2013-11-11_153133

(3).选择 “CentOS-5.5-x86_64-bin-DVD-1of2.iso”,并确定。

2013-11-11_153145

(4).挂载镜像

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
[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  RELEASE-NOTES-cs    RELEASE-NOTES-en_US    RELEASE-NOTES-ja     RELEASE-NOTES-ro
EULA   RELEASE-NOTES-cs.html RELEASE-NOTES-en_US.html RELEASE-NOTES-ja.html   RELEASE-NOTES-ro.html
GPL    RELEASE-NOTES-de    RELEASE-NOTES-es     RELEASE-NOTES- nl      repodata
images  RELEASE-NOTES-de.html RELEASE-NOTES-es.html   RELEASE-NOTES- nl .html   RPM-GPG-KEY-beta
isolinux RELEASE-NOTES-en    RELEASE-NOTES-fr     RELEASE-NOTES-pt_BR    RPM-GPG-KEY-CentOS-5
NOTES   RELEASE-NOTES-en.html RELEASE-NOTES-fr.html   RELEASE-NOTES-pt_BR.html TRANS.TBL
(5).使用cobbler  import 命令导入镜像
[root@node2 mnt] # cobbler import --help
Usage: cobbler [options]
Options:
  -h, --help      show this help message and  exit
  --arch=ARCH      OS architecture being imported
  --breed=BREED     the breed being imported
  --os-version=OS_VERSION
             the version being imported
  --path=PATH       local  path or  rsync  location
  --name=NAME      name, ex  'RHEL-5'
  --available-as=AVAILABLE_AS
             tree is here, don't mirror
  --kickstart=KICKSTART_FILE
             assign this kickstart  file
  -- rsync -flags=RSYNC_FLAGS
             pass additional flags to  rsync

注,主要有以下几个参数--path 指定导入镜像的路径,--name 指定导入镜像的名称,--arch 指定导入镜像的架构(32位还是64位)。还有需要说明的是这里导入的时间相对较长大概在5-10分钟左右,请大家耐心等待。下面是具体的导入过程,

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
[root@node2 ~] # cobbler import --path=/mnt/ --name=CentOS-5.5 --arch=x86_64
task started: 2013-11-11_154941_import
task started ( id =Media  import time =Mon Nov 11 15:49:41 2013)
Found a candidate signature: breed=redhat, version=rhel5
Found a matching signature: breed=redhat, version=rhel5
Adding distros from path  /var/www/cobbler/ks_mirror/CentOS-5 .5-x86_64:
creating new distro: CentOS-5.5-x86_64
trying  symlink /var/www/cobbler/ks_mirror/CentOS-5 .5-x86_64 ->  /var/www/cobbler/links/CentOS-5 .5-x86_64
creating new profile: CentOS-5.5-x86_64
creating new distro: CentOS-5.5-xen-x86_64
trying  symlink /var/www/cobbler/ks_mirror/CentOS-5 .5-x86_64 ->  /var/www/cobbler/links/CentOS-5 .5-xen-x86_64
creating new profile: CentOS-5.5-xen-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-5 .5-x86_64  for  CentOS-5.5-x86_64
processing repo at :  /var/www/cobbler/ks_mirror/CentOS-5 .5-x86_64
need to process repo /comps /var/www/cobbler/ks_mirror/CentOS-5 .5-x86_64
looking  for  /var/www/cobbler/ks_mirror/CentOS-5 .5-x86_64 /repodata/ *comps*.xml
running: createrepo -c cache -s sha --groupfile  /var/www/cobbler/ks_mirror/CentOS-5 .5-x86_64 /repodata/comps .xml  /var/www/cobbler/ks_mirror/CentOS-5 .5-x86_64
received on stdout: Spawning worker 0 with 3392 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:
starting descent into  /var/www/cobbler/ks_mirror/CentOS-5 .5-x86_64  for  CentOS-5.5-xen-x86_64
processing repo at :  /var/www/cobbler/ks_mirror/CentOS-5 .5-x86_64
need to process repo /comps /var/www/cobbler/ks_mirror/CentOS-5 .5-x86_64
looking  for  /var/www/cobbler/ks_mirror/CentOS-5 .5-x86_64 /repodata/ *comps*.xml
*** TASK COMPLETE ***

注,从上面显示信息所知,cobbler会将镜像中的拷贝到本地一份,放在/var/www/cobbler/ks_mirrors下的CentOS-5.5-x86_64目录下。同时会创建一个名字为CentOS-5.5-x86_64的一个发布版本,以及一个名字为CentOS-5.5-x86_64的profile文件。下面我们来具体查看一下,

1
2
3
4
5
6
7
8
9
10
11
12
13
[root@node2 cobbler] # cobbler list
distros:
   CentOS-5.5-x86_64
   CentOS-5.5-xen-x86_64
profiles:
   CentOS-5.5-x86_64
   CentOS-5.5-xen-x86_64
systems:
repos:
images:
mgmtclasses:
packages:
files:

(6).cobbler report 查看一下详细信息

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
[root@node2 ks_mirror] # cobbler report
distros:
==========
Name              : CentOS-5.5-x86_64
Architecture          : x86_64
TFTP Boot Files        : {}
Breed             : redhat
Comment            :
Fetchable Files        : {}
Initrd             :  /var/www/cobbler/ks_mirror/CentOS-5 .5-x86_64 /images/pxeboot/initrd .img
Kernel             :  /var/www/cobbler/ks_mirror/CentOS-5 .5-x86_64 /images/pxeboot/vmlinuz
Kernel Options         : {}
Kernel Options (Post Install) : {}
Kickstart Metadata       : { 'tree' 'http://@@http_server@@/cblr/links/CentOS-5.5-x86_64' }
Management Classes       : []
OS Version           : rhel5
Owners             : [ 'admin' ]
Red Hat Management Key     : <<inherit>>
Red Hat Management Server   : <<inherit>>
Template Files         : {}
Name              : CentOS-5.5-xen-x86_64
Architecture          : x86_64
TFTP Boot Files        : {}
Breed             : redhat
Comment            :
Fetchable Files        : {}
Initrd             :  /var/www/cobbler/ks_mirror/CentOS-5 .5-x86_64 /images/xen/initrd .img
Kernel             :  /var/www/cobbler/ks_mirror/CentOS-5 .5-x86_64 /images/xen/vmlinuz
Kernel Options         : {}
Kernel Options (Post Install) : {}
Kickstart Metadata       : { 'tree' 'http://@@http_server@@/cblr/links/CentOS-5.5-xen-x86_64' }
Management Classes       : []
OS Version           : rhel5
Owners             : [ 'admin' ]
Red Hat Management Key     : <<inherit>>
Red Hat Management Server   : <<inherit>>
Template Files         : {}
profiles:
==========
Name              : CentOS-5.5-x86_64
TFTP Boot Files        : {}
Comment            :
DHCP Tag            : default
Distribution          : CentOS-5.5-x86_64
Enable gPXE?          : 0
Enable PXE Menu?        : 1
Fetchable Files        : {}
Kernel Options         : {}
Kernel Options (Post Install) : {}
Kickstart           :  /var/lib/cobbler/kickstarts/sample .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
Name              : CentOS-5.5-xen-x86_64
TFTP Boot Files        : {}
Comment            :
DHCP Tag            : default
Distribution          : CentOS-5.5-xen-x86_64
Enable gPXE?          : 0
Enable PXE Menu?        : 1
Fetchable Files        : {}
Kernel Options         : {}
Kernel Options (Post Install) : {}
Kickstart           :  /var/lib/cobbler/kickstarts/sample .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           : xenpv
systems:
==========
repos:
==========
images:
==========
mgmtclasses:
==========
packages:
==========
files:
==========

好了,到这里我们的CentOS5.5的镜像文件就导入完成了,同样的CentOS 6.4导入方法与CentOS5.5是一样的,在下面我们会为大家具体演示。下面我们为大家演示一下,用客户端安装操作系统!


四、客户端安装操作系统

1.实验拓扑

Cobbler 拓扑

2.在VMWare中新建客户端

(1).新建虚拟机

无标题

(2).这里我们选择自定义

2013-11-11_162640

(3). 这里默认就好,选择“下一步”。

2013-11-11_162703

(4).这里选择“以后安装操作系统”

2013-11-11_162723

(5).这里我们选择“CentOS 64-bit”

2013-11-11_162731

(6).这里我们设置虚拟机名称与存放位置

2013-11-11_162803

(7).这里我们设置CPU个数

2013-11-11_162813

(8).这里我们设置虚拟机的内存

2013-11-11_162819

(9).这里我们设置一下网络连接,这里我们设置的“桥接”

2013-11-11_162828

(10).这里我们选择一下I/O设备的控制器

2013-11-11_162835

(11).创建一个磁盘

2013-11-11_162840

2013-11-11_162844

(12).选择磁盘类型

2013-11-11_162851

(13).选择磁盘存放的位置

2013-11-11_162857

(14).到这里我们虚拟机就新建完成

2013-11-11_162900

(15).结果如下

2013-11-11_162913

3.具体的安装过程

(1).安装前检查

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
[root@node2 ~] # cobbler check
No configuration problems found. All systems go.
[root@node2 ~] # cobbler sync
task started: 2013-11-11_170434_sync
task started ( id =Sync,  time =Mon Nov 11 17:04:34 2013)
running pre- sync  triggers
cleaning trees
removing:  /var/www/cobbler/images/CentOS-5 .5-x86_64
removing:  /var/www/cobbler/images/CentOS-5 .5-xen-x86_64
removing:  /var/lib/tftpboot/pxelinux .cfg /default
removing:  /var/lib/tftpboot/grub/grub-x86_64 .efi
removing:  /var/lib/tftpboot/grub/images
removing:  /var/lib/tftpboot/grub/efidefault
removing:  /var/lib/tftpboot/grub/grub-x86 .efi
removing:  /var/lib/tftpboot/images/CentOS-5 .5-x86_64
removing:  /var/lib/tftpboot/images/CentOS-5 .5-xen-x86_64
removing:  /var/lib/tftpboot/s390x/profile_list
copying bootloaders
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 files  for  distro: CentOS-5.5-x86_64
trying hardlink  /var/www/cobbler/ks_mirror/CentOS-5 .5-x86_64 /images/pxeboot/vmlinuz  ->  /var/lib/tftpboot/images/CentOS-5 .5-x86_64 /vmlinuz
trying hardlink  /var/www/cobbler/ks_mirror/CentOS-5 .5-x86_64 /images/pxeboot/initrd .img ->  /var/lib/tftpboot/images/CentOS-5 .5-x86_64 /initrd .img
copying files  for  distro: CentOS-5.5-xen-x86_64
trying hardlink  /var/www/cobbler/ks_mirror/CentOS-5 .5-x86_64 /images/xen/vmlinuz  ->  /var/lib/tftpboot/images/CentOS-5 .5-xen-x86_64 /vmlinuz
trying hardlink  /var/www/cobbler/ks_mirror/CentOS-5 .5-x86_64 /images/xen/initrd .img ->  /var/lib/tftpboot/images/CentOS-5 .5-xen-x86_64 /initrd .img
copying images
generating PXE configuration files
generating PXE menu structure
copying files  for  distro: CentOS-5.5-x86_64
trying hardlink  /var/www/cobbler/ks_mirror/CentOS-5 .5-x86_64 /images/pxeboot/vmlinuz  ->  /var/www/cobbler/images/CentOS-5 .5-x86_64 /vmlinuz
trying hardlink  /var/www/cobbler/ks_mirror/CentOS-5 .5-x86_64 /images/pxeboot/initrd .img ->  /var/www/cobbler/images/CentOS-5 .5-x86_64 /initrd .img
Writing template files  for  CentOS-5.5-x86_64
copying files  for  distro: CentOS-5.5-xen-x86_64
trying hardlink  /var/www/cobbler/ks_mirror/CentOS-5 .5-x86_64 /images/xen/vmlinuz  ->  /var/www/cobbler/images/CentOS-5 .5-xen-x86_64 /vmlinuz
trying hardlink  /var/www/cobbler/ks_mirror/CentOS-5 .5-x86_64 /images/xen/initrd .img ->  /var/www/cobbler/images/CentOS-5 .5-xen-x86_64 /initrd .img
Writing template files  for  CentOS-5.5-xen-x86_64
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:[确定]
正在启动 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 ***

(2).查看一下启动的服务端口

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[root@node2 mnt] # 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   1031 /sshd    
tcp    0   0 127.0.0.1:25        0.0.0.0:*          LISTEN   1108 /master   
tcp    0   0 127.0.0.1:6010       0.0.0.0:*          LISTEN   1143 /sshd    
tcp    0   0 127.0.0.1:25151       0.0.0.0:*          LISTEN   2015 /python   
tcp    0   0 :::80            :::*            LISTEN   2030 /httpd   
tcp    0   0 :::22            :::*            LISTEN   1031 /sshd    
tcp    0   0 ::1:25           :::*            LISTEN   1108 /master   
tcp    0   0 ::1:6010          :::*            LISTEN   1143 /sshd    
tcp    0   0 :::873           :::*            LISTEN   1990 /xinetd   
udp    0   0 0.0.0.0:67         0.0.0.0:*                1974 /dhcpd   
udp    0   0 0.0.0.0:69         0.0.0.0:*                1990 /xinetd   
udp    0   0 0.0.0.0:69         0.0.0.0:*                1905 /in .tftpd

(3).启动客户端(设置为网络启动)

102706426.png

102746676.png

102746724.png


(4).下面是具体安装过程

注,重新启动直接进入安装界面。

102835113.png

注,我们选择CentOS-5.5-x86_64。

102902949.png

注,我们点击 “Tab”键查看具体参数。

2013-11-12_092110

注,直接敲“回车”键进行安装。

102930536.png

注,下面是加载驱动界面。

2013-11-12_092130

注,下面是检查安装的依赖关系。

2013-11-12_092157

注,下面是进行格式化。

2013-11-12_092208

注,下面进行软件包的安装 。

103056627.png

注,下面是软件包安装完成界面。安装完成后自动重启!

103110514.png

注,安装完成重启以后进行登录界面。

2013-11-12_092635

注,输入用户名和密码,我这里的用户是root,密码为123456。

2013-11-12_092655

好了,到这里我们的CentOS 5.5就安装完成了。在下篇博客中我们为大家讲解Cobbler安装CentOS6.4以及各种问题汇总解答。最后,希望大家有所收获^_^……
















本文转自陈明乾51CTO博客,原文链接:http://blog.51cto.com/freeloda/1323620,如需转载请自行联系原作者


相关文章
HTTPS 证书自动化运维:https证书管理系统- 自动化监控
本文介绍如何设置和查看域名或证书监控。步骤1:根据证书状态选择新增域名或证书监控,线上部署推荐域名监控,未部署选择证书监控。步骤2:查询监控记录详情。步骤3:在详情页查看每日定时检测结果或手动测试。
HTTPS 证书自动化运维:https证书管理系统- 自动化监控
HTTPS 证书自动化运维:https证书管理系统-自动化部署
本指南介绍如何部署Linux服务器节点。首先复制生成的Linux脚本命令,然后将其粘贴到目标服务器上运行。接着刷新页面查看节点记录,并点击“配置证书”选择证书以自动部署。最后,节点部署完成,后续将自动调度,无需人工干预。
HTTPS 证书自动化运维:https证书管理系统-自动化部署
HTTPS 证书自动化运维:https证书管理系统之自动化签发
通过访问【https://www.lingyanspace.com】注册账户,进入证书服务菜单并新增证书。填写域名(单域名、多域名或泛域名),创建订单后添加云解析DNS记录进行质检。确认完成后可下载证书,并支持后续查看、更新和定时更新功能。证书过期前15天自动更新,需配置邮箱接收通知。
HTTPS 证书自动化运维:https证书管理系统之自动化签发
AI辅助的运维流程自动化:实现智能化管理的新篇章
AI辅助的运维流程自动化:实现智能化管理的新篇章
856 22
小团队 CI/CD 实践:无需运维,Java Web应用的自动化部署
本文介绍如何使用GitHub Actions和阿里云Kubernetes(ACK)实现Java Web应用的自动化部署。通过CI/CD流程,开发人员无需手动处理复杂的运维任务,从而提高效率并减少错误。文中详细讲解了Docker与Kubernetes的概念,并演示了从创建Kubernetes集群、配置容器镜像服务到设置GitHub仓库Secrets及编写GitHub Actions工作流的具体步骤。最终实现了代码提交后自动构建、推送镜像并部署到Kubernetes集群的功能。整个过程不仅简化了部署流程,还确保了应用在不同环境中的稳定运行。
135 9
智能化运维:从自动化到AIOps的演进之路####
本文深入探讨了IT运维领域如何由传统手工操作逐步迈向高度自动化,并进一步向智能化运维(AIOps)转型的过程。不同于常规摘要仅概述内容要点,本摘要将直接引入一个核心观点:随着云计算、大数据及人工智能技术的飞速发展,智能化运维已成为提升企业IT系统稳定性与效率的关键驱动力。文章详细阐述了自动化工具的应用现状、面临的挑战以及AIOps如何通过预测性分析和智能决策支持,实现运维工作的质变,引领读者思考未来运维模式的发展趋势。 ####
智能化运维:从自动化到AIOps的演进与实践####
本文探讨了智能运维(AIOps)的崛起背景,深入分析了其核心概念、关键技术、应用场景及面临的挑战,并对比了传统IT运维模式,揭示了AIOps如何引领运维管理向更高效、智能的方向迈进。通过实际案例分析,展示了AIOps在不同行业中的应用成效,为读者提供了对未来智能运维趋势的洞察与思考。 ####
253 1
智能运维:从自动化到AIOps的演进与实践####
本文探讨了智能运维(AIOps)的兴起背景、核心组件及其在现代IT运维中的应用。通过对比传统运维模式,阐述了AIOps如何利用机器学习、大数据分析等技术,实现故障预测、根因分析、自动化修复等功能,从而提升系统稳定性和运维效率。文章还深入分析了实施AIOps面临的挑战与解决方案,并展望了其未来发展趋势。 ####
智能化运维:机器学习在故障预测和自动化响应中的应用
智能化运维:机器学习在故障预测和自动化响应中的应用
104 4
|
6月前
|
高效运维:从基础架构到自动化管理的全面指南
【10月更文挑战第11天】 本文将深入探讨如何通过优化基础架构和引入自动化管理来提升企业IT运维效率。我们将从服务器的选择与配置、存储解决方案的评估,到网络的设计与监控,逐一解析每个环节的关键技术点。同时,重点讨论自动化工具在现代运维中的应用,包括配置管理、持续集成与部署(CI/CD)、自动化测试及故障排除等方面。通过实际案例分析,展示这些技术如何协同工作,实现高效的运维管理。无论是IT初学者还是经验丰富的专业人员,都能从中获得有价值的见解和实操经验。
168 1
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等