由于 Appnode 出了我们无法解决的玄学问题,打算重装一下服务器,换用 lnmp.org。
原来用的是 CentOS 7,听说 CentOS 8 出了。比较了一下本决定安装 CentOS 8,结果就看到一条非常令人震惊的消息:「CentOS 已死!」

[warning]这其实是一篇火星文。CentOS 官方在 2020 年 12 月 8 日发表了公告,然而我现在才知道。[/warning]

CentOS 已死

CentOS 官方在 2020 年 12 月 8 日发表了这个公告:CentOS Project shifts focus to CentOS Stream

CentOS Project shifts focus to CentOS Stream
The future of the CentOS Project is CentOS Stream, and over the next year we’ll be shifting focus from CentOS Linux, the rebuild of Red Hat Enterprise Linux (RHEL), to CentOS Stream, which tracks just ahead of a current RHEL release. CentOS Linux 8, as a rebuild of RHEL 8, will end at the end of 2021. CentOS Stream continues after that date, serving as the upstream (development) branch of Red Hat Enterprise Linux.
Meanwhile, we understand many of you are deeply invested in CentOS Linux 7, and we’ll continue to produce that version through the remainder of the RHEL 7 life cycle.

翻译翻译:

  • CentOS 8 原计划维护到 2029 年,现在我们出尔反尔,到 2021 年底就不维护啦.
  • CentOS 7 按照原计划维护到 2024 年。
  • 之后就没有 CentOS 啦。

那我仍然想用 CentOS 平台怎么办呢?官方提供了「解决方案」:

When CentOS Linux 8 (the rebuild of RHEL8) ends, your best option will be to migrate to CentOS Stream 8, which is a small delta from CentOS Linux 8, and has regular updates like traditional CentOS Linux releases. If you are using CentOS Linux 8 in a production environment, and are concerned that CentOS Stream will not meet your needs, we encourage you to contact Red Hat about options.

翻译翻译:

  • 你最好用 CentOS Stream 8,这个处于 RHEL 上游的操作系统滚动发行,更不稳定,bug 更多,其实就是帮我们当小白鼠测试 RHEL。换句话说,新的 CentOS Stream 8 就是 RHEL 的 beta 版。
  • 如果你想要和原来一样稳定的 CentOS 用于生产环境,那就联系我们,付钱。

这个决定引起了社区的公愤。有人甚至做了恶搞网站 centos.rip,页脚写的这句话特别具有讽刺性:

The CentOS Project is a collection of free involuntary production machines for beta testing for RedHat Enterprise Linux. Testing RedHat on your production servers circa 2020.

起源

2004 年,CentOS 项目问世。CentOS 是一个社区支持的发行版,使用红帽公司的 RHEL 作为上游。

因为 RHEL 是开源的,基于社区的 CentOS 从 RHEL 的源码修改而来,主要是移除 RHEL 的商标和闭源软件。

由于 CentOS 的稳定性,其迅速成为生产环境服务器上应用最广泛的操作系统。

病变

2014 年 1 月 7 日,CentOS 发表公告:CentOS Project joins forces with Red Hat

With great excitement I'd like to announce that we are joining the Red Hat family. The CentOS Project ( http://www.centos.org ) is joining forces with Red Hat.

Red Hat 开始给 CentOS 提供赞助并取得了 CentOS 商标的所有权,实际上「收购」了 CentOS。事实上这个社区的领导层已经都被「偷偷摸摸」换成了红帽的员工或者与其有直接利益关系的人。

当时他们给出了承诺:

Some of the things that are not changing:

  • The CentOS Linux platform isn't changing. The process and methods built up around the platform however are going to become more open, more inclusive and transparent.
  • The sponsor driven content network that has been central to the success of the CentOS efforts over the years stays intact.
  • The bugs, issues, and incident handling process stays as it has been with more opportunities for community members to get involved at various stages of the process.
  • The Red Hat Enterprise Linux to CentOS firewall will also remain. Members and contributors to the CentOS efforts are still isolated from the RHEL Groups inside Red Hat, with the only interface being srpm / source path tracking, no sooner than is considered released. In summary: we retain an upstream.

Feel free to reach out if you have specific concerns about how this change impacts your CentOS story. URLs mentioned at the bottom of this email should be a good starting point.

现在看来他们果然没有遵守承诺。从被「收购」的一刻起,CentOS 就已经在 Red Hat 的操控之下,或许就已经死了。

或许 Red Hat 早有计划。

Red Hat 作为第一家收入达十亿美元的开源公司,是开源领域的行业领头羊。
然而 CentOS 的出现对 RHEL 的销售带来太大的影响,成了 Red Hat 的障碍。于是 Red Hat 以友好的态度「赞助」或是「收购」CentOS,7 年来逐步渗透和打破这个「The Red Hat Enterprise Linux to CentOS firewall」,然而最终搞死 CentOS 才是他们的目的。
现在,时机成熟了,扫清 CentOS 这个障碍就是一弹指的事情。

不得不说,真是一个十分英明的计划。

新生:Rocky Linux

CentOS 早期的发起人 Gregory Kurtzer 发起了一个新的「CentOS」:Rocky Linux,作为新的 RHEL 的下游。

现在,Rocky Linux 已经发行了第一个版本。可能这也算是 CentOS 的一个新生吧。我们可以感叹,在商业和自由的斗争中,还有某种精神会一直留存下去。

感想

自由软件的世界里,社区项目被商业公司操纵的案例屡见不鲜,MySQL 事件即为一例。MySQL 催生了 MariaDB,也获得了一定程度上的成功,CentOS 催生的 Rocky Linux 能不能再一次成功呢?

但是我们又如何保证 MariaDB 和 Rocky Linux 不重蹈 MySQL 和 CentOS 的覆辙?

是不是自由软件的世界就是在「社区驱动 - 商业赞助/收购 - 被搞死 - 新的社区驱动」中的轮回呢?

资本来到世间,从头到脚,每个毛孔都滴着血和肮脏的东西。
——马克思《资本论》

换用 Debian

对于小型服务器,CentOS 以外,剩下的选择基本只剩下 Ubuntu 和 Debian。
考虑到 Ubuntu 也是商业公司运作的产品,虽然开源,但是总没有 Debian 的这种 100% 自由的纯粹性(虽然可能性很小,但是也不是没有重蹈 CentOS 覆辙的可能)。并且 Ubuntu 基于 Debian,但是没有 Debian 轻量。于是我还是选用了 Debian。

升级到 Debian 11

阿里云只提供了 Debian 10(buster)的镜像,然而 lnmp 要求安装环境 Debian 11(bullseye)。为此我们要自己升级 Debian。参考:将 Debian 10 Buster 升级到 11 Bullseye。整个过程还是很快的。

首先检查更新并安装升级要用的 gcc-8-base 包:

sudo apt update && sudo apt upgrade
sudo apt install gcc-8-base

编辑 /etc/apt/sources.list,注释掉原来的 buster 仓库,换成 bullseye。建议使用清华源

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free

deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free

然后就可以更新了:

sudo apt update
sudo apt full-upgrade

清华源真的很快,下载速度可以达到 10+M/s。
完成后重启系统,然后清理不必要的安装包:

sudo apt --purge autoremove

现在查看系统信息,可以发现已经是 debian 11 啦!

Debian 截图

CentOS,感谢曾经的你陪我走过的路。有缘再见吧。