OpenAnolis 8.2 简单试用

OpenAnolis

真是后知后觉,之前只从抖音听说过 OpenEuler ,还不知道(昨天才知道)阿里云搞了一个 OpenAnolis 系统。以前去 OpenEuler 网站了解过,大概是一个基于 RHEL 的 Linux 发行版。而 Anolis OS 呢,同样是基于 RHEL ,目标是做一个 CentOS 8 在2021年底停止维护之后的替代品。

不知道为啥中国公司这么喜欢 Redhat 系的 Linux 发行版,中国联通 90% 以上的服务器都使用了 CentOS 。当然了,我最早学习 Linux 也是从 Fedora 开始的,但最近很多年无论是 Linux 桌面还是服务器上我都更喜欢 Debian 系,主要是 Ubuntu 啦。

全球开源发展20余年,以前中国就没有一个 Linux 的上游社区,现在随着国产 CPU 的崛起,本土创新开源操作系统平台应运而生。OpenAnolis 除了支持 x86 和 amd64 这两种常见架构之外,还支持飞腾、海光、兆芯、鲲鹏,龙芯等国产芯片。

公开信息统计,华为对 Linux 贡献了13762条代码,目前已经超过Ubuntu和其母公司Canonical的总贡献数,阿里则是1105条。这两家公司的开源系统,一个叫“欧拉”,一个叫“龙蜥”。如果还说人家是换皮,多少有点不合适了吧,真“国产”无疑啊,不仅为国内数字基础设施提供操作系统,还为国际开源软件贡献力量!

OpenAnolis 8.2 简单试用

目前 OpenAnolis 已经登陆阿里云 ECS 了,不过只有 8.2 版,正好我有一台马上到期的 ECS 服务器,装个 OpenAnolis 8.2 试试看。OpenAnolis 一共有两种内核:

  • RHCK(RHEL Compatible Kernel)
  • ANCK(OpenAnolis Cloud Kernel)

其中ANCK是由社区Cloud Kernel SIG组基于上游4.19 LTS kernel研发,提供对稳定,性能,隔离能力的增强,和海光、飞腾、兆芯、鲲鹏芯片的完善支持。既然是一个中国特色的发行版,我选择了 ANCK 内核。

[root@iZbp14664y88ufuyrhsokhZ ~]# cat /etc/os-release
NAME="Anolis OS"
VERSION="8.2"
ID="anolis"
ID_LIKE="rhel fedora centos"
VERSION_ID="8.2"
PLATFORM_ID="platform:an8"
PRETTY_NAME="Anolis OS 8.2"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"

嗯,果然是 Anolis OS !

[root@iZbp14664y88ufuyrhsokhZ ~]# dnf update
Failed to set locale, defaulting to C.UTF-8
Last metadata expiration check: 0:11:08 ago on Mon Oct 25 00:56:59 2021.
Dependencies resolved.
=======================================================================================================================================
 Package                          Architecture            Version                                        Repository               Size
=======================================================================================================================================
Upgrading:
 anolis-gpg-keys                  noarch                  8.2-14.an8                                     BaseOS                   10 k
 anolis-release                   x86_64                  8.2-14.an8                                     BaseOS                   15 k
 anolis-repos                     x86_64                  8.2-14.an8                                     BaseOS                  9.6 k
 microcode_ctl                    x86_64                  4:20191115-4.20210608.1.an8                    BaseOS                  4.2 M
 virt-what                        x86_64                  1.18-7.an8.1                                   BaseOS                   35 k

Transaction Summary
=======================================================================================================================================
Upgrade  5 Packages

Total download size: 4.3 M
Is this ok [y/N]: y
Downloading Packages:
(1/5): anolis-repos-8.2-14.an8.x86_64.rpm                                                              249 kB/s | 9.6 kB     00:00
(2/5): anolis-release-8.2-14.an8.x86_64.rpm                                                            380 kB/s |  15 kB     00:00
(3/5): anolis-gpg-keys-8.2-14.an8.noarch.rpm                                                           215 kB/s |  10 kB     00:00
(4/5): virt-what-1.18-7.an8.1.x86_64.rpm                                                               1.1 MB/s |  35 kB     00:00
(5/5): microcode_ctl-20191115-4.20210608.1.an8.x86_64.rpm                                               25 MB/s | 4.2 MB     00:00
---------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                   21 MB/s | 4.3 MB     00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                               1/1
  Running scriptlet: anolis-gpg-keys-8.2-14.an8.noarch                                                                             1/1
  Upgrading        : anolis-gpg-keys-8.2-14.an8.noarch                                                                            1/10
  Upgrading        : anolis-release-8.2-14.an8.x86_64                                                                             2/10
  Upgrading        : anolis-repos-8.2-14.an8.x86_64                                                                               3/10
  Upgrading        : virt-what-1.18-7.an8.1.x86_64                                                                                4/10
  Upgrading        : microcode_ctl-4:20191115-4.20210608.1.an8.x86_64                                                             5/10
  Running scriptlet: microcode_ctl-4:20191115-4.20210608.1.an8.x86_64                                                             5/10
  Cleanup          : anolis-release-8.2-13.an8.x86_64                                                                             6/10
  Cleanup          : anolis-repos-8.2-13.an8.x86_64                                                                               7/10
  Cleanup          : anolis-gpg-keys-8.2-13.an8.noarch                                                                            8/10
  Running scriptlet: microcode_ctl-4:20191115-4.20210525.1.el8.x86_64                                                             9/10
  Cleanup          : microcode_ctl-4:20191115-4.20210525.1.el8.x86_64                                                             9/10
  Running scriptlet: microcode_ctl-4:20191115-4.20210525.1.el8.x86_64                                                             9/10
  Cleanup          : virt-what-1.18-6.el8.x86_64                                                                                 10/10
  Running scriptlet: microcode_ctl-4:20191115-4.20210608.1.an8.x86_64                                                            10/10
  Running scriptlet: virt-what-1.18-6.el8.x86_64                                                                                 10/10
  Verifying        : anolis-gpg-keys-8.2-14.an8.noarch                                                                            1/10
  Verifying        : anolis-gpg-keys-8.2-13.an8.noarch                                                                            2/10
  Verifying        : anolis-release-8.2-14.an8.x86_64                                                                             3/10
  Verifying        : anolis-release-8.2-13.an8.x86_64                                                                             4/10
  Verifying        : anolis-repos-8.2-14.an8.x86_64                                                                               5/10
  Verifying        : anolis-repos-8.2-13.an8.x86_64                                                                               6/10
  Verifying        : microcode_ctl-4:20191115-4.20210608.1.an8.x86_64                                                             7/10
  Verifying        : microcode_ctl-4:20191115-4.20210525.1.el8.x86_64                                                             8/10
  Verifying        : virt-what-1.18-7.an8.1.x86_64                                                                                9/10
  Verifying        : virt-what-1.18-6.el8.x86_64                                                                                 10/10

Upgraded:
  anolis-gpg-keys-8.2-14.an8.noarch                       anolis-release-8.2-14.an8.x86_64        anolis-repos-8.2-14.an8.x86_64
  microcode_ctl-4:20191115-4.20210608.1.an8.x86_64        virt-what-1.18-7.an8.1.x86_64

Complete!

升级下系统看看,发现有个错误提示”Failed to set locale, defaulting to C.UTF-8″

[root@iZbp14664y88ufuyrhsokhZ ~]# dnf install glibc-langpack-en
[root@iZbp14664y88ufuyrhsokhZ ~]# localectl set-locale LANG=en_US.UTF-8
#Set LANG and LC_ALL/LC_CTYPE
[root@iZbp14664y88ufuyrhsokhZ ~]# export LANG=en_US.UTF-8
[root@iZbp14664y88ufuyrhsokhZ ~]# export LANGUAGE=en_US.UTF-8
[root@iZbp14664y88ufuyrhsokhZ ~]# export LC_COLLATE=C
[root@iZbp14664y88ufuyrhsokhZ ~]# export LC_CTYPE=en_US.UTF-8

执行这几个命令之后问题解决。

Anolis OS 8.2 正式版发行声明中说 Anolis OS 一共有4个 REPO 源

  • BaseOS
    BaseOS 软件包源,该源目的是提供安装基础的所有核心包。
  • AppStream
    AppStream 软件包源,该源提供额外的多场景,多用途的用户态程序,数据库等。该部分引入了额外的RPM Module形态。
  • PowerTools
    PowerTools 软件包源, 该源提供开发者需要的额外包。
  • Plus
    Plus 软件包源,该源提供OpenAnolis SIG组专门研发包,如ANCK内核,Dragonwell8 JDK等。

但是系统自带的这个 Extra 不知道是干啥的,而且 Plus 源并没有开启。

[root@iZbp14664y88ufuyrhsokhZ ~]# sudo dnf repolist
repo id                                                     repo name
AppStream                                                   AnolisOS-8.2 - AppStream
BaseOS                                                      AnolisOS-8.2 - BaseOS
Extras                                                      AnolisOS-8.2 - Extras
PowerTools                                                  AnolisOS-8.2 - PowerTools

开启 Plus 源之后看看:

[root@iZbp14664y88ufuyrhsokhZ ~]# sudo dnf config-manager --set-enabled Plus
[root@iZbp14664y88ufuyrhsokhZ ~]# sudo dnf update
AnolisOS-8.2 - Plus                                                                                     24 MB/s | 4.9 MB     00:00
Last metadata expiration check: 0:00:01 ago on Mon 25 Oct 2021 01:29:07 AM CST.
Dependencies resolved.
Nothing to do.
Complete!
[root@iZbp14664y88ufuyrhsokhZ ~]# dnf search tengine
Last metadata expiration check: 0:00:11 ago on Mon 25 Oct 2021 01:29:07 AM CST.
==================================================== Name Exactly Matched: tengine ====================================================
tengine.x86_64 : A distribution of Nginx with some advanced features

这个源里之后OpenAnolis SIG 组里面的一些软件,想装个 htop 都没有,因为和 CentOS 是 100% 兼容的,还得装个 EPEL 源才行。

sudo dnf install epel-release
sudo dnf clean all && dnf makecache

之后总算可以使用 dnf install htop 来安装 htop 了。

其实我用 Linux 当服务器也只会一些基本的操作,搭建一些基本的服务。装个 Caddy 2 看看。

dnf install 'dnf-command(copr)'
dnf copr enable @caddy/caddy
dnf install caddy
OpenAnolis 8.2 安装 Caddy

没问题,除了可以使用 epel 源,也可以使用 copr 源,感觉速度比我搬瓦工的 CentOS 7 快,挺好。我有点喜欢这个发行版了。


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *