免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2429 | 回复: 9
打印 上一主题 下一主题

[Linux资讯] centos yum源写法 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-01-25 14:09 |只看该作者 |倒序浏览
有没有会yum源配置的,centos 5版本的 能够运行的,有网络树的一定要好用的,网上的有的不好用,404not found

论坛徽章:
2
拜羊年徽章
日期:2015-03-03 16:15:4315-16赛季CBA联赛之同曦
日期:2018-07-25 19:57:32
2 [报告]
发表于 2013-01-25 14:15 |只看该作者
mirrors.163.com 直接看 centos 那里的帮助,下载对应的 repo 搞定。

论坛徽章:
0
3 [报告]
发表于 2013-01-25 14:40 |只看该作者
能来一个完整的配置吗?我弄完了不好使啊

论坛徽章:
0
4 [报告]
发表于 2013-01-25 16:27 |只看该作者
回复 3# a___武


    参考这个
下载相应的rpm包并安装

论坛徽章:
19
CU大牛徽章
日期:2013-03-13 15:32:35CU大牛徽章
日期:2013-09-18 15:15:15CU大牛徽章
日期:2013-05-20 10:46:44CU大牛徽章
日期:2013-05-20 10:46:38CU大牛徽章
日期:2013-05-20 10:46:31CU大牛徽章
日期:2013-05-20 10:46:25CU大牛徽章
日期:2013-05-20 10:46:18CU大牛徽章
日期:2013-04-17 11:19:51CU大牛徽章
日期:2013-04-17 11:19:42CU大牛徽章
日期:2013-04-17 11:19:37CU大牛徽章
日期:2013-04-17 11:19:32CU大牛徽章
日期:2013-04-17 11:19:28
5 [报告]
发表于 2013-01-25 20:03 |只看该作者
本帖最后由 方兆国 于 2013-01-25 20:04 编辑

b]回复 1# a___武


    很多源网站上都有现成的源文件,下面是163的源


CentOS5
  1. # CentOS-Base.repo
  2. #
  3. # The mirror system uses the connecting IP address of the client and the
  4. # update status of each mirror to pick mirrors that are updated to and
  5. # geographically close to the client.  You should use this for CentOS updates
  6. # unless you are manually picking other mirrors.
  7. #
  8. # If the mirrorlist= does not work for you, as a fall back you can try the
  9. # remarked out baseurl= line instead.
  10. #
  11. #

  12. [base]
  13. name=CentOS-$releasever - Base - 163.com
  14. baseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/
  15. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
  16. gpgcheck=1
  17. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

  18. #released updates
  19. [updates]
  20. name=CentOS-$releasever - Updates - 163.com
  21. baseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/
  22. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
  23. gpgcheck=1
  24. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

  25. #packages used/produced in the build but not released
  26. [addons]
  27. name=CentOS-$releasever - Addons - 163.com
  28. baseurl=http://mirrors.163.com/centos/$releasever/addons/$basearch/
  29. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
  30. gpgcheck=1
  31. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

  32. #additional packages that may be useful
  33. [extras]
  34. name=CentOS-$releasever - Extras - 163.com
  35. baseurl=http://mirrors.163.com/centos/$releasever/extras/$basearch/
  36. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
  37. gpgcheck=1
  38. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

  39. #additional packages that extend functionality of existing packages
  40. [centosplus]
  41. name=CentOS-$releasever - Plus - 163.com
  42. baseurl=http://mirrors.163.com/centos/$releasever/centosplus/$basearch/
  43. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
  44. gpgcheck=1
  45. enabled=0
  46. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

  47. #contrib - packages by Centos Users
  48. [contrib]
  49. name=CentOS-$releasever - Contrib - 163.com
  50. baseurl=http://mirrors.163.com/centos/$releasever/contrib/$basearch/
  51. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
  52. gpgcheck=1
  53. enabled=0
  54. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

复制代码
CentOS6
  1. # CentOS-Base.repo
  2. #
  3. # The mirror system uses the connecting IP address of the client and the
  4. # update status of each mirror to pick mirrors that are updated to and
  5. # geographically close to the client.  You should use this for CentOS updates
  6. # unless you are manually picking other mirrors.
  7. #
  8. # If the mirrorlist= does not work for you, as a fall back you can try the
  9. # remarked out baseurl= line instead.
  10. #
  11. #

  12. [base]
  13. name=CentOS-$releasever - Base - 163.com
  14. baseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/
  15. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
  16. gpgcheck=1
  17. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

  18. #released updates
  19. [updates]
  20. name=CentOS-$releasever - Updates - 163.com
  21. baseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/
  22. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
  23. gpgcheck=1
  24. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

  25. #additional packages that may be useful
  26. [extras]
  27. name=CentOS-$releasever - Extras - 163.com
  28. baseurl=http://mirrors.163.com/centos/$releasever/extras/$basearch/
  29. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
  30. gpgcheck=1
  31. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

  32. #additional packages that extend functionality of existing packages
  33. [centosplus]
  34. name=CentOS-$releasever - Plus - 163.com
  35. baseurl=http://mirrors.163.com/centos/$releasever/centosplus/$basearch/
  36. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
  37. gpgcheck=1
  38. enabled=0
  39. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

  40. #contrib - packages by Centos Users
  41. [contrib]
  42. name=CentOS-$releasever - Contrib - 163.com
  43. baseurl=http://mirrors.163.com/centos/$releasever/contrib/$basearch/
  44. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
  45. gpgcheck=1
  46. enabled=0
  47. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

复制代码

论坛徽章:
0
6 [报告]
发表于 2013-02-19 17:13 |只看该作者
我用不用设这什么环境变量啊 ,http://mirrors.163.com/centos/$releasever/os/$basearch/ 这类的我是不是应该用浏览器能打开啊,我的显示是 404 Not Found

论坛徽章:
381
CU十二周年纪念徽章
日期:2014-01-04 22:46:58CU大牛徽章
日期:2013-03-13 15:32:35CU大牛徽章
日期:2013-03-13 15:38:15CU大牛徽章
日期:2013-03-13 15:38:52CU大牛徽章
日期:2013-03-14 14:08:55CU大牛徽章
日期:2013-04-17 11:17:19CU大牛徽章
日期:2013-04-17 11:17:32CU大牛徽章
日期:2013-04-17 11:17:37CU大牛徽章
日期:2013-04-17 11:17:42CU大牛徽章
日期:2013-04-17 11:17:47CU大牛徽章
日期:2013-04-17 11:17:52CU大牛徽章
日期:2013-04-17 11:17:56
7 [报告]
发表于 2013-02-19 18:55 |只看该作者
那些变量是yum程序用的,不是环境变量,不能赋值

论坛徽章:
0
8 [报告]
发表于 2013-02-20 11:18 |只看该作者
求一个yum源 本地配置写法centos的

论坛徽章:
381
CU十二周年纪念徽章
日期:2014-01-04 22:46:58CU大牛徽章
日期:2013-03-13 15:32:35CU大牛徽章
日期:2013-03-13 15:38:15CU大牛徽章
日期:2013-03-13 15:38:52CU大牛徽章
日期:2013-03-14 14:08:55CU大牛徽章
日期:2013-04-17 11:17:19CU大牛徽章
日期:2013-04-17 11:17:32CU大牛徽章
日期:2013-04-17 11:17:37CU大牛徽章
日期:2013-04-17 11:17:42CU大牛徽章
日期:2013-04-17 11:17:47CU大牛徽章
日期:2013-04-17 11:17:52CU大牛徽章
日期:2013-04-17 11:17:56
9 [报告]
发表于 2013-02-20 12:59 |只看该作者
将光盘挂载到一个目录下面,将上述5楼的baseurl=后面写成file:///挂载路径的方式就好了

论坛徽章:
0
10 [报告]
发表于 2013-08-09 16:16 |只看该作者
{:3_201:}{:3_201:}{:3_201:}{:3_201:}{:3_201:}{:3_201:}{:3_201:}{:3_201:}
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP