Skip to content

Commit

Permalink
contents(mozilla): Add
Browse files Browse the repository at this point in the history
  • Loading branch information
taoky committed Aug 27, 2024
1 parent 6ada839 commit 041b1e5
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
68 changes: 68 additions & 0 deletions contents/mozilla.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
title: Mozilla 软件仓库镜像使用帮助
cname: 'mozilla'
---

此仓库为基于 Debian 的发行版提供了官方打包的 FireFox 浏览器,支持 amd64、arm64 架构。

目前,Debian 稳定版只包含了长期支持版本 `firefox-esr`,而 Ubuntu 的 FireFox 切换到了 Snap 包。有需要的用户可使用本仓库提供的 APT 源。

## 使用方法

下面的内容修改自 [Install Firefox on Linux](https://support.mozilla.org/en-US/kb/install-firefox-linux#w_install-firefox-deb-package-for-debian-based-distributions)

首先导入和检查 keyring:

<CodeBlock>
```bash
{{sudo}}install -d -m 0755 /etc/apt/keyrings
wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | {{sudo}}tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null
gpg -n -q --import --import-options import-show /etc/apt/keyrings/packages.mozilla.org.asc | awk '/pub/{getline; gsub(/^ +| +$/,""); if($0 == "35BAA0B33E9EB396F59CA838C0BA5CE6DC6315A3") print "\nThe key fingerprint matches ("$0").\n"; else print "\nVerification failed: the fingerprint ("$0") does not match the expected one.\n"}'
```
</CodeBlock>

然后添加 APT 源:

<CodeBlock
enableQuickSetup
filepath="/etc/apt/sources.list.d/mozilla.list"
menus={[
{
title: '体系结构',
items: [
['amd64', { arch: 'amd64' }],
['arm64', { arch: 'amd64' }],
]
},
]}
>

```properties
deb [arch={{arch}} signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] {{http_protocol}}{{mirror}}/apt mozilla main
```

</CodeBlock>

如有需要,配置 APT 优先级:

<CodeBlock
enableQuickSetup
filepath="/etc/apt/preferences.d/mozilla"
>

```properties
Package: *
Pin: release a=mozilla
Pin-Priority: 1000
```

</CodeBlock>

更新 APT 缓存并安装:

<CodeBlock>
```bash
{{sudo}}apt update && {{sudo}}apt install firefox
{{sudo}}apt install firefox-l10n-zh-cn # 可选:中文语言包
```
</CodeBlock>
6 changes: 6 additions & 0 deletions src/routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,12 @@
"file": "mongodb.mdx",
"cname": "mongodb"
},
"/mozilla/": {
"title": "Mozilla 软件仓库",
"fullTitle": "Mozilla 软件仓库镜像使用帮助",
"file": "Mozilla.mdx",
"cname": "mozilla"
},
"/msys2/": {
"title": "MSYS2 软件仓库",
"fullTitle": "MSYS2 软件仓库镜像使用帮助",
Expand Down

0 comments on commit 041b1e5

Please sign in to comment.