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

推荐订阅源

WordPress大学
WordPress大学
Forbes - Security
Forbes - Security
C
CERT Recently Published Vulnerability Notes
The Last Watchdog
The Last Watchdog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Secure Thoughts
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
T
Troy Hunt's Blog
N
News | PayPal Newsroom
人人都是产品经理
人人都是产品经理
S
Securelist
J
Java Code Geeks
月光博客
月光博客
博客园 - 叶小钗
云风的 BLOG
云风的 BLOG
Hugging Face - Blog
Hugging Face - Blog
T
Threatpost
H
Hacker News: Front Page
Recent Commits to openclaw:main
Recent Commits to openclaw:main
小众软件
小众软件
大猫的无限游戏
大猫的无限游戏
PCI Perspectives
PCI Perspectives
T
The Blog of Author Tim Ferriss
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
GbyAI
GbyAI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Google DeepMind News
Google DeepMind News
量子位
SecWiki News
SecWiki News
有赞技术团队
有赞技术团队
TaoSecurity Blog
TaoSecurity Blog
N
Netflix TechBlog - Medium
Latest news
Latest news
博客园_首页
L
LINUX DO - 最新话题
V
Visual Studio Blog
G
Google Developers Blog
P
Palo Alto Networks Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
T
Tenable Blog
Simon Willison's Weblog
Simon Willison's Weblog
Scott Helme
Scott Helme
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
P
Privacy International News Feed
Recorded Future
Recorded Future
Stack Overflow Blog
Stack Overflow Blog
O
OpenAI News
T
Tor Project blog
IT之家
IT之家
S
SegmentFault 最新的问题

无妄当自持

在 RTX 4060 Laptop(8GB 显存)笔记本上部署 Qwen3.5-4B 和 Qwopus3.5-9B-Coder 的完整实战 给 Hermes Agent 接入 Sciverse:5 分钟搞定学术搜索 MCP MinerU:让 AI Agent 读懂 PDF 的文档提取利器 用 Firecrawl + SearXNG 给 Hermes Agent 搭建本地搜索与网页抓取 让服务器的 AI 读写你的 Obsidian 笔记库:从自建同步到 MCP 集成 在 RTX 4060 笔记本上运行 Qwen 3.5 9B:llama.cpp 本地部署实录 在 Fedora 44 上编译支持 CUDA 的 llama.cpp:完整指南 Hermes WebUI 安装与使用指南 Hermes Agent 使用实践:核心机制与命令技巧 小米 MiMo 模型本地部署实践:从选型到踩坑 介绍并初步使用 Hermes Agent Linux 下将浏览器缓存放到内存,并在登录登出时进行同步 在 Fedora server 39 中纯手动部署 Nextcloud 使用 shell 脚本和 systemd 定时替换 Gnome 壁纸 Linux 下字体配置 设置 VirtualBox 虚拟机为静态 ip 以方便主机访问 在启用安全启动的 Fedora 中安装 Nvidia 驱动 曲登尼玛冰川 面向神经科学家的人工神经网络
Fedora 使用脚本配置国内镜像源
insidentally · 2024-03-18 · via 无妄当自持

Fedora 默认使用 Metalink 给出推荐的镜像列表,保证用户使用的镜像仓库足够新,并且能够尽快拿到安全更新,从而提供更好的安全性。所以通常情况下使用默认配置即可,无需更改配置文件。

由于 Metalink 需要从国外的 Fedora 项目服务器上获取元信息,所以对于校园内网、无国外访问等特殊情况,metalink 并不适用,此时可以如下方法修改配置文件。

本脚本在Fedora 36 至 Fedora 39 测试通过

更改 Fedora 镜像源

Fedora 的软件源配置文件可以有多个,其中: 系统默认的 fedora 仓库配置文件为 /etc/yum.repos.d/fedora.repo,系统默认的 updates 仓库配置文件为 /etc/yum.repos.d/fedora-updates.repo。此外还有相应的 modular 仓库。

备份文件

将仓库配置文件备份到 /etc/yum.repos.d/backup 文件夹下。

1
2
3
4
5
6
cd /etc/yum.repos.d/
sudo mkdir backup/
sudo cp fedora.repo backup/
sudo cp fedora-modular.repo backup/
sudo cp fedora-updates.repo backup/
sudo cp fedora-updates-modular.repo backup/

更换清华源

1
2
3
4
5
6
7
sudo sed -e 's|^metalink=|#metalink=|g' \
-e 's|^#baseurl=http://download.example/pub/fedora/linux|baseurl=https://mirrors.tuna.tsinghua.edu.cn/fedora|g' \
-i.bak \
/etc/yum.repos.d/fedora.repo \
/etc/yum.repos.d/fedora-modular.repo \
/etc/yum.repos.d/fedora-updates.repo \
/etc/yum.repos.d/fedora-updates-modular.repo

更新本地缓存

1
sudo dnf makecache

安装 RPM Fusion 并更换清华源

RPM Fusion 为 Fedora/RHEL 提供额外的大量 RPM 软件包的第三方软件源。

安装并启动 RPM Fusion 软件源

1
sudo dnf install --nogpgcheck https://mirrors.tuna.tsinghua.edu.cn/rpmfusion/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.tuna.tsinghua.edu.cn/rpmfusion/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

备份文件

将仓库配置文件备份到 /etc/yum.repos.d/backup 文件夹下。

1
2
cd /etc/yum.repos.d/
sudo cp rpmfusion-* backup/

修改 rpmfusion 为清华源

1
2
3
4
5
6
7
8
sudo sed -e 's|^metalink=|#metalink=|g' \
-e 's|^#baseurl=http://download1.rpmfusion.org|baseurl=https://mirrors.tuna.tsinghua.edu.cn/rpmfusion|g' \
/etc/yum.repos.d/rpmfusion-free.repo \
/etc/yum.repos.d/rpmfusion-free-updates.repo \
/etc/yum.repos.d/rpmfusion-free-updates-testing.repo \
/etc/yum.repos.d/rpmfusion-nonfree.repo \
/etc/yum.repos.d/rpmfusion-nonfree-updates.repo \
/etc/yum.repos.d/rpmfusion-nonfree-updates-testing.repo

更新本地缓存

1
sudo dnf makecache

补充内容

安装多媒体补充包

1
2
sudo dnf install gstreamer1-plugins-{bad-\*,good-\*,base} gstreamer1-plugin-openh264 gstreamer1-libav --exclude=gstreamer1-plugins-bad-free-devel
sudo dnf install ffmpeg

其他国内镜像源

  1. 清华源:https://mirrors.tuna.tsinghua.edu.cn
  2. 中科大源:https://mirrors.ustc.edu.cn
  3. 阿里云源:https://mirrors.aliyun.com
  4. 腾讯云:https://mirrors.cloud.tencent.com

版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 无妄当自持


avatar

insidentally

学习、实践、分享