提交 50f4ff25 编写于 作者: F fhxing168

Fixes issues.

上级 ebf0b55f
# Configuring the Repo Server
>![](public_sys-resources/icon-note.gif) **NOTE:**
>This section uses the **openEuler-20.03-LTS-aarch64-dvd.iso** image file as an example. Modify the image file as required.
>This section uses the **openEuler-20.03-LTS-aarch64-dvd.iso** file as an example. Modify the ISO file as required.
<!-- TOC -->
- [Configuring the Repo Server](#configuring-the-repo-server)
......@@ -25,27 +25,27 @@
## Overview
Create the **openEuler-20.03-LTS-aarch64-dvd.iso** image provided by openEuler as the repo source. The following uses Nginx as an example to describe how to deploy the repo source and provide the HTTP service.
Create the **openEuler-20.03-LTS-aarch64-dvd.iso** file provided by openEuler as the repo source. The following uses Nginx as an example to describe how to deploy the repo source and provide the HTTP service.
## Creating or Updating a Local Repo Source
Mount the openEuler image **openEuler-20.03-LTS-aarch64-dvd.iso** to create and update a repo source.
Mount the openEuler ISO file **openEuler-20.03-LTS-aarch64-dvd.iso** to create and update a repo source.
### Obtaining the ISO Image File
### Obtaining the ISO File
Obtain the openEuler software package from the following website:
[https://openeuler.org/zh/download.html](https://openeuler.org/zh/download.html)
[https://repo.openeuler.org/openEuler-20.03-LTS/ISO/](https://repo.openeuler.org/openEuler-20.03-LTS/ISO/)
### Mounting an ISO File to Create a Repo Source
Run the mount command as the **root** user to mount the image file.
Run the mount command as the **root** user to mount the ISO file.
The following is an example:
```
# mount /home/openEuler/openEuler-20.03-LTS-aarch64-dvd.iso /mnt/
# mount /home/openEuler/openEuler-20.03-LTS-aarch64-dvd.iso /mnt/
```
The mounted mnt directory is as follows:
......@@ -66,7 +66,7 @@ In the preceding command, **Packages** indicates the directory where the RPM p
### Creating a Local Repo Source
You can copy related files in the image to a local directory to create a local repo source. The following is an example:
You can copy related files in the ISO file to a local directory to create a local repo source. The following is an example:
```
# mount /home/openEuler/openEuler-20.03-LTS-aarch64-dvd.iso /mnt/
......@@ -91,7 +91,7 @@ The local repo directory is as follows:
You can update the repo source in either of the following ways:
- Use the ISO file of the new version to update the existing repo source. The method is the same as that for creating a repo source. That is, mount the image or copy the image to the local directory.
- Use the ISO file of the new version to update the existing repo source. The method is the same as that for creating a repo source. That is, mount the ISO file or copy the ISO file to the local directory.
- Add rpm packages to the Packages directory of the repo source and update the repo source. You can run the createrepo command to update the repo source.
```
......
......@@ -92,12 +92,12 @@ best=True
</tr>
<tr id="zh-cn_topic_0151921080_r096417e2f0524024b93c722dab0113cd"><td class="cellrowborder" valign="top" width="31.580000000000002%" headers="mcps1.2.3.1.1 "><p id="zh-cn_topic_0151921080_p11584914871"><a name="zh-cn_topic_0151921080_p11584914871"></a><a name="zh-cn_topic_0151921080_p11584914871"></a>best</p>
</td>
<td class="cellrowborder" valign="top" width="68.42%" headers="mcps1.2.3.1.2 "><p id="zh-cn_topic_0151921080_a406b4dd56fb7483ea43c7231aa2a7499"><a name="zh-cn_topic_0151921080_a406b4dd56fb7483ea43c7231aa2a7499"></a><a name="zh-cn_topic_0151921080_a406b4dd56fb7483ea43c7231aa2a7499"></a>升级包时,总是尝试安装其最高版本,如果最高版本无法安装,则提示无法安装的原因并停止安装。 默认值为True。</p>
<td class="cellrowborder" valign="top" width="68.42%" headers="mcps1.2.3.1.2 "><p id="zh-cn_topic_0151921080_a406b4dd56fb7483ea43c7231aa2a7499"><a name="zh-cn_topic_0151921080_a406b4dd56fb7483ea43c7231aa2a7499"></a><a name="zh-cn_topic_0151921080_a406b4dd56fb7483ea43c7231aa2a7499"></a>升级包时,总是尝试安装其最高版本,如果最高版本无法安装,则提示无法安装的原因并停止安装。默认值为True。</p>
</td>
</tr>
<tr id="zh-cn_topic_0151921080_r447c1e6abe344a719dd9e8b109c799fa"><td class="cellrowborder" valign="top" width="31.580000000000002%" headers="mcps1.2.3.1.1 "><p id="zh-cn_topic_0151921080_a6befc61e1a58499b96ecdcc96b0489d4"><a name="zh-cn_topic_0151921080_a6befc61e1a58499b96ecdcc96b0489d4"></a><a name="zh-cn_topic_0151921080_a6befc61e1a58499b96ecdcc96b0489d4"></a>obsoletes</p>
</td>
<td class="cellrowborder" valign="top" width="68.42%" headers="mcps1.2.3.1.2 "><p id="zh-cn_topic_0151921080_a581b6f9d8f9b4ad7b62734f86f6d556e"><a name="zh-cn_topic_0151921080_a581b6f9d8f9b4ad7b62734f86f6d556e"></a><a name="zh-cn_topic_0151921080_a581b6f9d8f9b4ad7b62734f86f6d556e"></a>可选值1和0,设置是否允许更新陈旧的RPM包。认值为1,表示允许更新。</p>
<td class="cellrowborder" valign="top" width="68.42%" headers="mcps1.2.3.1.2 "><p id="zh-cn_topic_0151921080_a581b6f9d8f9b4ad7b62734f86f6d556e"><a name="zh-cn_topic_0151921080_a581b6f9d8f9b4ad7b62734f86f6d556e"></a><a name="zh-cn_topic_0151921080_a581b6f9d8f9b4ad7b62734f86f6d556e"></a>可选值1和0,设置是否允许更新陈旧的RPM包。认值为1,表示允许更新。</p>
</td>
</tr>
<tr id="zh-cn_topic_0151921080_r30106389463d4ba0bf505a6b78034b23"><td class="cellrowborder" valign="top" width="31.580000000000002%" headers="mcps1.2.3.1.1 "><p id="zh-cn_topic_0151921080_a51da18882a5b41ff8a5a328f73d186dd"><a name="zh-cn_topic_0151921080_a51da18882a5b41ff8a5a328f73d186dd"></a><a name="zh-cn_topic_0151921080_a51da18882a5b41ff8a5a328f73d186dd"></a>gpgcheck</p>
......@@ -161,15 +161,15 @@ repository部分允许您定义定制化的openEuler软件源仓库,各个仓
- 配置/etc/yum.repos.d目录下的.repo文件
openEuler提供了多种repo源,以AArch64架构的OS repo源为例。使用root权限在openEuler_aarch64.repo文件中添加openEuler repo源,示例如下:
openEuler提供了多种repo源供用户在线使用,各repo源含义可参考[系统安装]({{< relref "../Releasenotes/系统安装.md" >}}),以AArch64架构的OS repo源为例。使用root权限在openEuler_aarch64.repo文件中添加openEuler repo源,示例如下:
```
# vi /etc/yum.repos.d/openEuler_aarch64.repo
```
```
[base]
name=openEuler base
[osrepo]
name=osrepo
baseurl=https://repo.openeuler.org/openEuler-20.03-LTS/OS/aarch64/
enabled=1
gpgcheck=1
......@@ -178,7 +178,8 @@ repository部分允许您定义定制化的openEuler软件源仓库,各个仓
```
>![](public_sys-resources/icon-note.gif) **说明:**
>gpgkey为验证签名用的公钥。
> - enabled为是否启用该软件源仓库,可选值为1和0。默认值为1,表示启用该软件源仓库。
> - gpgkey为验证签名用的公钥。
#### 显示当前配置
......
......@@ -14,7 +14,7 @@
- [使用timedatectl命令设置](#使用timedatectl命令设置)
- [使用date命令设置](#使用date命令设置)
- [使用hwclock命令设置](#使用hwclock命令设置)
- [设置kdump](#设置kdump服务)
- [设置kdump](#设置kdump)
- [设置kdump预留内存](#设置kdump预留内存)
- [预留内存推荐值](#预留内存推荐值)
- [禁用网络相关驱动](#禁用网络相关驱动)
......@@ -446,6 +446,7 @@ Linux 将时钟分为:
#### 预留内存参数格式
kdump预留内存参数必须添加到内核启动参数中,配置文件为/boot/efi/EFI/openEuler/grub.cfg,openEuler发布版本中默认已经添加,可以根据实际使用情况调整。添加和修改启动参数后,重启系统生效。kdump预留内存参数格式如下:
| 内核启动参数 | 描述 | 默认值 | 备注 |
|--------------------|-------------------------------------------|---------------|------------------------------------------------------------|
| crashkernel=x | 在4G以下的物理内存预留x大小的内存给kdump使用。 | x86版本默认配置512M | 该配置方法只在4G以下内存预留,必须保证4G以下连续可用内存足够预留。 |
......@@ -458,8 +459,7 @@ kdump预留内存参数必须添加到内核启动参数中,配置文件为/bo
| 推荐方案 | 预留参数 | 参数说明 |
|------|------------------------|----------------------------------------------|
| 通用方案 | crashkernel=2048M,high | 4G以下预留256M,4G以上预留2048M内存给kdump使用。共256+2048M。 |
| 经济方案 | crashkernel=1024M,high | 4G以下预留256M,4G以上预留1024M内存给kdump使用。共256+1024M。 推荐系统512G内存以内的场景,并不使用网络转储kdump文件。对于虚拟机场景,可以适当减少内存预留值,推荐虚拟机设置为crashkernel=512M或者crashkernel=256M,high |
| 经济方案 | crashkernel=1024M,high | 4G以下预留256M,4G以上预留1024M内存给kdump使用。共256+1024M。 推荐系统512G内存以内的场景,并不使用网络转储kdump文件。对于虚拟机场景,可以适当减少内存预留值,推荐虚拟机设置为crashkernel=512M或者crashkernel=256M,high |
>![](public_sys-resources/icon-note.gif) **说明:**
>不通过网络转储kdump文件时,需要设置kdump文件系统不打包网络相关驱动。网络驱动加载需要申请较大内存,可能导致预留内存不足,kdump失败。因此建议禁用网络相关驱动。
......
# 搭建repo服务器
>![](public_sys-resources/icon-note.gif) **说明:**
>本章节中以openEuler-20.03-LTS-aarch64-dvd.iso镜像文件为例,请根据实际需要的镜像文件进行修改。
>openEuler提供了多种repo源供用户在线使用,各repo源含义可参考[系统安装]({{< relref "../Releasenotes/系统安装.md" >}})。若用户无法在线获取openEuler repo源,则可使用openEuler提供的ISO发布包创建为本地openEuler repo源。本章节中以openEuler-20.03-LTS-aarch64-dvd.iso发布包为例,请根据实际需要的ISO发布包进行修改。
<!-- TOC -->
- [搭建repo服务器](#搭建repo服务器)
- [概述](#概述)
- [创建/更新本地repo源](#创建更新本地repo源)
- [获取ISO镜像](#获取iso镜像)
- [获取ISO发布包](#获取iso发布包)
- [挂载ISO创建repo源](#挂载iso创建repo源)
- [创建本地repo源](#创建本地repo源)
- [更新repo源](#更新repo源)
......@@ -16,7 +17,7 @@
- [启动nginx服务](#启动nginx服务)
- [repo源部署](#repo源部署)
- [使用repo源](#使用repo源)
- [repo配置为yum源](#repo配置为yum)
- [repo配置为yum源(软件源)](#repo配置为yum源软件)
- [repo优先级](#repo优先级)
- [dnf相关命令](#dnf相关命令)
......@@ -24,25 +25,25 @@
## 概述
将openEuler提供的镜像openEuler-20.03-LTS-aarch64-dvd.iso创建为repo源,如下以使用nginx进行repo源部署,提供http服务为例进行说明。
将openEuler提供的ISO发布包openEuler-20.03-LTS-aarch64-dvd.iso创建为repo源,如下以使用nginx进行repo源部署,提供http服务为例进行说明。
## 创建/更新本地repo源
使用mount挂载,将openEuler的镜像openEuler-20.03-LTS-aarch64-dvd.iso创建为repo源,并能够对repo源进行更新。
### 获取ISO镜像
使用mount挂载,将openEuler的ISO发布包openEuler-20.03-LTS-aarch64-dvd.iso创建为repo源,并能够对repo源进行更新。
### 获取ISO发布包
请从如下网址获取openEuler软件包:
请从如下网址获取openEuler的ISO发布包:
[https://openeuler.org/zh/download.html](https://openeuler.org/zh/download.html)
[https://repo.openeuler.org/openEuler-20.03-LTS/ISO/](https://repo.openeuler.org/openEuler-20.03-LTS/ISO/)
### 挂载ISO创建repo源
在root权限下使用mount命令挂载镜像文件
在root权限下使用mount命令挂载ISO发布包
示例如下:
```
# mount /home/openEuler/openEuler-20.03-LTS-aarch64-dvd.iso /mnt/
# mount /home/openEuler/openEuler-20.03-LTS-aarch64-dvd.iso /mnt/
```
挂载好的mnt目录如下:
......@@ -63,10 +64,10 @@
### 创建本地repo源
可以拷贝镜像中相关文件至本地目录以创建本地repo源,示例如下:
可以拷贝ISO发布包中相关文件至本地目录以创建本地repo源,示例如下:
```
# mount /home/openEuler/openEuler-20.03-LTS-aarch64-dvd.iso /mnt/
# mount /home/openEuler/openEuler-20.03-LTS-aarch64-dvd.iso /mnt/
$ mkdir -p ~/srv/repo/
$ cp -r /mnt/Packages ~/srv/repo/
$ cp -r /mnt/repodata ~/srv/repo/
......@@ -88,9 +89,9 @@ Packages为rpm包所在的目录,repodata为repo源元数据所在的目录,
更新repo源有两种方式:
- 通过新版本的ISO更新已有的repo源,与创建repo源的方式相同,即挂载镜像或者重新拷贝镜像至本地目录
- 通过新版本的ISO更新已有的repo源,与创建repo源的方式相同,即挂载ISO发布包或重新拷贝ISO发布包至本地目录。
- 在repo源的Packages目录下添加rpm包,然后更新repo源,可通过createrepo命令更新repo源
- 在repo源的Packages目录下添加rpm包,然后通过createrepo命令更新repo源
```
$ createrepo --update --workers=10 ~/srv/repo
......@@ -257,13 +258,13 @@ Packages为rpm包所在的目录,repodata为repo源元数据所在的目录,
## 使用repo源
repo可配置为yum源,yum(全称为 Yellow dog Updater, Modified)是一个Shell前端软件包管理器。基于RPM包管理,能够从指定的服务器自动下载RPM包并且安装,可以自动处理依赖性关系,并且一次安装所有依赖的软体包,无须繁琐地一次次下载和安装。
### repo配置为yum源
### repo配置为yum源(软件源)
构建好的repo可以配置为yum源使用,在/etc/yum.repos.d/目录下使用root权限创建\*\*\*.repo的配置文件(必须以.repo为扩展名),分为本地和http服务器配置yum源两种方式:
构建好的rep可以配置为yum源使用,在/etc/yum.repos.d/目录下使用root权限创建\*\*\*.repo的配置文件(必须以.repo为扩展名),分为本地和http服务器配置yum源两种方式:
- 配置本地yum源
在/etc/yum.repos.d目录下创建openEuler.repo文件,使用构建的本地repo作为yum源,openEuler.repo的内容如下:
在/etc/yum.repos.d目录下创建openEuler.repo文件,使用构建的本地repo作为yum源,openEuler.repo的内容如下:
```
[base]
......@@ -275,24 +276,42 @@ repo可配置为yum源,yum(全称为 Yellow dog Updater, Modified)是一
```
>![](public_sys-resources/icon-note.gif) **说明:**
>gpgcheck可设置为1或0,1表示进行gpg(GNU Private Guard)校验,0表示不进行gpg校验,gpgcheck可以确定rpm包的来源是有效和安全的。
>gpgkey为验证签名用的公钥。
> - \[*repoid*\]中的repoid为软件仓库(repository)的ID号,所有.repo配置文件中的各repoid不能重复,必须唯一。示例中repoid设置为**base**。
> - name为软件仓库描述的字符串。
> - baseurl为软件仓库的地址。
> - enabled为是否启用该软件源仓库,可选值为1和0。默认值为1,表示启用该软件源仓库。
> - gpgcheck可设置为1或0,1表示进行gpg(GNU Private Guard)校验,0表示不进行gpg校验,gpgcheck可以确定rpm包的来源是有效和安全的。
> - gpgkey为验证签名用的公钥。
- 配置http服务器yum源
在/etc/yum.repos.d目录下创建openEuler.repo文件,使用http服务端的repo作为yum源,openEuler.repo的内容如下:
在/etc/yum.repos.d目录下创建openEuler.repo文件。
- 若使用用户部署的http服务端的repo源作为yum源,openEuler.repo的内容如下:
```
[base]
name=base
baseurl=http://192.168.139.209/
enabled=1
gpgcheck=1
gpgkey=http://192.168.139.209/RPM-GPG-KEY-openEuler
```
```
[base]
name=base
baseurl=http://192.168.139.209/
enabled=1
gpgcheck=1
gpgkey=http://192.168.139.209/RPM-GPG-KEY-openEuler
```
>![](public_sys-resources/icon-note.gif) **说明:**
>“192.168.139.209”为示例地址,请用户根据实际情况进行配置。
- 若使用openEuler提供的哦openEuler repo源作为yum源,以AArch64架构的OS repo源为例,openEuler.repo的内容如下:
```
[base]
name=base
baseurl=http://repo.openeuler.org/openEuler-20.03-LTS/OS/aarch64/
enabled=1
gpgcheck=1
gpgkey=http://repo.openeuler.org/openEuler-20.03-LTS/OS/aarch64/RPM-GPG-KEY-openEuler
```
>![](public_sys-resources/icon-note.gif) **说明:**
>“192.168.139.209”为示例地址,请用户根据实际情况进行配置。
### repo优先级
......@@ -309,10 +328,6 @@ gpgcheck=1
gpgkey=http://192.168.139.209/RPM-GPG-KEY-openEuler
```
>![](public_sys-resources/icon-note.gif) **说明:**
>gpgcheck可设置为1或0,1表示进行gpg(GNU Private Guard)校验,0表示不进行gpg校验,gpgcheck可以确定rpm 包的来源是有效和安全的。
>gpgkey为签名公钥的存放路径。
### dnf相关命令
dnf命令在安装升级时能够自动解析包的依赖关系,一般的使用方式如下:
......
......@@ -4,9 +4,9 @@
- [开发环境准备](#开发环境准备)
- [环境要求](#环境要求)
- [操作系统要求](#操作系统要求)
- [配置repo源](#配置repo)
- [通过直接获取repo源文件的方式配置repo源](#通过直接获取repo源文件的方式配置repo)
- [通过挂载ISO的方式配置repo源](#通过挂载iso的方式配置repo)
- [配置openEuler yum源(软件源)](#配置openeuler-yum源软件)
- [通过直接获取在线的openEuler repo源配置在线yum源](#通过直接获取在线的openeuler-repo源配置在线yum)
- [通过挂载ISO创建本地openEuler repo源配置本地yum源](#通过挂载iso创建本地openeuler-repo源配置本地yum)
- [安装软件包](#安装软件包)
- [安装JDK软件包](#安装jdk软件包)
- [安装rpm-build软件包](#安装rpm-build软件包)
......@@ -115,34 +115,38 @@
操作系统要求为openEuler操作系统。
openEuler操作系统具体安装方法请参考《openEuler 20.03 LTS 安装指南》,其中“软件选择”页面的“已选环境的附加选项”中将“开发工具”勾选。
openEuler操作系统具体安装方法请参考[openEuler 20.03 LTS 安装指南]({{< relref "../Installation/Installation.md" >}}),其中“软件选择”页面的“已选环境的附加选项”中将“开发工具”勾选。
## 配置repo源
## 配置openEuler yum源(软件源)
可以通过直接获取repo源文件的方式配置repo源或通过挂载ISO的方式配置repo源。
通过直接获取在线的openEuler repo源配置在线yum源或通过挂载ISO创建本地openEuler repo源配置本地yum源。
### 通过直接获取repo源文件的方式配置repo
### 通过直接获取在线的openEuler repo源配置在线yum
>![](public_sys-resources/icon-note.gif) **说明:**
>openEuler提供了多种repo源文件,本操作以AArch64架构的OS repo源文件为例。
>openEuler提供了多种repo源供用户在线使用,各repo源含义可参考[系统安装]({{< relref "../Releasenotes/系统安装.md" >}})。本操作以AArch64架构的OS repo源为例将其配置为yum源。
1. 进入到yum源目录。
1. 进入到yum源目录并查看目录下的.repo配置文件
```
$ cd /etc/yum.repos.d
$ ls
openEuler_aarch64.repo
```
2. 在root权限下新建local.repo文件并编辑local.repo,将repo源文件配置为yum源。
2. 在root权限下编辑openEuler_aarch64.repo文件,将在线的openEuler repo源配置为yum源。
```
# vi local.repo
# vi openEuler_aarch64.repo
```
编辑local.repo文件的内容如下:
编辑openEuler_aarch64.repo文件的内容如下:
```
[osrepo]
\[basiclocal\]
name=basiclocal
name=osrepo
baseurl=http://repo.openeuler.org/openEuler-20.03-LTS/OS/aarch64/
......@@ -150,20 +154,24 @@ openEuler操作系统具体安装方法请参考《openEuler 20.03 LTS 安装指
gpgcheck=1
gpgkey=http://repo.openeuler.org/openEuler-20.03-LTS/OS/aarch64/RPM-GPG-KEY-openEuler
```
****
>![](public_sys-resources/icon-note.gif) **说明:**
>- gpgcheck可设置为1或0,1表示进行gpg(GNU Private Guard)校验,0表示不进行gpg校验,gpgcheck可以确定rpm包的来源是有效和安全的。
>- gpgkey为验证签名用的公钥。
> - \[*repoid*\]中的repoid为软件仓库(repository)的ID号,所有.repo配置文件中的各repoid不能重复,必须唯一。示例中repoid设置为**osrepo**。
> - name为软件仓库描述的字符串。
> - baseurl为软件仓库的地址。
> - enabled为是否启用该软件源仓库,可选值为1和0。默认值为1,表示启用该软件源仓库。
> - gpgcheck可设置为1或0,1表示进行gpg(GNU Private Guard)校验,0表示不进行gpg校验,gpgcheck可以确定rpm包的来源是有效和安全的。
> - gpgkey为验证签名用的公钥。
### 通过挂载ISO的方式配置repo
### 通过挂载ISO创建本地openEuler repo源配置本地yum
>![](public_sys-resources/icon-note.gif) **说明:**
>本操作以openEuler-20.03-LTS-aarch64-dvd.iso镜像文件和openEuler-20.03-LTS-aarch64-dvd.iso.sha256sum校验文件为例,请根据实际需要的镜像文件和校验文件进行修改。
>openEuler提供了多种ISO发布包,各ISO发布包含义可参考[系统安装]({{< relref "../Releasenotes/系统安装.md" >}})。本操作以openEuler-20.03-LTS-aarch64-dvd.iso发布包和openEuler-20.03-LTS-aarch64-dvd.iso.sha256sum校验文件为例,请根据实际需要的ISO发布包和校验文件进行修改。
1. 下载ISO镜像
1. 下载ISO发布包
- 通过跨平台文件传输工具下载ISO镜像
1. 登录openEuler社区,网址为:[https://openeuler.org](https://openeuler.org)
2. 单击“下载”,进入下载页面。
......@@ -232,7 +240,7 @@ openEuler操作系统具体安装方法请参考《openEuler 20.03 LTS 安装指
如果校验值一致说明iso文件完整性没有破坏,如果校验值不一致则可以确认文件完整性已被破坏,需要重新获取。
3. 挂载ISO并配置为repo源。
3. <a name="li6236932222"></a>挂载ISO并创建为repo源。
在root权限下使用mount命令挂载镜像文件。
......@@ -256,23 +264,37 @@ openEuler操作系统具体安装方法请参考《openEuler 20.03 LTS 安装指
└── RPM-GPG-KEY-openEuler
```
其中,Packages为rpm包所在的目录,repodata为repo源元数据所在的目录,RPM-GPG-KEY-openEuler为openEuler的签名公钥。。
其中,Packages为rpm包所在的目录,repodata为repo源元数据所在的目录,RPM-GPG-KEY-openEuler为openEuler的签名公钥。
4. 进入到yum源目录并查看目录下的.repo配置文件。
挂载后的目录可以配置为yum源使用,在/etc/yum.repos.d/目录下创建\*\*\*.repo的配置文件(必须以.repo为扩展名)。
```
$ cd /etc/yum.repos.d
$ ls
openEuler_aarch64.repo
```
示例如下:
2. 在root权限下编辑openEuler_aarch64.repo文件,将[3](#li6236932222)中创建的repo源配置为本地yum源。
在/etc/yum.repos.d目录下创建openEuler.repo 文件,使用本地镜像挂载目录作为yum源,openEuler.repo的内容如下:
```
# vi openEuler_aarch64.repo
```
编辑openEuler_aarch64.repo文件的内容如下:
```
[base]
name=base
[localosrepo]
name=localosrepo
baseurl=file:///mnt
enabled=1
gpgcheck=1
gpgkey=file:///mnt/RPM-GPG-KEY-openEuler
```
gpgkey=http:file:///mnt/RPM-GPG-KEY-openEuler
```
## 安装软件包
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册