更新文档

This commit is contained in:
2026-09-17 22:29:26 +08:00
parent d383eaa612
commit aee82900ee
4 changed files with 91 additions and 6 deletions

View File

@@ -16,13 +16,13 @@
curl -so /etc/yum.repos.d/epel-7.repo http://mirrors.aliyun.com/repo/epel-7.repo
```
3. *删除缓存数据*
3. 删除缓存数据
```bash
yum clean all
```
4. *创建元数据缓存*
4. 创建元数据缓存
```bash
yum makecache

View File

@@ -0,0 +1,41 @@
> 本文作者:丁辉
# EulerOS更换华为源
[官方文档](https://support.huaweicloud.com/csg_faq/csg_04_1209.html)
1. 备份本地Yum源
```bash
mkdir -p /etc/yum.repos.d/backup/
mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/backup/
```
2. 编辑华为源文件
```bash
vi /etc/yum.repos.d/EulerOS.repo
```
内容如下
```bash
[base]
name=EulerOS-2.0SP8 base
baseurl=http://repo.huaweicloud.com/euler/2.8/os/aarch64/
enabled=1
gpgcheck=1
gpgkey=http://repo.huaweicloud.com/euler/2.8/os/RPM-GPG-KEY-EulerOS
```
3. 删除缓存数据
```bash
yum clean all
```
4. 创建元数据缓存
```bash
yum makecache
```

View File

@@ -36,15 +36,27 @@
2. 下载
```bash
yumdownloader --resolve --destdir=/root/vim/ vim
```
> 安装工具
>
> ```bash
> yum install yum-utils -y
> ```
>
>
```bash
yumdownloader --resolve --destdir=/root/vim/ vim
```
**参数解释**
## 各参数含义
| 参数 | 含义 |
| :----------------- | :----------------------------------------------------------: |
| `--enablerepo=` | 临时启用某个仓库。有些默认仓库可能是禁用的,启用来查找包。 |
| `--resolve` | 解析并下载依赖。不仅下载RPM包本身,还会自动解析它的所有依赖包并一并下载到目标目录,避免离线安装时缺依赖。 |
| `--destdir=/root/` | 指定下载文件的存放目录为 `/root/`。如果不指定,默认下载到当前工作目录。 |
3. 安装
@@ -52,4 +64,10 @@
cd /root/vim/ && rpm -ivh *.rpm --force --nodeps
```
或
```bash
yum localinstall -y *.rpm
```