前言:
此刻咱们对“centos7搭建环境”大体比较注重,大家都需要学习一些“centos7搭建环境”的相关知识。那么小编同时在网摘上网罗了一些关于“centos7搭建环境””的相关知识,希望朋友们能喜欢,姐妹们一起来了解一下吧!-------------------------------------------
[root@localhost /]#mkdir /iso
[root@localhost /]#mkdir -p /mnt/cdrom
[root@localhost /]#mount-o loop /iso/*.iso /mnt/cdrom
--------------------------------------------
CentOS7.x本地Yum环境配置
#/etc/yum.repos.d/CentOS-Media.repo
# CentOS-Media.repo
#
# This repo can be used with mounted DVD media, verify the mount point for
# CentOS-7. You can use this repo and yum to install items directly off the
# DVD ISO that we release.
#
# To use this repo, put in your DVD and use it with the other repos too:
# yum --enablerepo=c7-media [command]
#
# or for ONLY the media repo, do this:
#
# yum --disablerepo=\* --enablerepo=c7-media [command]
#[development]
[c7-media]
name=CentOS-$releasever - Media
baseurl=
gpgcheck=1
enabled=1
gpgkey=
--------------------------------------------
CentOS8.x本地Yum环境配置
#/etc/yum.repos.d/CentOS-Linux-Media.repo
[super@localhost yum.repos.d]$ cat CentOS-Linux-Media.repo
# CentOS-Linux-Media.repo
#
# You can use this repo to install items directly off the installation media.
# Verify your mount point matches one of the below file:// paths.
[media-baseos]
name=CentOS Linux $releasever - Media - BaseOS
baseurl=
gpgcheck=1
enabled=1
gpgkey=
[media-appstream]
name=CentOS Linux $releasever - Media - AppStream
baseurl=
gpgcheck=1
enabled=1
gpgkey=
-------------------------------------------
RedHat8.x本地Yum环境配置
#/etc/yum.repos.d/redhat.repo
#
# Certificate-Based Repositories
# Managed by (rhsm) subscription-manager
#
# *** This file is auto-generated. Changes made here will be over-written. ***
# *** Use "subscription-manager repo-override --help" if you wish to make changes. ***
#
# If this file is empty and this system is subscribed consider
# a "yum repolist" to refresh available repos
[media-baseos]
name=RedHat Linux $releasever - Media - BaseOS
baseurl=
enabled=1
gpgcheck=1
gpgkey=
[media-appstream]
name=RedHat Linux $releasever - Media - AppStream
baseurl=
enabled=1
gpgcheck=1
gpgkey=
--------------------------------------------
测试:
[root@localhost /]#yum list
[root@localhost /]#dnf list
标签: #centos7搭建环境