华为云开源镜像上手体验
镜像首页:https://mirrors.huaweicloud.com/
第一印象确实是用心在做这个事,界面排版配色都很ok,先点个赞!!!
先呈上一张截图

我们看看华为云镜像界面的几个特色:
一 . 镜像不是杂乱无章的排列,显示的很有条理,按照不同的标签进行了分类,点击不同的标签进入不同的分类

二 . 提供了搜索功能,可以方便的找到需要的镜像,目前来看有三个分类,分别是repository,npm,pip

我们分别体验一下,首先选择分类repository

每个镜像,华为云都为大家准备了详细的说明文档甚至直接可以下载配置文件来使用,如果还觉得不够还可以点新手指引,到论坛的帖子里了解

再来看看npm

最后来看看pypi

我们选中其中一条点进去看下
首先可以看到一个详细的说明,下面是版本列表,右边提供了链接和下载地址


以上我们从表面现象看了下华为云开源镜像的页面,但是大家都知道开源镜像真正要发挥作用要看它速度到底快不快。接下来我们拿几个镜像来实验一下。
Maven
按照华为云镜像的使用说明顺利安装maven并配置了华为云的源

新建了一个很简单的pom.xml,然后执行mvn install
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.zyx.test</groupId>
<artifactId>my-project</artifactId>
<version>1.0</version>
<packaging>war</packaging>
<!-- https://mvnrepository.com/artifact/org.mongodb/mongo-java-driver -->
<dependencies>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
<version>3.9.1</version>
</dependency>
</dependencies>
</project>

我们看到速度快的能有一百多k/s,慢的是几k/s,应该还有提升的空间
rubygem
按照华为云镜像的使用说明顺利安装了ruby和rubygem,并配置了华为云的源,

之后执行了命令gem list --remote,大约5秒的样子就有返回结果

还执行了gem search STRING --remote,大约3秒的样子就有返回结果

执行sudo gem install -n /usr/local/bin bundler 也很快就安装好了

Php Composer
目前国内似乎只有一个中国镜像https://pkg.phpcomposer.com/
该网页排版简洁,介绍也很详细,速度也很ok
华为云加入之后为composer提供了新的选择
按照华为云镜像的使用说明配置了华为的源,然后执行composer require monolog/monolog,可以看到很快就完成了包的加载


npm
按照华为云镜像的使用说明配置了华为的源,然后执行npm install mongoose,速度还是很ok的


Pypi
按照华为云镜像的使用说明配置了华为的源,然后执行命令pip install flask
基本上速度都有1M/s 以上的速度,赞


sbt
安装sbt后按照华为云镜像的使用说明配置sbt的镜像,然后根据
操作,执行sbt new scala/hello-world.g8,速度还ok,不过觉得还有提升空间
整体体验下来,华为云的开源镜像还是棒棒哒,各位赶紧用起来吧,有什么建议和意见欢迎大家踊跃提出来,促使华为云开源镜像更好的服务广大开发者
关于华为云镜像站的更多介绍请参考:https://bbs.huaweicloud.com/forum/thread-10265-1-1.html