Files
jcutmirror/docs/zh/opensuse.mdx
2024-02-16 13:11:30 +08:00

79 lines
3.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
mirrorId: opensuse
---
openSUSE 项目是一个由 Novell 赞助的社区项目。该项目旨在推进 Linux 的广泛应用,提供自由、易于入手和美观实用的 openSUSE Linux 发行版。openSUSE 使用 `zypper` 作为包管理器。
openSUSE 默认使用 [MirrorBrain](https://zh.opensuse.org/MirrorBrain) 技术统一镜像入口,在下载时自动分配镜像站点,从而给用户提供更好的安全性,通常情况下使用默认配置即可。
使用 MirrorBrain 需要从位于德国的 openSUSE 主服务器上获取元数据,这可能导致使用默认软件源时获取元数据较慢,此时可以使用镜像源替换默认软件源。
### openSUSE Leap 15.2 或更新版本使用方法
禁用官方软件源
```bash
zypper mr -da
```
添加镜像源
```bash
zypper ar -cfg 'https://mirrors.jcut.edu.cn/opensuse/distribution/leap/$releasever/repo/oss/' mirror-oss
zypper ar -cfg 'https://mirrors.jcut.edu.cn/opensuse/distribution/leap/$releasever/repo/non-oss/' mirror-non-oss
zypper ar -cfg 'https://mirrors.jcut.edu.cn/opensuse/update/leap/$releasever/oss/' mirror-update
zypper ar -cfg 'https://mirrors.jcut.edu.cn/opensuse/update/leap/$releasever/non-oss/' mirror-update-non-oss
```
Leap 15.3 用户还需添加 sle 和 backports 源
```bash
zypper ar -cfg 'https://mirrors.jcut.edu.cn/opensuse/update/leap/$releasever/sle/' mirror-sle-update
zypper ar -cfg 'https://mirrors.jcut.edu.cn/opensuse/update/leap/$releasever/backports/' mirror-backports-update
```
Leap 15.3 注:若在安装时**没有**启用在线软件源sle 源和 backports 源将在系统首次更新后引入,请确保系统在更新后仅启用了**六个**所需软件源。可使用 `zypper lr` 检查软件源状态,并使用 `zypper mr -d` 禁用多余的软件源。
### openSUSE Tumbleweed 使用方法
禁用官方软件源
```bash
zypper mr -da
```
添加镜像源
```bash
zypper ar -cfg 'https://mirrors.jcut.edu.cn/opensuse/tumbleweed/repo/oss/' mirror-oss
zypper ar -cfg 'https://mirrors.jcut.edu.cn/opensuse/tumbleweed/repo/non-oss/' mirror-non-oss
```
刷新软件源
```bash
zypper ref
```
Tumbleweed 注Tumbleweed 安装后默认会启用 oss, non-oss, update, 3 个官方软件源,
其中 oss 及 non-oss 源用于发布 Tumbleweed 的每日构建快照,快照中已包含系统所需的全部软件包及更新。
update 源仅用于推送临时安全补丁,如当日快照已发布但仍有临时安全补丁时,会首先推送至 update 源,并在次日合入下一版快照。
由于 update 源存在较强的时效性,上游镜像并未同步 update 源,镜像源亦无法提供该源的镜像。
禁用 update 源并不会使系统缺失任何功能或安全更新,仅会导致极少数更新晚些推送,如有需求可以重新启用官方 update 源。
### 图形界面下配置方法
以 openSUSE Leap 15.3 为例:
1. 打开 YaST
2. 点击 Software 分组中的 Software Repositories
3. 在打开的窗口上方的列表中点击 Main Repository点击 Edit
4. 将 download.opensuse.org 替换为
```plaintext
mirrors.jcut.edu.cn/opensuse
```
点 OK
5. 再用同样的方法编辑 Non-OSS Repository, Main Update Repository, Update Repository (Non-Oss) 和 Update repository with updates from SUSE Linux Enterprise 15。