惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

宝玉的分享
宝玉的分享
L
LINUX DO - 最新话题
Stack Overflow Blog
Stack Overflow Blog
月光博客
月光博客
雷峰网
雷峰网
Apple Machine Learning Research
Apple Machine Learning Research
V
Visual Studio Blog
Attack and Defense Labs
Attack and Defense Labs
O
OpenAI News
The GitHub Blog
The GitHub Blog
A
About on SuperTechFans
B
Blog RSS Feed
H
Help Net Security
量子位
小众软件
小众软件
SecWiki News
SecWiki News
N
Netflix TechBlog - Medium
TaoSecurity Blog
TaoSecurity Blog
美团技术团队
博客园 - 司徒正美
Hacker News - Newest:
Hacker News - Newest: "LLM"
Recent Commits to openclaw:main
Recent Commits to openclaw:main
The Cloudflare Blog
N
News and Events Feed by Topic
C
Cybersecurity and Infrastructure Security Agency CISA
The Last Watchdog
The Last Watchdog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Scott Helme
Scott Helme
T
The Exploit Database - CXSecurity.com
K
Kaspersky official blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Threat Research - Cisco Blogs
C
CERT Recently Published Vulnerability Notes
Application and Cybersecurity Blog
Application and Cybersecurity Blog
U
Unit 42
Google DeepMind News
Google DeepMind News
J
Java Code Geeks
Schneier on Security
Schneier on Security
G
Google Developers Blog
Forbes - Security
Forbes - Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
Y
Y Combinator Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Palo Alto Networks Blog
A
Arctic Wolf
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
The Hacker News
The Hacker News
B
Blog
D
DataBreaches.Net
Simon Willison's Weblog
Simon Willison's Weblog

星辰日记

临时邮箱:开发者的隐私工具实践笔记 为 QuMagie 备份的照片添加 Exif 信息 Riverpod - flutter 状态管理的应用 夜景随拍 大疆 Mini 4K 初体验 5月12日 随笔 你好 2024 HHKB 使用体验 历经59天, 终于拿到软著 渺软公益CDN - 又一个静态资源加速站 你好 2023 记一次 RAID 硬盘离线 大一 碎语 试用 Google CA 的 SSL 证书 Waline 邮件异步推送 Magic Trackpad 使用体验 Centos 编译安装 php81 Redis 统计实时在线人数 Nginx 重写 Query 参数
Centos 7 升级 Glibc-2.28
xcsoft · 2022-06-02 · via 星辰日记

最近在捣鼓 Hexo 相关的评论系统, 一开始使用的是 Waline. 前端部署在 Vercel, 数据库使用的是官方推荐的Leancloud. 整体相应速度真的挺慢. 在尝试修改 Vercel 的serverless function所属位置后, 依旧达不到理想的速度.

于是我试着将其完全迁移至了自己的服务器, 直接使用官方提供的 docker compose 部署, 数据库采用的是mysql. 但是一直不满意其 评论时的速度. 因为我使用了邮件推送. 但是Waline貌似不支持 异步发信. 导致评论速度 很慢.

无意中了解到了 Artalk, 他是使用 Golang 开发的一款评论系统, 并且很好的支持了异步发信(应该是得益于Golang的goroutine). 并且Artalk也提供了一个叫做Artransfer的cli工具, 支持从原先的多种评论系统直接导出至Artalk.

于是我便尝试使用其工具导出评论, 可能我服务器的 linux 内核版本较老, 貌似只支持到GLIBC_2.2.6, 而 Artalk 需要GLIBC_2.28. 其实在之前使用 nvm 安装 nodejs-18.2.0 时, 就曾遇到该问题. 但我那时因为麻烦, 直接选择了 nodejs-17.9.0.

安装 glibc-2.28

1
2
3
4
5
6
7
8
9
10
11

$ wget https://ftp.gnu.org/gnu/glibc/glibc-2.28.tar.gz
$ tar -xzvf glibc-2.28.tar.gz
$ cd glibc-2.28

$ mkdir build && cd build
$ ../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin


These critical programs are missing or too old: make compiler

升级gcc与make

安装GLIBC所需的依赖 可以在 glibc 目录下的INSTALL中找到, 该版本需要 GCC 4.9 以上 及 make 4.0 以上

升级gcc

1
2
3
4
5

$ yum install -y devtoolset-8-gcc devtoolset-8-gcc-c++ devtoolset-8-binutils

$ echo "source /opt/rh/devtoolset-8/enable" >> /etc/profile
$ source /etc/profile

升级 make

1
2
3
4
5
6
7
8
9
10
11
$ wget https://ftp.gnu.org/gnu/make/make-4.3.tar.gz
$ tar -xzvf make-4.3.tar.gz
$ cd make-4.3/

$ ./configure --prefix=/usr/local/make
$ make
$ make install

$ cd /usr/bin/
$ mv make make.bak
$ ln -sv /usr/local/make/bin/make /usr/bin/make

继续编译 glibc

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

$ cd /root/glibc-2.28/build
$ ../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin
$ make
$ make install

$ strings /lib64/libc.so.6 | grep GLIBC
...
GLIBC_2.22
GLIBC_2.23
GLIBC_2.24
GLIBC_2.25
GLIBC_2.26
GLIBC_2.27
GLIBC_2.28
GLIBC_PRIVATE
...

参考