更新文档

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

@@ -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
```