开发者社区> 问答> 正文

阿里云开源软件镜像站点上线啦!!



         近日,阿里云增设了linux开源软件镜像站点( 镜像地址: http://mirrors.aliyun.com/ ),为CentOS、Debian、Ubuntu等linux云服务器提供了软件源,您可参考镜像右边【help】链接进行配置。若您的云服务器无公网ip,可将软件源域名从mirrors.aliyun.com改为mirrors.aliyuncs.com来访问软件源。



         搭建此开源镜像的目的在于宣传自由软件的价值,提高自由软件社区文化氛围,在国内推广自由软件,满足linux云服务器用户安装软件的需求,欢迎大家使用,有问题请随时反馈我们。下面以Centos 5.7 64位、Centos 6.3 64位、Ubuntu 12.04,Debian 6.0.6为例简单介绍阿里云开源软件源的使用。

Centos 5.7 64位

1. 进入/etc/yum.repos.d/ 备份老的配置文件
cd /etc/yum.repos.d/ &&  mkdir  -p  back && mv *.repo back


2.下载配置
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
如果是阿里云服务器可以把域名替换成内网域名,这样访问源的时候不占有公网带宽
sed -i 's/aliyun.com/aliyuncs.com/'  /etc/yum.repos.d/CentOS-Base.repo

3. 更新索引
yum clean all && yum makecache

4. 使用yum安装软件,以安装apache为例:

yum search httpd
yum install httpd -y
参考: http://mirrors.aliyun.com/help/centos

Centos 6.3 64位

1. 进入/etc/yum.repos.d/ 备份老的配置文件
cd /etc/yum.repos.d/ &&  mkdir  -p back && mv *.repo back

2.下载配置
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
如果是阿里云服务器可以把域名替换成内网域名,这样访问源的时候不占有公网带宽
sed -i 's/aliyun.com/aliyuncs.com/'  /etc/yum.repos.d/CentOS-Base.repo

3. 更新索引
yum clean all && yum makecache

4. 使用yum安装软件,以安装apache为例:

yum search httpd
yum install httpd -y

参考: http://mirrors.aliyun.com/help/centos


Ubuntu 12.04

1. 使用vim 编辑/etc/apt/sources.list


删除原有配置,新增如下配
deb http://mirrors.aliyuncs.com/ubuntu precise main restricted universe multiverse
deb http://mirrors.aliyuncs.com/ubuntu precise-security main restricted universe multiverse
deb http://mirrors.aliyuncs.com/ubuntu precise-updates main restricted universe multiverse
deb http://mirrors.aliyuncs.com/ubuntu precise-proposed main restricted universe multiverse
deb http://mirrors.aliyuncs.com/ubuntu precise-backports main restricted universe multiverse
deb-src http://mirrors.aliyuncs.com/ubuntu precise main restricted universe multiverse
deb-src http://mirrors.aliyuncs.com/ubuntu precise-security main restricted universe multiverse
deb-src http://mirrors.aliyuncs.com/ubuntu precise-updates main restricted universe multiverse
deb-src http://mirrors.aliyuncs.com/ubuntu precise-proposed main restricted universe multiverse
deb-src http://mirrors.aliyuncs.com/ubuntu precise-backports main restricted universe multiverse

2.apt使用
2.1 apt-get update #更新索引
2.2 apt-cache search nginx  #搜索关键字还有nginx的包
2.3 apt-get install nginx #安装nginx


参考: http://mirrors.aliyun.com/help/ubuntu

debian 6.0.6

1. 使用vim 编辑/etc/apt/sources.list

删除原有配置,新增如下配
deb http://mirrors.aliyuncs.com/debian/ squeeze main non-free contrib
deb http://mirrors.aliyuncs.com/debian/ squeeze-proposed-updates main non-free contrib
deb-src http://mirrors.aliyuncs.com/debian/ squeeze main non-free contrib
deb-src http://mirrors.aliyuncs.com/debian/ squeeze-proposed-updates main non-free contrib

2.apt使用
2.1 apt-get update #更新索引
2.2 apt-cache search nginx  #搜索关键字还有nginx的包
2.3 apt-get install nginx #安装nginx


展开
收起
qilu 2014-01-06 18:14:06 99737 0
26 条回答
写回答
取消 提交回答
  • 回 29楼(jookie) 的帖子
    慢慢估计提建议的多了会增加的
    现在主要给阿里云客户用  阿里云好像还没有  bsd的
    2014-01-20 16:37:50
    赞同 展开评论 打赏
  • Re阿里云开源软件镜像站点上线啦!!
    酷毙了,阿里云很给力哦!
    2014-01-18 10:52:15
    赞同 展开评论 打赏
  • Re阿里云开源软件镜像站点上线啦!!
    终于出来了啊

    -------------------------

    Re阿里云开源软件镜像站点上线啦!!


    给力
    2014-01-16 12:17:08
    赞同 展开评论 打赏
  • Re阿里云开源软件镜像站点上线啦!!
    为什么没有freebsd
    2014-01-15 16:09:10
    赞同 展开评论 打赏
  • Re阿里云开源软件镜像站点上线啦!!
    好是好,可惜里面的软件和原源一样没有更新。
    2014-01-13 10:36:48
    赞同 展开评论 打赏
  • 我现在不知道用的是哪一个的。
    请问如何查询得到我用的是哪里的?

    -------------------------

    回 26楼(x00x) 的帖子
    谢谢指导,我准备前去查看一下
    2014-01-11 15:13:50
    赞同 展开评论 打赏
  • Re阿里云开源软件镜像站点上线啦!!
    这个得支持啊,虽然并没有用到上面的库
    2014-01-11 09:54:11
    赞同 展开评论 打赏
  • Re回19楼x00x的帖子
    我看阿里云现在新买的VM还没有内置这个源的,应该是你复制的时候选了Centos用的命令了。
    引用第21楼drmdom于2014-01-10 21:40发表的 回19楼x00x的帖子 :
    按你的方法搞定。谢谢!
    但是我购买的服务器系统就是centos 6.3 64位啊。怎么会里头的配置是centos 5的呢?

    2014-01-10 23:44:11
    赞同 展开评论 打赏
  • Re阿里云开源软件镜像站点上线啦!!
    必须支持哇
    2014-01-10 22:13:38
    赞同 展开评论 打赏
  • 给力中不错
    2014-01-10 20:25:41
    赞同 展开评论 打赏
  • Re阿里云开源软件镜像站点上线啦!!
    centos6.3 64位。替换成内网域名后,更新索引出错。错误信息如下:
    #yum clean all && yum makecache
    执行上面的命令,出错信息如下:
    Loaded plugins: fastestmirror
    Cleaning repos: addons base extras updates
    Cleaning up Everything
    Cleaning up list of fastest mirrors
    Loaded plugins: fastestmirror
    Determining fastest mirrors
    http://mirrors.aliyuncs.com/centos/6/addons/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"
    Trying other mirror.
    Error: Cannot retrieve repository metadata (repomd.xml) for repository: addons. Please verify its path and try again
    请问如何解决?

    -------------------------

    ReReRe阿里云开源软件镜像站点上线啦!!
    引用第19楼x00x于2014-01-10 21:09发表的 ReRe阿里云开源软件镜像站点上线啦!! :
    需要注意centos 5和centos6的配置文件不一样的。

    你这个是自己centos6的OS用了centos 5的配置。

    删除之前的配置文件然后
    .......

    -------------------------

    回19楼x00x的帖子
    按你的方法搞定。谢谢!
    但是我购买的服务器系统就是centos 6.3 64位啊。怎么会里头的配置是centos 5的呢?
    2014-01-10 15:26:49
    赞同 展开评论 打赏
  • Re阿里云开源软件镜像站点上线啦!!
    怎么没有 wind的那···
    2014-01-10 15:25:34
    赞同 展开评论 打赏
  • Re阿里云开源软件镜像站点上线啦!!
    速度很快! 单线程限速50M
    2014-01-09 22:51:07
    赞同 展开评论 打赏
  • Re阿里云开源软件镜像站点上线啦!!
    顶  迟来的好东西啊!

    -------------------------

    ReRe阿里云开源软件镜像站点上线啦!!
    需要注意centos 5和centos6的配置文件不一样的。

    你这个是自己centos6的OS用了centos 5的配置。

    删除之前的配置文件然后
    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

    引用第17楼drmdom于2014-01-10 15:26发表的 Re阿里云开源软件镜像站点上线啦!! :
    centos6.3 64位。替换成内网域名后,更新索引出错。错误信息如下:
    #yum clean all && yum makecache
    执行上面的命令,出错信息如下:
    Loaded plugins: fastestmirror
    Cleaning repos: addons base extras updates
    .......

    -------------------------

    Re阿里云开源软件镜像站点上线啦!!
    cat /etc/issue
    看看自己现在用的是哪个版本
    引用第25楼cuinew于2014-01-11 15:13发表的  :
    我现在不知道用的是哪一个的。
    请问如何查询得到我用的是哪里的?

    -------------------------

    ReRe阿里云开源软件镜像站点上线啦!!
    其实和上游完全同步是最好的。这样自己的能一直同步更新。
    自己可以单独打包放源里面,但是要自独立于官方源维护几万个包实际是不现实的。这也是为什么很多人自己独立搞了一套源,可能开始能比官方源新,但是时间长了肯定就反而变老了。。

    引用第27楼讯众通信于2014-01-13 10:36发表的 Re阿里云开源软件镜像站点上线啦!! :
    好是好,可惜里面的软件和原源一样没有更新。

    2014-01-09 13:44:10
    赞同 展开评论 打赏
  • Centos 5.4更换完毕
    2014-01-09 10:43:26
    赞同 展开评论 打赏
  • 2014-01-08 13:51:19
    赞同 展开评论 打赏
  • Re阿里云开源软件镜像站点上线啦!!
    支持,支持!
    2014-01-08 03:29:07
    赞同 展开评论 打赏
  • Re阿里云开源软件镜像站点上线啦!!
    这个是干嘛的?

    -------------------------

    这个有什么用啊?楼主?

    2014-01-07 21:29:18
    赞同 展开评论 打赏
  • 确实不错
    2014-01-07 18:32:43
    赞同 展开评论 打赏
  • Re阿里云开源软件镜像站点上线啦!!
    这个是做什么用的?
    2014-01-07 15:34:09
    赞同 展开评论 打赏
滑动查看更多
问答排行榜
最热
最新

相关电子书

更多
如何使用 AWS 搭建跨地区的应用体验 立即下载
蚂蚁金服Docker网络插件 开发和实践 立即下载
如何使用AWS构建跨地区的应用体验 立即下载