一、先搭建yum仓库服务器,再在客户端从服务器下载.repo文件;如果客户端能够连接到公网,则可以直接下载网易163等等的yum仓库配置文件

1】在内网搭建服务器,然后客户端下载:

先在已经搭建好本地yum仓库的服务器端通过FTP协议发布yum软件仓库:

  1 [root@zengqingfu ~]# mount
  2
  3 /dev/mapper/vg_zengqingfu-lv_root on / type ext4 (rw)
  4
  5 proc on /proc type proc (rw)
  6
  7 sysfs on /sys type sysfs (rw)
  8
  9 devpts on /dev/pts type devpts (rw,gid=5,mode=620)
 10
 11 tmpfs on /dev/shm type tmpfs (rw)
 12
 13 /dev/sda1 on /boot type ext4 (rw)
 14
 15 /dev/sr0 on /media/cdrom type iso9660 (ro)
 16
 17 none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
 18
 19 [root@zengqingfu ~]# service vsftpd status
 20
 21 vsftpd (pid 1552) 正在运行...
 22
 23 [root@zengqingfu ~]# cd /media/cdrom/
 24
 25 [root@zengqingfu cdrom]# ls
 26
 27 CentOS_BuildTag  GPL       Packages                  RPM-GPG-KEY-CentOS-6           RPM-GPG-KEY-CentOS-Testing-6
 28
 29 EFI              images    RELEASE-NOTES-en-US.html  RPM-GPG-KEY-CentOS-Debug-6     TRANS.TBL
 30
 31 EULA             isolinux  repodata                  RPM-GPG-KEY-CentOS-Security-6
 32
 33 [root@zengqingfu cdrom]# cd /var/ftp/
 34
 35 [root@zengqingfu ftp]# ls
 36
 37 pub
 38
 39 [root@zengqingfu ftp]# mkdir centos6
 40
 41 [root@zengqingfu ftp]# cd -
 42
 43 /media/cdrom
 44
 45 [root@zengqingfu cdrom]# cp -rf ./* /var/ftp/centos6/ &
 46
 47 [1] 2955
 48
 49 [root@zengqingfu cdrom]# jobs
 50
 51 [1]+  Running                 cp -i -rf ./* /var/ftp/centos6/ &
 52
 53 [root@zengqingfu cdrom]# mkdir /var/ftp/others
 54
 55 [root@zengqingfu cdrom]# jobs
 56
 57 [1]+  Running                 cp -i -rf ./* /var/ftp/centos6/ &
 58
 59 [root@zengqingfu cdrom]# cd /var/ftp/others/
 60
 61 [root@zengqingfu others]# ls
 62
 63 [root@zengqingfu others]# jobs
 64
 65 [1]+  Running                 cp -i -rf ./* /var/ftp/centos6/ &  (wd: /media/cdrom)
 66
 67
 68
 69
 70
 71 [root@zengqingfu others]# ls
 72
 73 ruby-1.8.7.352-13.el6.x86_64.rpm      ruby-libs-1.8.7.352-13.el6.x86_64.rpm
 74
 75 ruby-irb-1.8.7.352-13.el6.x86_64.rpm  ruby-rdoc-1.8.7.352-13.el6.x86_64.rpm
 76
 77
 78
 79 启动FTP服务:
 80
 81 [root@zengqingfu yum.repos.d]# cd /var/ftp/
 82
 83 [root@zengqingfu ftp]# service vsftpd status
 84
 85 vsftpd (pid 2404) 正在运行...
 86
 87 [root@zengqingfu ftp]# chkconfig vsftpd on
 88
 89 [root@zengqingfu ftp]# chkconfig vsftpd --list
 90
 91 vsftpd         0:关闭  1:关闭  2:启用  3:启用  4:启用  5:启用  6:关闭
 92
 93
 94
 95 创建其他软件的仓库:
 96
 97 [root@zengqingfu ftp]# cd others/
 98
 99 [root@zengqingfu others]# ls
100
101 ruby-1.8.7.352-13.el6.x86_64.rpm      ruby-libs-1.8.7.352-13.el6.x86_64.rpm
102
103 ruby-irb-1.8.7.352-13.el6.x86_64.rpm  ruby-rdoc-1.8.7.352-13.el6.x86_64.rpm
104
105 [root@zengqingfu others]# createrepo -v ./
106
107 bash: createrepo: command not found
108
109 [root@zengqingfu others]# yum -y install createrepo
110
111 已加载插件:fastestmirror, priorities, refresh-packagekit, security
112
113 设置安装进程
114
115 Determining fastest mirrors
116
117  * base: mirrors.163.com
118
119  * extras: mirrors.sohu.com
120
121  * rpmforge: ftp.riken.jp
122
123  * updates: mirrors.aliyun.com
124
125 base                                                                                              | 3.7 kB     00:00
126
127 centos6                                                                                           | 4.0 kB     00:00 ...
128
129 extras                                                                                            | 3.4 kB     00:00
130
131 rpmforge                                                                                          | 1.9 kB     00:00
132
133 updates                                                                                           | 3.4 kB     00:00
134
135 6546 packages excluded due to repository priority protections
136
137 解决依赖关系
138
139 --> 执行事务检查
140
141 ---> Package createrepo.noarch 0:0.9.9-26.el6 will be 安装
142
143 --> 处理依赖关系 python-deltarpm,它被软件包 createrepo-0.9.9-26.el6.noarch 需要
144
145 --> 执行事务检查
146
147 ---> Package python-deltarpm.x86_64 0:3.5-0.5.20090913git.el6 will be 安装
148
149 --> 处理依赖关系 deltarpm = 3.5-0.5.20090913git.el6,它被软件包 python-deltarpm-3.5-0.5.20090913git.el6.x86_64 需要
150
151 --> 执行事务检查
152
153 ---> Package deltarpm.x86_64 0:3.5-0.5.20090913git.el6 will be 安装
154
155 --> 完成依赖关系计算
156
157
158
159 依赖关系解决
160
161
162
163 =========================================================================================================================
164
165  软件包                         架构                  版本                                     仓库                 大小
166
167 =========================================================================================================================
168
169 正在安装:
170
171  createrepo                     noarch                0.9.9-26.el6                             base                 97 k
172
173 为依赖而安装:
174
175  deltarpm                       x86_64                3.5-0.5.20090913git.el6                  base                 71 k
176
177  python-deltarpm                x86_64                3.5-0.5.20090913git.el6                  base                 27 k
178
179
180
181 事务概要
182
183 =========================================================================================================================
184
185 Install       3 Package(s)
186
187
188
189 总下载量:195 k
190
191 Installed size: 522 k
192
193 下载软件包:
194
195 (1/3): createrepo-0.9.9-26.el6.noarch.rpm                                                         |  97 kB     00:00
196
197 (2/3): deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm                                                |  71 kB     00:00
198
199 (3/3): python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm                                         |  27 kB     00:00
200
201 -------------------------------------------------------------------------------------------------------------------------
202
203 总计                                                                                     179 kB/s | 195 kB     00:01
204
205 运行 rpm_check_debug
206
207 执行事务测试
208
209 事务测试成功
210
211 执行事务
212
213 Warning: RPMDB altered outside of yum.
214
215   正在安装   : deltarpm-3.5-0.5.20090913git.el6.x86_64                                                               1/3
216
217   正在安装   : python-deltarpm-3.5-0.5.20090913git.el6.x86_64                                                        2/3
218
219   正在安装   : createrepo-0.9.9-26.el6.noarch                                                                        3/3
220
221   Verifying  : python-deltarpm-3.5-0.5.20090913git.el6.x86_64                                                        1/3
222
223   Verifying  : deltarpm-3.5-0.5.20090913git.el6.x86_64                                                               2/3
224
225   Verifying  : createrepo-0.9.9-26.el6.noarch                                                                        3/3
226
227
228
229 已安装:
230
231   createrepo.noarch 0:0.9.9-26.el6
232
233
234
235 作为依赖被安装:
236
237   deltarpm.x86_64 0:3.5-0.5.20090913git.el6               python-deltarpm.x86_64 0:3.5-0.5.20090913git.el6
238
239
240
241 完毕!
242
243 [root@zengqingfu others]# createrepo -v ./
244
245 Spawning worker 0 with 4 pkgs
246
247 Worker 0: reading ruby-1.8.7.352-13.el6.x86_64.rpm
248
249 Worker 0: reading ruby-irb-1.8.7.352-13.el6.x86_64.rpm
250
251 Worker 0: reading ruby-rdoc-1.8.7.352-13.el6.x86_64.rpm
252
253 Worker 0: reading ruby-libs-1.8.7.352-13.el6.x86_64.rpm
254
255 Workers Finished
256
257 Gathering worker results
258
259
260
261 Saving Primary metadata
262
263 Saving file lists metadata
264
265 Saving other metadata
266
267 Generating sqlite DBs
268
269 Starting other db creation: Sat Apr 22 18:01:20 2017
270
271 Ending other db creation: Sat Apr 22 18:01:20 2017
272
273 Starting filelists db creation: Sat Apr 22 18:01:20 2017
274
275 Ending filelists db creation: Sat Apr 22 18:01:21 2017
276
277 Starting primary db creation: Sat Apr 22 18:01:21 2017
278
279 Ending primary db creation: Sat Apr 22 18:01:21 2017
280
281 Sqlite DBs complete
282
283 [root@zengqingfu others]# ls
284
285 repodata                          ruby-irb-1.8.7.352-13.el6.x86_64.rpm   ruby-rdoc-1.8.7.352-13.el6.x86_64.rpm
286
287 ruby-1.8.7.352-13.el6.x86_64.rpm  ruby-libs-1.8.7.352-13.el6.x86_64.rpm
288
289
290
291 创建仓库配置文件以供客户端下载:
292
293 [root@zengqingfu ftp]# vim zengqingfu.repo
294
295
296
297 [centos6]
298
299 name=centos 6.5
300
301 baseurl=ftp://192.168.1.112/centos6
302
303         ftp://192.168.1.112/others
304
305 gpgcheck=0
306
307 enabled=1
308
309 ~
310
311 [root@zengqingfu ftp]# service iptables stop
312
313 iptables:将链设置为政策 ACCEPT:nat mangle filter         [确定]
314
315 iptables:清除防火墙规则:                                 [确定]
316
317 iptables:正在卸载模块:                                   [确定]
318
319
320
321 然后再IP地址为192.168.1.105的另一台虚拟机上下载.repo文件,配置软件仓库位置:
322
323 [root@zengqingfu yum.repos.d]# ls
324
325 centos66.repo     CentOS-Debuginfo.repo  CentOS-Media.repo  mirrors-rpmforge         mirrors-rpmforge-testing
326
327 CentOS-Base.repo  CentOS-fasttrack.repo  CentOS-Vault.repo  mirrors-rpmforge-extras  rpmforge.repo
328
329 [root@zengqingfu yum.repos.d]# mkdir bak
330
331 [root@zengqingfu yum.repos.d]# mv * bak
332
333 mv: 无法将目录"bak" 移动至自身的子目录"bak/bak" 下
334
335 [root@zengqingfu yum.repos.d]# ls
336
337 bak
338
339 [root@zengqingfu yum.repos.d]# yum -y install createrepo
340
341 已加载插件:fastestmirror, priorities, refresh-packagekit, security
342
343 设置安装进程
344
345 Determining fastest mirrors
346
347 No package createrepo available.
348
349 错误:无须任何处理
350
351 在没有配置软件仓库的位置之前,用yum不能安装createrepo,现在下载.repo文件之后才可以:
352
353 [root@zengqingfu yum.repos.d]# wget ftp://192.168.1.112/*.repo
354
355 --2017-04-22 18:06:20--  ftp://192.168.1.112/*.repo
356
357            => “.listing”
358
359 正在连接 192.168.1.112:21... 已连接。
360
361 正在以 anonymous 登录 ... 登录成功!
362
363 ==> SYST ... 完成。    ==> PWD ... 完成。
364
365 ==> TYPE I ... 完成。  ==> 不需要 CWD。
366
367 ==> PASV ... 完成。    ==> LIST ... 完成。
368
369
370
371     [ <=>                                                                            ] 382         --.-K/s   in 0s
372
373
374
375 2017-04-22 18:06:20 (7.22 MB/s) - “.listing” 已保存 [382]
376
377
378
379 已删除 “.listing”。
380
381 --2017-04-22 18:06:20--  ftp://192.168.1.112/zengqingfu.repo
382
383            => “zengqingfu.repo”
384
385 ==> 不需要 CWD。
386
387 ==> PASV ... 完成。    ==> RETR zengqingfu.repo ... 完成。
388
389 长度:111
390
391
392
393 100%[===============================================================================>] 111         --.-K/s   in 0.003s
394
395
396
397 2017-04-22 18:06:20 (41.4 KB/s) - “zengqingfu.repo” 已保存 [111]
398
399
400
401 [root@zengqingfu yum.repos.d]# ls
402
403 bak  zengqingfu.repo
404
405 [root@zengqingfu yum.repos.d]# yum -y install createrepo
406
407 已加载插件:fastestmirror, priorities, refresh-packagekit, security
408
409 设置安装进程
410
411 Loading mirror speeds from cached hostfile
412
413  * centos6: 192.168.1.112
414
415 centos6                                                                                           | 4.0 kB     00:00
416
417 解决依赖关系
418
419 --> 执行事务检查
420
421 ---> Package createrepo.noarch 0:0.9.9-22.el6 will be 安装
422
423 --> 处理依赖关系 python-deltarpm,它被软件包 createrepo-0.9.9-22.el6.noarch 需要
424
425 --> 执行事务检查
426
427 ---> Package python-deltarpm.x86_64 0:3.5-0.5.20090913git.el6 will be 安装
428
429 --> 处理依赖关系 deltarpm = 3.5-0.5.20090913git.el6,它被软件包 python-deltarpm-3.5-0.5.20090913git.el6.x86_64 需要
430
431 --> 执行事务检查
432
433 ---> Package deltarpm.x86_64 0:3.5-0.5.20090913git.el6 will be 安装
434
435 --> 完成依赖关系计算
436
437
438
439 依赖关系解决
440
441
442
443 =========================================================================================================================
444
445  软件包                        架构                 版本                                     仓库                   大小
446
447 =========================================================================================================================
448
449 正在安装:
450
451  createrepo                    noarch               0.9.9-22.el6                             centos6                96 k
452
453 为依赖而安装:
454
455  deltarpm                      x86_64               3.5-0.5.20090913git.el6                  centos6                71 k
456
457  python-deltarpm               x86_64               3.5-0.5.20090913git.el6                  centos6                27 k
458
459
460
461 事务概要
462
463 =========================================================================================================================
464
465 Install       3 Package(s)
466
467
468
469 总下载量:194 k
470
471 Installed size: 520 k
472
473 下载软件包:
474
475 (1/3): python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm                                         |  27 kB     00:00
476
477 (2/3): createrepo-0.9.9-22.el6.noarch.rpm                                                         |  96 kB     00:00
478
479 (3/3): deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm                                                |  71 kB     00:00
480
481 -------------------------------------------------------------------------------------------------------------------------
482
483 总计                                                                                     1.2 MB/s | 194 kB     00:00
484
485 运行 rpm_check_debug
486
487 执行事务测试
488
489 事务测试成功
490
491 执行事务
492
493   正在安装   : deltarpm-3.5-0.5.20090913git.el6.x86_64                                                               1/3
494
495   正在安装   : python-deltarpm-3.5-0.5.20090913git.el6.x86_64                                                        2/3
496
497   正在安装   : createrepo-0.9.9-22.el6.noarch                                                                        3/3
498
499   Verifying  : python-deltarpm-3.5-0.5.20090913git.el6.x86_64                                                        1/3
500
501   Verifying  : createrepo-0.9.9-22.el6.noarch                                                                        2/3
502
503   Verifying  : deltarpm-3.5-0.5.20090913git.el6.x86_64                                                               3/3
504
505
506
507 已安装:
508
509   createrepo.noarch 0:0.9.9-22.el6
510
511
512
513 作为依赖被安装:
514
515   deltarpm.x86_64 0:3.5-0.5.20090913git.el6               python-deltarpm.x86_64 0:3.5-0.5.20090913git.el6
516
517
518
519 完毕!
520
521 [root@zengqingfu yum.repos.d]# rpm -qa | grep createrepo
522
523 createrepo-0.9.9-22.el6.noarch
524
525
526
527 清除yum缓存,构建yum缓存:
528
529 [root@zengqingfu yum.repos.d]# cd /var/cache/yum/x86_64/
530
531 [root@zengqingfu x86_64]# ls
532
533 6
534
535 [root@zengqingfu x86_64]# cd 6
536
537 [root@zengqingfu 6]# ls
538
539 base  centos6  extras  rpmforge  timedhosts.txt  updates
540
541 [root@zengqingfu 6]# cd centos6/
542
543 [root@zengqingfu centos6]# ls
544
545 036dd72d77ba4abf25f5583b7973558f5f7a6bc90ee18be1f27a9d93072313f8-primary.sqlite          cachecookie
546
547 3dd75f6c0394f9a55bd6d15102dc023d27c057c99182cca8b0d3c8f71912fc62-filelists.sqlite        gen
548
549 460862ca0e99160b41eecc41b944eb2abc0b82609bd12407bc5609922627eac4-c6-x86_64-comps.xml.gz  packages
550
551 9a5c649c5eb8b0b1365aa19954766d0ea80ee59b701b41a555792443456557f3-other.sqlite            repomd.xml
552
553 [root@zengqingfu centos6]# yum -y clean all
554
555 已加载插件:fastestmirror, priorities, refresh-packagekit, security
556
557 Cleaning repos: centos6
558
559 清理一切
560
561 Cleaning up list of fastest mirrors
562
563 [root@zengqingfu centos6]# ls
564
565 gen  packages
566
567 [root@zengqingfu centos6]# yum makecache
568
569 已加载插件:fastestmirror, priorities, refresh-packagekit, security
570
571 Determining fastest mirrors
572
573  * centos6: 192.168.1.112
574
575 centos6                                                                                           | 4.0 kB     00:00
576
577 centos6/group_gz                                                                                  | 216 kB     00:00
578
579 centos6/filelists_db                                                                              | 6.0 MB     00:00
580
581 centos6/primary_db                                                                                | 4.5 MB     00:00
582
583 centos6/other_db                                                                                  | 2.8 MB     00:00
584
585 元数据缓存已建立
586
587 [root@zengqingfu centos6]# ls
588
589 036dd72d77ba4abf25f5583b7973558f5f7a6bc90ee18be1f27a9d93072313f8-primary.sqlite          cachecookie
590
591 3dd75f6c0394f9a55bd6d15102dc023d27c057c99182cca8b0d3c8f71912fc62-filelists.sqlite        gen
592
593 460862ca0e99160b41eecc41b944eb2abc0b82609bd12407bc5609922627eac4-c6-x86_64-comps.xml.gz  packages
594
595 9a5c649c5eb8b0b1365aa19954766d0ea80ee59b701b41a555792443456557f3-other.sqlite            repomd.xml

View Code

2、在客户端从公网构建yum源:

  1 [root@zengqingfu centos6]# cd /etc/yum.repos.d/
  2
  3 [root@zengqingfu yum.repos.d]# ls
  4
  5 bak  zengqingfu.repo
  6
  7 [root@zengqingfu yum.repos.d]# wget http://mirrors.sohu.com/help/Centos-Base-sohu.repo
  8
  9 --2017-04-22 18:22:37--  http://mirrors.sohu.com/help/Centos-Base-sohu.repo
 10
 11 正在解析主机 mirrors.sohu.com... 119.188.36.70
 12
 13 正在连接 mirrors.sohu.com|119.188.36.70|:80... 已连接。
 14
 15 已发出 HTTP 请求,正在等待回应... 404 Not Found
 16
 17 2017-04-22 18:22:38 错误 404:Not Found。
 18
 19
 20
 21 [root@zengqingfu yum.repos.d]# wget http://mirrors.sohu.com/help/CentOS-Base-sohu.repo
 22
 23 --2017-04-22 18:22:50--  http://mirrors.sohu.com/help/CentOS-Base-sohu.repo
 24
 25 正在解析主机 mirrors.sohu.com... 119.188.36.70
 26
 27 正在连接 mirrors.sohu.com|119.188.36.70|:80... 已连接。
 28
 29 已发出 HTTP 请求,正在等待回应... 200 OK
 30
 31 长度:2299 (2.2K) [application/octet-stream]
 32
 33 正在保存至: “CentOS-Base-sohu.repo”
 34
 35
 36
 37 100%[===============================================================================>] 2,299       --.-K/s   in 0.08s
 38
 39
 40
 41 2017-04-22 18:22:50 (29.1 KB/s) - 已保存 “CentOS-Base-sohu.repo” [2299/2299])
 42
 43
 44
 45 [root@zengqingfu yum.repos.d]# ls
 46
 47 bak  CentOS-Base-sohu.repo  zengqingfu.repo
 48
 49
 50
 51 [root@zengqingfu yum.repos.d]# egrep -v "^#|^$" CentOS-Base-sohu.repo
 52
 53 [base]
 54
 55 name=CentOS-$releasever - Base - sohu.com
 56
 57 mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
 58
 59 baseurl=http://mirrors.sohu.com/centos/$releasever/os/$basearch/
 60
 61 gpgcheck=1
 62
 63 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
 64
 65 [updates]
 66
 67 name=CentOS-$releasever - Updates - sohu.com
 68
 69 mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
 70
 71 baseurl=http://mirrors.sohu.com/centos/$releasever/updates/$basearch/
 72
 73 gpgcheck=1
 74
 75 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
 76
 77 [addons]
 78
 79 name=CentOS-$releasever - Addons - sohu.com
 80
 81 mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
 82
 83 baseurl=http://mirrors.sohu.com/centos/$releasever/addons/$basearch/
 84
 85 gpgcheck=1
 86
 87 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
 88
 89 [extras]
 90
 91 name=CentOS-$releasever - Extras - sohu.com
 92
 93 mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
 94
 95 baseurl=http://mirrors.sohu.com/centos/$releasever/extras/$basearch/
 96
 97 gpgcheck=1
 98
 99 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
100
101 [centosplus]
102
103 name=CentOS-$releasever - Plus - sohu.com
104
105 mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
106
107 baseurl=http://mirrors.sohu.com/centos/$releasever/centosplus/$basearch/
108
109 gpgcheck=1
110
111 enabled=0
112
113 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
114
115 [contrib]
116
117 name=CentOS-$releasever - Contrib - sohu.com
118
119 mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
120
121 baseurl=http://mirrors.sohu.com/centos/$releasever/contrib/$basearch/
122
123 gpgcheck=1
124
125 enabled=0
126
127 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
128
129
130
131
132
133 [root@zengqingfu yum.repos.d]# cd -
134
135 /var/cache/yum/x86_64/6/centos6
136
137 [root@zengqingfu centos6]# pwd
138
139 /var/cache/yum/x86_64/6/centos6
140
141 [root@zengqingfu centos6]# ls
142
143 036dd72d77ba4abf25f5583b7973558f5f7a6bc90ee18be1f27a9d93072313f8-primary.sqlite          cachecookie
144
145 3dd75f6c0394f9a55bd6d15102dc023d27c057c99182cca8b0d3c8f71912fc62-filelists.sqlite        gen
146
147 460862ca0e99160b41eecc41b944eb2abc0b82609bd12407bc5609922627eac4-c6-x86_64-comps.xml.gz  packages
148
149 9a5c649c5eb8b0b1365aa19954766d0ea80ee59b701b41a555792443456557f3-other.sqlite            repomd.xml
150
151 [root@zengqingfu centos6]# yum -y clean all
152
153 已加载插件:fastestmirror, priorities, refresh-packagekit, security
154
155 Cleaning repos: addons base centos6 extras updates
156
157 清理一切
158
159 Cleaning up list of fastest mirrors
160
161 [root@zengqingfu centos6]# ls
162
163 gen  packages
164
165 [root@zengqingfu centos6]# yum makecache
166
167 已加载插件:fastestmirror, priorities, refresh-packagekit, security
168
169 Determining fastest mirrors
170
171  * addons: mirrors.sohu.com
172
173  * base: mirrors.btte.net
174
175  * centos6: 192.168.1.112
176
177  * extras: mirrors.sohu.com
178
179  * updates: mirrors.sohu.com
180
181 http://mirrors.sohu.com/centos/6/addons/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
182
183 尝试其他镜像。
184
185 http://mirror.us.leaseweb.net/centos/6/addons/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
186
187 尝试其他镜像。
188
189 http://centos.mirror.iweb.ca/6/addons/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
190
191 尝试其他镜像。
192
193 http://ftp.jaist.ac.jp/pub/Linux/CentOS/6/addons/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
194
195 尝试其他镜像。
196
197 http://mirror.steadfast.net/centos/6/addons/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
198
199 尝试其他镜像。
200
201 http://ftp.hosteurope.de/mirror/centos.org/6/addons/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
202
203 尝试其他镜像。
204
205 http://mirror.centos.org/centos/6/addons/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
206
207 尝试其他镜像。
208
209 http://mirror.as24220.net/pub/centos/6/addons/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://mirror.as24220.net/pub/centos/6/addons/x86_64/repodata/repomd.xml: (28, 'connect() timed out!')
210
211 尝试其他镜像。
212
213 ^C
214
215  Current download cancelled, interrupt (ctrl-c) again within 二 seconds
216
217 to exit.
218
219
220
221 ^C
222
223 ftp://mirror.bytemark.co.uk/centos/6/addons/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 23 - "Failed writing header"
224
225 尝试其他镜像。
226
227 ^C
228
229 ^Z
230
231 [1]+  Stopped                 yum makecache
232
233 [root@zengqingfu centos6]# ls
234
235 gen  packages
236
237 [root@zengqingfu centos6]# cd -
238
239 /etc/yum.repos.d
240
241 [root@zengqingfu yum.repos.d]# ls
242
243 bak  CentOS-Base-sohu.repo  zengqingfu.repo
244
245 [root@zengqingfu yum.repos.d]# mv zengqingfu.repo bak/
246
247 [root@zengqingfu yum.repos.d]# ls
248
249 bak  CentOS-Base-sohu.repo
250
251 [root@zengqingfu yum.repos.d]# cd -
252
253 /var/cache/yum/x86_64/6/centos6
254
255 [root@zengqingfu centos6]# ls
256
257 gen  packages
258
259 [root@zengqingfu yum.repos.d]# yum makecache
260
261 已加载插件:fastestmirror, priorities, refresh-packagekit, security
262
263 Loading mirror speeds from cached hostfile
264
265  * addons: mirrors.sohu.com
266
267  * base: mirrors.btte.net
268
269  * extras: mirrors.sohu.com
270
271  * updates: mirrors.sohu.com
272
273 http://mirrors.sohu.com/centos/6/addons/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
274
275 尝试其他镜像。
276
277 http://mirror.us.leaseweb.net/centos/6/addons/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
278
279 尝试其他镜像。
280
281 http://centos.mirror.iweb.ca/6/addons/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
282
283 尝试其他镜像。
284
285 http://ftp.jaist.ac.jp/pub/Linux/CentOS/6/addons/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
286
287 尝试其他镜像。
288
289 http://mirror.steadfast.net/centos/6/addons/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
290
291 尝试其他镜像。
292
293 http://ftp.hosteurope.de/mirror/centos.org/6/addons/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
294
295 尝试其他镜像。
296
297 http://mirror.centos.org/centos/6/addons/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
298
299 尝试其他镜像。
300
301 ^Z
302
303
304
305 这说明搜狐的centos6的yum仓库不能用了,
306
307 [root@zengqingfu yum.repos.d]# ls
308
309 bak  CentOS-Base-sohu.repo
310
311 [root@zengqingfu yum.repos.d]# rm CentOS-Base-sohu.repo
312
313 rm:是否删除普通文件 "CentOS-Base-sohu.repo"?y
314
315 [root@zengqingfu yum.repos.d]# ls
316
317 Bak
318
319 在百度上搜索到网易的centos6的yum仓库位置配置文件:
320
321 [root@zengqingfu yum.repos.d]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
322
323 --2017-04-22 18:47:37--  http://mirrors.163.com/.help/CentOS6-Base-163.repo
324
325 正在解析主机 mirrors.163.com... 123.58.173.185, 123.58.173.186
326
327 正在连接 mirrors.163.com|123.58.173.185|:80... 已连接。
328
329 已发出 HTTP 请求,正在等待回应... 200 OK
330
331 长度:2006 (2.0K) [application/octet-stream]
332
333 正在保存至: “CentOS6-Base-163.repo”
334
335
336
337 100%[===============================================================================>] 2,006       --.-K/s   in 0s
338
339
340
341 2017-04-22 18:47:37 (36.1 MB/s) - 已保存 “CentOS6-Base-163.repo” [2006/2006])
342
343
344
345 [root@zengqingfu yum.repos.d]# ls
346
347 bak  CentOS6-Base-163.repo
348
349 [root@zengqingfu yum.repos.d]#
350
351
352
353 [root@zengqingfu yum.repos.d]# cd -
354
355 /var/cache/yum/x86_64/6/centos6
356
357 [root@zengqingfu centos6]# ls
358
359 gen  packages
360
361 [root@zengqingfu centos6]# yum makecache
362
363 已加载插件:fastestmirror, priorities, refresh-packagekit, security
364
365 /var/run/yum.pid 已被锁定,PID 为 3572 的另一个程序正在运行。
366
367 另外一个程序锁定了 yum;等待它退出……
368
369   The other application is: yum
370
371     Memory :  20 M RSS (315 MB VSZ)
372
373     Started: Sat Apr 22 18:34:55 2017 - 14:18 ago
374
375     State  : Traced/Stopped, pid: 3572
376
377 另外一个程序锁定了 yum;等待它退出……
378
379   The other application is: yum
380
381     Memory :  20 M RSS (315 MB VSZ)
382
383     Started: Sat Apr 22 18:34:55 2017 - 14:20 ago
384
385     State  : Traced/Stopped, pid: 3572
386
387 ^Z
388
389 [5]+  Stopped                 yum makecache
390
391 [root@zengqingfu centos6]# >/var/run/yum.pid
392
393 [root@zengqingfu centos6]# yum makecache
394
395 已加载插件:fastestmirror, priorities, refresh-packagekit, security
396
397 Loading mirror speeds from cached hostfile
398
399 base                                                                                              | 3.7 kB     00:00
400
401 base/group_gz                                                                                     | 226 kB     00:00
402
403 base/filelists_db                                                                                 | 6.4 MB     02:23
404
405 base/primary_db                                                                                   | 4.7 MB     00:12
406
407 base/other_db                                                                                     | 2.8 MB     00:05
408
409 extras                                                                                            | 3.4 kB     00:00
410
411 extras/filelists_db                                                                               |  25 kB     00:00
412
413 extras/prestodelta                                                                                | 1.3 kB     00:00
414
415 extras/primary_db                                                                                 |  29 kB     00:00
416
417 extras/other_db                                                                                   |  30 kB     00:01
418
419 updates                                                                                           | 3.4 kB     00:00
420
421 updates/filelists_db                                                                              | 719 kB     00:03
422
423 updates/prestodelta                                                                               |  30 kB     00:00
424
425 updates/primary_db                                                                                | 828 kB     00:03
426
427 updates/other_db                                                                                  | 9.2 MB     00:48
428
429 元数据缓存已建立
430
431 [root@zengqingfu centos6]#
432
433 [root@zengqingfu centos6]# yum -y install ftp
434
435 已加载插件:fastestmirror, priorities, refresh-packagekit, security
436
437 设置安装进程
438
439 Loading mirror speeds from cached hostfile
440
441 解决依赖关系
442
443 --> 执行事务检查
444
445 ---> Package ftp.x86_64 0:0.17-54.el6 will be 安装
446
447 --> 完成依赖关系计算
448
449
450
451 依赖关系解决
452
453
454
455 =========================================================================================================================
456
457  软件包                   架构                        版本                               仓库                       大小
458
459 =========================================================================================================================
460
461 正在安装:
462
463  ftp                      x86_64                      0.17-54.el6                        base                       58 k
464
465
466
467 事务概要
468
469 =========================================================================================================================
470
471 Install       1 Package(s)
472
473
474
475 总下载量:58 k
476
477 Installed size: 95 k
478
479 下载软件包:
480
481 ftp-0.17-54.el6.x86_64.rpm                                                                        |  58 kB     00:00
482
483 运行 rpm_check_debug
484
485 执行事务测试
486
487 事务测试成功
488
489 执行事务
490
491   正在安装   : ftp-0.17-54.el6.x86_64                                                                                1/1
492
493   Verifying  : ftp-0.17-54.el6.x86_64                                                                                1/1
494
495
496
497 已安装:
498
499   ftp.x86_64 0:0.17-54.el6
500
501
502
503 完毕!
504
505 [root@zengqingfu centos6]#
506
507 [root@zengqingfu centos6]# yum -y erase ftp
508
509 已加载插件:fastestmirror, priorities, refresh-packagekit, security
510
511 设置移除进程
512
513 解决依赖关系
514
515 --> 执行事务检查
516
517 ---> Package ftp.x86_64 0:0.17-54.el6 will be 删除
518
519 --> 完成依赖关系计算
520
521
522
523 依赖关系解决
524
525
526
527 =========================================================================================================================
528
529  软件包                   架构                        版本                              仓库                        大小
530
531 =========================================================================================================================
532
533 正在删除:
534
535  ftp                      x86_64                      0.17-54.el6                       @base                       95 k
536
537
538
539 事务概要
540
541 =========================================================================================================================
542
543 Remove        1 Package(s)
544
545
546
547 Installed size: 95 k
548
549 下载软件包:
550
551 运行 rpm_check_debug
552
553 执行事务测试
554
555 事务测试成功
556
557 执行事务
558
559   正在删除   : ftp-0.17-54.el6.x86_64                                                                                1/1
560
561   Verifying  : ftp-0.17-54.el6.x86_64                                                                                1/1
562
563
564
565 删除:
566
567   ftp.x86_64 0:0.17-54.el6
568
569
570
571 完毕!

View Code

二、构建本地yum仓库(以下方法中介绍的和直接挂在光盘,然后修改Centos-Media.repo文件是一样的效果)

  1 [root@zengqingfu centos6]# cd -
  2 /etc/yum.repos.d
  3 [root@zengqingfu yum.repos.d]# ls
  4 bak  CentOS6-Base-163.repo
  5 [root@zengqingfu yum.repos.d]# mv CentOS6-Base-163.repo bak/
  6 [root@zengqingfu yum.repos.d]# ls
  7 bak
  8 [root@zengqingfu yum.repos.d]# mount | grep "media"
  9 /dev/sr0 on /media/cdrom type iso9660 (ro)
 10 [root@zengqingfu yum.repos.d]# vim local.repo
 11 [root@zengqingfu yum.repos.d]# vim local.repo
 12
 13 [local]
 14 name=centos
 15 baseurl=file:///media/cdrom
 16 gpgcheck=0
 17 enabled=1
 18 ~
 19 [root@zengqingfu yum.repos.d]# cd -
 20 /var/cache/yum/x86_64/6/centos6
 21 [root@zengqingfu centos6]# ls
 22 gen  packages
 23 [root@zengqingfu centos6]# yum makecache
 24 已加载插件:fastestmirror, priorities, refresh-packagekit, security
 25 Loading mirror speeds from cached hostfile
 26 local                                                                                             | 4.0 kB     00:00 ...
 27 local/group_gz                                                                                    | 216 kB     00:00 ...
 28 local/filelists_db                                                                                | 6.0 MB     00:00 ...
 29 local/primary_db                                                                                  | 4.5 MB     00:00 ...
 30 local/other_db                                                                                    | 2.8 MB     00:00 ...
 31 元数据缓存已建立
 32 [root@zengqingfu centos6]# ls
 33 gen  packages
 34 [root@zengqingfu centos6]# cd ..
 35 [root@zengqingfu 6]# ls
 36 addons  base  centos6  extras  local  rpmforge  timedhosts.txt  updates
 37 [root@zengqingfu 6]# cd addons/
 38 [root@zengqingfu addons]# ls
 39 mirrorlist.txt  packages  repomd5tmd6Wtmp.xml  repomdN65Ps2tmp.xml  repomdQq38IWtmp.xml  repomdscWhv5tmp.xml
 40 [root@zengqingfu addons]# cd ..
 41 [root@zengqingfu 6]# cd base/
 42 [root@zengqingfu base]# ls
 43 1cde788f77b08a7eb3dfdba12fa384a5f0214147a717a1e2d4504368037fba90-c6-x86_64-comps.xml.gz  gen
 44 57de5f5b01f94e309bc9d2cd5bc0d638826ae37477cb14b3517e32323e8a72ab-filelists.sqlite        mirrorlist.txt
 45 5d14ebd60604f4433dcc8a3a17cd3bbc7b80ec5dff74cbcc50dab6e711959265-primary.sqlite          packages
 46 99137e20bbd4be46ff37688204670b281df5dfb0501bdb00031e01a46563ca92-other.sqlite            repomd.xml
 47 cachecookie
 48 [root@zengqingfu base]# cd ..
 49 [root@zengqingfu 6]# cd local/
 50 [root@zengqingfu local]# ls
 51 036dd72d77ba4abf25f5583b7973558f5f7a6bc90ee18be1f27a9d93072313f8-primary.sqlite          cachecookie
 52 3dd75f6c0394f9a55bd6d15102dc023d27c057c99182cca8b0d3c8f71912fc62-filelists.sqlite        gen
 53 460862ca0e99160b41eecc41b944eb2abc0b82609bd12407bc5609922627eac4-c6-x86_64-comps.xml.gz  packages
 54 9a5c649c5eb8b0b1365aa19954766d0ea80ee59b701b41a555792443456557f3-other.sqlite            repomd.xml
 55 [root@zengqingfu local]# pwd
 56 /var/cache/yum/x86_64/6/local
 57 [root@zengqingfu local]#
 58
 59 [root@zengqingfu local]# yum -y install ftp
 60 已加载插件:fastestmirror, priorities, refresh-packagekit, security
 61 设置安装进程
 62 Loading mirror speeds from cached hostfile
 63 解决依赖关系
 64 --> 执行事务检查
 65 ---> Package ftp.x86_64 0:0.17-54.el6 will be 安装
 66 --> 完成依赖关系计算
 67
 68 依赖关系解决
 69
 70 =========================================================================================================================
 71  软件包                   架构                        版本                              仓库                        大小
 72 =========================================================================================================================
 73 正在安装:
 74  ftp                      x86_64                      0.17-54.el6                       local                       58 k
 75
 76 事务概要
 77 =========================================================================================================================
 78 Install       1 Package(s)
 79
 80 总下载量:58 k
 81 Installed size: 95 k
 82 下载软件包:
 83 运行 rpm_check_debug
 84 执行事务测试
 85 事务测试成功
 86 执行事务
 87   正在安装   : ftp-0.17-54.el6.x86_64                                                                                1/1
 88   Verifying  : ftp-0.17-54.el6.x86_64                                                                                1/1
 89
 90 已安装:
 91   ftp.x86_64 0:0.17-54.el6
 92
 93 完毕!
 94 [root@zengqingfu local]#
 95
 96
 97 一些yum命令:
 98 [root@zengqingfu local]# yum info ftp
 99 已加载插件:fastestmirror, priorities, refresh-packagekit, security
100 Loading mirror speeds from cached hostfile
101 已安装的软件包
102 Name        : ftp
103 Arch        : x86_64
104 Version     : 0.17
105 Release     : 54.el6
106 Size        : 95 k
107 Repo        : installed
108 From repo   : local
109 Summary     : The standard UNIX FTP (File Transfer Protocol) client
110 URL         : ftp://ftp.uk.linux.org/pub/linux/Networking/netkit
111 License     : BSD with advertising
112 Description : The ftp package provides the standard UNIX command-line FTP (File
113             : Transfer Protocol) client.  FTP is a widely used protocol for
114             : transferring files over the Internet and for archiving files.
115             :
116             : If your system is on a network, you should install ftp in order to do
117             : file transfers.
118
119 [root@zengqingfu local]# yum search ftp
120 已加载插件:fastestmirror, priorities, refresh-packagekit, security
121 Loading mirror speeds from cached hostfile
122 =================================================== N/S Matched: ftp ====================================================
123 ftp.x86_64 : The standard UNIX FTP (File Transfer Protocol) client
124 gvfs-obexftp.x86_64 : ObexFTP support for gvfs
125 lftp-scripts.noarch : Scripts for lftp
126 syslinux-tftpboot.noarch : SYSLINUX modules in /var/lib/tftpboot, available for network booting
127 tftp.x86_64 : The client for the Trivial File Transfer Protocol (TFTP)
128 tftp-server.x86_64 : The server for the Trivial File Transfer Protocol (TFTP)
129 vsftpd.x86_64 : Very Secure Ftp Daemon
130 curl.x86_64 : A utility for getting files from remote servers (FTP, HTTP, and others)
131 krb5-appl-clients.x86_64 : Kerberos-aware telnet, ftp, rcp, rsh and rlogin clients
132 krb5-appl-servers.x86_64 : Kerberos-aware telnet, ftp, rcp, rsh and rlogin servers
133 lftp.i686 : A sophisticated file transfer program
134 lftp.x86_64 : A sophisticated file transfer program
135 python-twisted-conch.x86_64 : SSH and SFTP protocol implementation together with clients and servers
136 wget.x86_64 : A utility for retrieving files using the HTTP or FTP protocols
137
138   Name and summary matches only, use "search all" for everything.
139
140
141 [root@zengqingfu local]# yum grouplist
142 已加载插件:fastestmirror, priorities, refresh-packagekit, security
143 设置组进程
144 Loading mirror speeds from cached hostfile
145 已安装的组:
146    Eclipse
147    Emacs
148    FTP 服务器
149    Java 平台
150    MySQL 数据库客户端
151    MySQL 数据库服务器
152    NFS 文件服务器
153    PHP 支持
154    Perl 支持
155    PostgreSQL 数据库客户端
156    SNMP 支持
157    TeX 支持
158    X 窗口系统
159    iSCSI 存储客户端
160    万维网服务器
161    互联网浏览器
162    可扩展文件系统
163    图形生成工具
164    图形管理工具
165    基本
166    大系统性能
167    字体
168    安全性工具
169    开发工具
170    性能工具
171    打印客户端
172    打印服务器
173    拨号网络支持
174    控制台互联网工具
175    服务器平台
176    服务器平台开发
177    桌面
178    桌面调试和运行工具
179    电子邮件服务器
180    目录客户端
181    硬件监控工具
182    科学记数法支持
183    科技写作
184    继承 UNIX 兼容性
185    继承 X Windows 系统的兼容性
186    网络基础设施服务器
187    网络文件系统客户端
188    联网工具
189    虚拟化
190    虚拟化客户端
191    输入法
192    通用桌面
193    附加开发
194 Installed Language Groups:
195    不丹语支持 [dz]
196    中文支持 [zh]
197    乌尔都语支持 [ur]
198    亚美尼亚语支持 [hy]
199    伊努伊特语支持 [iu]
200    印地语支持 [hi]
201    叙利亚语支持 [or]
202    古吉拉特语支持 [gu]
203    古吉拉特语支持 [mr]
204    坎纳达语支持 [kn]
205    埃塞俄比亚语支持 [am]
206    塔吉克语支持 [tg]
207    孟加拉语支持 [bn]
208    希伯来语支持 [he]
209    希腊语支持 [el]
210    库德语支持 [ku]
211    康干语支持 [kok]
212    文达语支持 [ve]
213    新哈拉语支持 [si]
214    旁遮普语支持 [pa]
215    日语支持 [ja]
216    格鲁吉亚语支持 [ka]
217    比哈尔语支持 [mai]
218    泰卢固语支持 [te]
219    泰米尔语支持 [ta]
220    泰语支持 [th]
221    缅甸语支持 [my]
222    老挝语支持 [lo]
223    阿拉伯语支持 [ar]
224    阿萨姆语支持 [as]
225    韩文支持 [ko]
226    马来语支持 [ml]
227    高棉语支持 [km]
228 有效的组:
229    CIFS 文件服务器
230    FCoE 存储客户端
231    Infiniband 支持
232    KDE 桌面
233    PostgreSQL 数据库服务器
234    Ruby 支持
235    TurboGear 应用程序框架
236    Web 服务器程序引擎
237    主框架访问
238    互联网应用程序
239    兼容程序库
240    办公套件和生产率
241    基于网页的企业级管理
242    备份客户端
243    备份服务器
244    存储可用性工具
245    客户端管理工具
246    弹性存储
247    智能卡支持
248    桌面平台
249    桌面平台开发
250    目录服务器
251    短信客户端支持
252    系统管理
253    系统管理工具
254    网络存储服务器
255    虚拟化工具
256    虚拟化平台
257    虚拟机代理
258    调试工具
259    负载平衡器
260    身份管理服务器
261    远程桌面客户端
262    高可用性
263    高可用性管理
264 Available Language Groups:
265    上索布语支持 [hsb]
266    世界语支持 [eo]
267    丹麦语支持 [da]
268    乌克兰语支持 [uk]
269    乌兹别克语支持 [uz]
270    低地撒克逊语支持 [nds]
271    佛里乌里语支持 [fur]
272    俄语支持 [ru]
273    保加利亚语支持 [bg]
274    信德语支持 [sd]
275    克什米尔语支持 [ks]
276    克罗地亚语支持 [hr]
277    冰岛语支持 [is]
278    加利西亚语支持 [gl]
279    加泰隆语支持 [ca]
280    匈牙利语支持 [hu]
281    华隆语支持 [wa]
282    南 Ndebele 语支持 [nr]
283    南索托语支持 [st]
284    南非荷兰语支持 [af]
285    卡舒比语支持 [csb]
286    卢旺达语支持 [rw]
287    卢森堡语支持 [lb]
288    印度尼西亚语支持 [id]
289    史瓦希里语支持 [sw]
290    哈萨克语支持 [kk]
291    国际语支持 [ia]
292    土库曼语支持 [tk]
293    土耳其语支持 [tr]
294    埃及古语支持 [cop]
295    塔加洛语支持 [tl]
296    塞尔维亚语支持 [sr]
297    夫里斯兰语支持 [fy]
298    奇卡瓦语支持 [ny]
299    奥克西唐语支持 [oc]
300    威尔士语支持 [cy]
301    宗加语支持 [ts]
302    尼泊尔语支持 [ne]
303    巴斯克语支持 [eu]
304    巴西葡萄牙语支持 [pt_BR]
305    布尔吞语支持 [br]
306    布尔吞语支持 [nso]
307    希利盖农语支持 [hil]
308    德语支持 [de]
309    德顿语支持 [tet]
310    恰蒂斯加尔语支持 [hne]
311    意大利语支持 [it]
312    拉丁语支持 [la]
313    拉脱维亚语支持 [lv]
314    挪威语支持 [nb]
315    捷克语支持 [cs]
316    斐济语支持 [fj]
317    斯洛伐克语支持 [sk]
318    斯洛文尼亚语支持 [sl]
319    斯瓦蒂语支持 [ss]
320    曼岛语支持 [gv]
321    梵语支持 [sa]
322    毛利语支持 [mi]
323    法罗语支持 [fo]
324    法语支持 [fr]
325    波兰语支持 [pl]
326    波斯语支持 [fa]
327    泰斯文那语支持 [tn]
328    爱尔兰语支持 [ga]
329    爱沙尼亚语支持 [et]
330    瑞典语支持 [sv]
331    白俄罗斯语支持 [be]
332    盖尔语支持 [gd]
333    祖鲁语支持 [zu]
334    科萨语支持 [xh]
335    立陶宛语支持 [lt]
336    索马里语支持 [so]
337    罗马尼亚语支持 [ro]
338    芬兰语支持 [fi]
339    英国英语支持 [en_GB]
340    荷兰语支持 [nl]
341    菲律宾语支持 [fil]
342    萨丁尼亚语支持 [sc]
343    葡萄牙语支持 [pt]
344    蒙古语支持 [mn]
345    藏语支持 [bo]
346    西班牙语支持 [es]
347    越南语支持 [vi]
348    阿塞拜疆语支持 [az]
349    阿尔巴尼亚语支持 [sq]
350    阿马兹格语支持 [ber]
351    马其顿语支持 [mk]
352    马尔他语支持 [mt]
353    马来语支持 [ms]
354    马达加斯加语支持 [mg]
355 完成
356 [root@zengqingfu local]# cat /etc/sysconfig/i
357 i18n              ip6tables         ip6tables.old     iptables-config   irqbalance
358 init              ip6tables-config  iptables          iptables.old
359 [root@zengqingfu local]# cat /etc/sysconfig/i
360 i18n              ip6tables         ip6tables.old     iptables-config   irqbalance
361 init              ip6tables-config  iptables          iptables.old
362 [root@zengqingfu local]# cat /etc/sysconfig/i18n
363 LANG="zh_CN.UTF-8"
364 [root@zengqingfu local]# yum -y groupremove 不丹语支持
365 已加载插件:fastestmirror, priorities, refresh-packagekit, security
366 设置组进程
367 Loading mirror speeds from cached hostfile
368 解决依赖关系
369 --> 执行事务检查
370 ---> Package jomolhari-fonts.noarch 0:0.003-8.1.el6 will be 删除
371 --> 完成依赖关系计算
372
373 依赖关系解决
374
375 =========================================================================================================================
376  软件包                   架构            版本                   仓库                                               大小
377 =========================================================================================================================
378 正在删除:
379  jomolhari-fonts          noarch          0.003-8.1.el6          @anaconda-CentOS-201410241409.x86_64/6.6          2.2 M
380
381 事务概要
382 =========================================================================================================================
383 Remove        1 Package(s)
384
385 Installed size: 2.2 M
386 下载软件包:
387 运行 rpm_check_debug
388 执行事务测试
389 事务测试成功
390 执行事务
391   正在删除   : jomolhari-fonts-0.003-8.1.el6.noarch                                                                  1/1
392   Verifying  : jomolhari-fonts-0.003-8.1.el6.noarch                                                                  1/1
393
394 删除:
395   jomolhari-fonts.noarch 0:0.003-8.1.el6
396
397 完毕!
398
399
400 [root@zengqingfu local]# yum -y groupinstall 短信客户端支持
401 已加载插件:fastestmirror, priorities, refresh-packagekit, security
402 设置组进程
403 Loading mirror speeds from cached hostfile
404 解决依赖关系
405 --> 执行事务检查
406 ---> Package python-qpid.noarch 0:0.14-11.el6_3 will be 安装
407 --> 处理依赖关系 python-saslwrapper >= 0.10,它被软件包 python-qpid-0.14-11.el6_3.noarch 需要
408 ---> Package python-qpid-qmf.x86_64 0:0.14-14.el6_3 will be 安装
409 ---> Package qpid-cpp-client.x86_64 0:0.14-22.el6_3 will be 安装
410 ---> Package qpid-qmf.x86_64 0:0.14-14.el6_3 will be 安装
411 ---> Package qpid-tools.noarch 0:0.14-6.el6_3 will be 安装
412 --> 执行事务检查
413 ---> Package python-saslwrapper.x86_64 0:0.14-1.el6 will be 安装
414 --> 处理依赖关系 saslwrapper = 0.14-1.el6,它被软件包 python-saslwrapper-0.14-1.el6.x86_64 需要
415 --> 处理依赖关系 libsaslwrapper.so.1()(64bit),它被软件包 python-saslwrapper-0.14-1.el6.x86_64 需要
416 --> 执行事务检查
417 ---> Package saslwrapper.x86_64 0:0.14-1.el6 will be 安装
418 --> 完成依赖关系计算
419
420 依赖关系解决
421
422 =========================================================================================================================
423  软件包                              架构                    版本                           仓库                    大小
424 =========================================================================================================================
425 正在安装:
426  python-qpid                         noarch                  0.14-11.el6_3                  local                  410 k
427  python-qpid-qmf                     x86_64                  0.14-14.el6_3                  local                  328 k
428  qpid-cpp-client                     x86_64                  0.14-22.el6_3                  local                  1.0 M
429  qpid-qmf                            x86_64                  0.14-14.el6_3                  local                  410 k
430  qpid-tools                          noarch                  0.14-6.el6_3                   local                   38 k
431 为依赖而安装:
432  python-saslwrapper                  x86_64                  0.14-1.el6                     local                   25 k
433  saslwrapper                         x86_64                  0.14-1.el6                     local                   19 k
434
435 事务概要
436 =========================================================================================================================
437 Install       7 Package(s)
438
439 总下载量:2.2 M
440 Installed size: 9.4 M
441 下载软件包:
442 -------------------------------------------------------------------------------------------------------------------------
443 总计                                                                                     3.8 MB/s | 2.2 MB     00:00
444 运行 rpm_check_debug
445 执行事务测试
446 事务测试成功
447 执行事务
448   正在安装   : qpid-cpp-client-0.14-22.el6_3.x86_64                                                                  1/7
449   正在安装   : qpid-qmf-0.14-14.el6_3.x86_64                                                                         2/7
450   正在安装   : saslwrapper-0.14-1.el6.x86_64                                                                         3/7
451   正在安装   : python-saslwrapper-0.14-1.el6.x86_64                                                                  4/7
452   正在安装   : python-qpid-0.14-11.el6_3.noarch                                                                      5/7
453   正在安装   : python-qpid-qmf-0.14-14.el6_3.x86_64                                                                  6/7
454   正在安装   : qpid-tools-0.14-6.el6_3.noarch                                                                        7/7
455   Verifying  : qpid-cpp-client-0.14-22.el6_3.x86_64                                                                  1/7
456   Verifying  : python-saslwrapper-0.14-1.el6.x86_64                                                                  2/7
457   Verifying  : saslwrapper-0.14-1.el6.x86_64                                                                         3/7
458   Verifying  : qpid-qmf-0.14-14.el6_3.x86_64                                                                         4/7
459   Verifying  : qpid-tools-0.14-6.el6_3.noarch                                                                        5/7
460   Verifying  : python-qpid-qmf-0.14-14.el6_3.x86_64                                                                  6/7
461   Verifying  : python-qpid-0.14-11.el6_3.noarch                                                                      7/7
462
463 已安装:
464   python-qpid.noarch 0:0.14-11.el6_3   python-qpid-qmf.x86_64 0:0.14-14.el6_3   qpid-cpp-client.x86_64 0:0.14-22.el6_3
465   qpid-qmf.x86_64 0:0.14-14.el6_3      qpid-tools.noarch 0:0.14-6.el6_3
466
467 作为依赖被安装:
468   python-saslwrapper.x86_64 0:0.14-1.el6                         saslwrapper.x86_64 0:0.14-1.el6
469
470 完毕!
471 [root@zengqingfu local]#

View Code

转载于:https://www.cnblogs.com/zengqingfu1442/p/6883621.html

两种方法配置yum仓库相关推荐

  1. yum 安装oraclejdk_linux服务器上安装jdk的两种方法(yum+下载包)

    前言 对于开发者来说,安装jdk按理说是非常简单的事,但在linux下安装着实费了我这个一直玩windows的小白不少劲.这里简单把步骤梳理下,希望能帮助像我这样的纯小白人士少踩点坑. 这里介绍两种安 ...

  2. Windows Docker 配置国内镜像源的两种方法

    Windows Docker配置国内镜像源的两种方法 更新时间 2022.04.14 通过Docker-Desktop界面操作和修改daemon.json两种方法配置国内镜像源 方法一:通过Docke ...

  3. 配置 yum 源的两种方法

    配置 yum 源的两种方法 由于 redhat的yum在线更新是收费的,如果没有注册的话不能使用,如果要使用,需将redhat的yum卸载后,重启安装,再配置其他源,以下为详细过程: 1.删除redh ...

  4. Linux centos7升级内核(两种方法:内核编译和yum更新)

                Linux centos7升级内核(两种方法:内核编译和yum更新) Linux的内核概念不用说大家也很清楚,正是内核版本的不同,才有Linux发行版本的说法,现在主流的cen ...

  5. 【错误记录】NDK 导入外部 so 动态库报错 ( java.lang.UnsatisfiedLinkError | Android Studio 配置外部 so 动态库两种方法 )

    文章目录 一.报错信息 二.解决方案 ( Android Studio 配置外部 so 动态库两种方法 ) 1.jniLibs 目录存放 2.libs 目录存放 一.报错信息 外部引用 so 动态库 ...

  6. 详解mybatis的配置setMapperLocations多个路径两种方法

    文章目录 一.配置文件方式 二.Javabean配置 前言:我们在平常工作中用到mybatis去加载Mapper.xml文件,可能mapper文件放的路径不一样,由此我们需要配置多个路径,幸运的是My ...

  7. httos双向认证配置_APP爬虫双向认证抓包的两种方法

    APP抓包相对繁琐,越来越多的 APP 在 https 请求和响应时,为了防止中间人攻击(或中间人抓包),会做证书认证,让抓包工具抓不到请求.证书认证分单向认证和双向认证,双向认证是相较于单向认证而言 ...

  8. 路由删除命令_清除思科路由器配置信息的两种方法

    对于网络设备来说,清除思科路由器配置信息是防止黑客轻松地连接访问公司网络的最佳方法.在对Cisco路由器进行清理时,有两种不同的方法可供选择,而它们通常用于不同的方面: 一.知道路由器的密码,相关步骤 ...

  9. 【短信发送】实现腾讯云发送短信功能--工具类和SpringBoot配置两种方法实现

    实现腾讯云发送短信功能--工具类和SpringBoot配置两种方法实现 一.开通腾讯云短信服务 二.工具类--使用qcloudsms实现短信发送 三.Spring Boot项目引入短信发送功能 我们发 ...

最新文章

  1. 简单做了一个sina微博的MVC第三方登陆
  2. Redis开发运维实践问题处理只内存检查
  3. 软件测试作业3:软件测试的16条公理
  4. emacs c语言 自动补全,Emacs 与 C/C++ 代码自动补全
  5. exp导出excel oracle_如何从Oracle快速导出数据到Excel
  6. DOS窗口的编码页从UTF-8调回GBK
  7. numpy 矩阵与向量相乘_高能!8段代码演示Numpy数据运算的神操作
  8. 20 SD配置-主数据-定义客户账户组
  9. 移动端日历插件_小程序日历组件开发教程!
  10. 乔春洋:品牌文化的意义
  11. 模糊数学模型(一): 隶属函数、模糊集合的表示方法、模糊关系、模糊矩阵
  12. android ios 微信 备份通讯录备份通讯录备份通讯录,苹果手机怎么备份通讯录?手机通讯录微信联系人备份教程...
  13. c语言错误中numeric,LC_NUMERIC
  14. 三十八、C++ 信号捕获
  15. java接入支付宝网站api
  16. 三层架构与MVC架构
  17. web服务器部署证书
  18. 数据结构1800试题(第四章)
  19. 周海汉:Alexa 深入研究
  20. Before you can run VMware, several modules must be compiled and loaded into the running kernel.

热门文章

  1. 北京丁丁租房招聘JAVA开发人员
  2. python每日一个小程序_Python 练习册,每天一个小程序
  3. 合肥ibm服务器维修,合肥IBM/thinkpad笔记本维修
  4. 如果编写 if 时不带 else
  5. OpenVINO 环境配置
  6. DeFi基本概念-开发人员必看
  7. 黎明之路如何用电脑玩 黎明之路PC电脑版玩法教程
  8. 微信移动支付接口申请——2016年5月版
  9. 0英文基础能学计算机编程么,我零基础,英语和数学都不好,能学会编程吗?...
  10. Springboot介绍(超详细)