Red Hat 8 相关

Red Hat 8 相关

官网注册成为开发者Develop后,可以以开发者身份下载镜像和激活。

Red Hat 商用需要授权,但可以通过命令行使用开发者身份注册系统,文本命令如下:

subscription-manager register --username=注册用户名 --password=注册密码 --auto-attach

比如我的

subscription-manager register --username=July --password=July --auto-attach

 

注册后,有效期是一年,用命令subscription-manager list 进行查看可以看出状态已经从Unknown,变为了Subscription;

[julyr@localhost ~]$ subscription-manager list +-------------------------------------------+ Installed Product Status +-------------------------------------------+ Product Name: Red Hat Enterprise Linux for x86_64 Product ID: 479 Version: 8.4 Arch: x86_64 Status: Subscribed Status Details: Starts: 08/03/2021 Ends: 08/03/2022

注册成功后就可以使用yum和rpm安装软件。

使用vmware安装了redhat8的虚拟机之后,就可以配置yum源,redhat8 默认使用的软件批量管理工具由原版本的yum换成了速度更快的dnf,原有的yum命令仅为dnf的软链接,而且在fedora 22 中dnf 已经取代yum成为了新一代的包管理器,所以熟悉dnf势在必行

配置redhat8的dnf源:参考链接

 

阿里云的源

sudo wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-8.repo

sudo dnf update

 #阿里云的源
 sudo wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-8.repo
 sudo dnf update
 
 1  #清华大学的源  文件内容如下
 2  # CentOS-Base.repo
 3  #
 4  # The mirror system uses the connecting IP address of the client and the
 5  # update status of each mirror to pick mirrors that are updated to and
 6  # geographically close to the client.  You should use this for CentOS updates
 7  # unless you are manually picking other mirrors.
 8  #
 9  # If the mirrorlist= does not work for you, as a fall back you can try the
10  # remarked out baseurl= line instead.
11  #
12  #
13  [BaseOS]
14  name=CentOS-$releasever - Base
15  baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/BaseOS/$basearch/os/
16  #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS&infra=$infra
17  enabled=1
18  gpgcheck=1
19  gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
20   
21  [AppStream]
22  name=CentOS-$releasever - AppStream
23  baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/AppStream/$basearch/os/
24  #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=AppStream&infra=$infra
25  enabled=1
26  gpgcheck=1
27  gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
28   
29  [PowerTools]
30  name=CentOS-$releasever - PowerTools
31  baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/PowerTools/$basearch/os/
32  #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=PowerTools&infra=$infra
33  enabled=0
34  gpgcheck=1
35  gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
36   
37  #additional packages that may be useful
38  [extras]
39  name=CentOS-$releasever - Extras
40  baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/extras/$basearch/os/
41  #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
42  enabled=1
43  gpgcheck=1
44  gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
45   
46   
47  #additional packages that extend functionality of existing packages
48  [centosplus]
49  name=CentOS-$releasever - Plus
50  baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/centosplus/$basearch/os/
51  #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
52  gpgcheck=1
53  enabled=0
54  gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

 


 
 

 

posted @ 2021-09-03 19:45  #July  阅读(151)  评论(0)    收藏  举报