centos7yum configuration

First of all it, my version of centos 7.5

Here I mainly introduce the system by hanging in the image file and specify the network epel mirror source.

First, specify the local disk as a yum repository

1, delete all the files /etc/yum.repos.d

2、

cd /
mkdir centos7
mount /dev/cdrom /centos7/

3, then cut into /etc/yum.repos.d directory to create a repo file

cd /etc/yum.repos.d/
vim centos7.repo

4, and then insert the following:

[centos7]
name=centos7
baseurl=file:///centos7
enabled=1
gpgcheck=0
#gpgkey=/key/path
[root@node01 yum.repos.d]#yum clean all
[root@node01 yum.repos.d]#yum list all

5, and then execute the command yum list all

Then create yum use epel source

Then the computer side http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm download file using ftp and uploaded to the server system linux, run the following command as follows:

(During this operation, first run the command ping www.baidu .com, to see if the virtual machine connected to the network, if the ping fails, the venue of this blog https://www.cnblogs.com/xuzhaoyang/p/11239145. HTML .)

rpm -ivh epel-release-latest-7.noarch.rpm
yum repolist 

At this point, and generates epel.repo epel-testing.repo files, configuration files epel.repo example given here, configured as follows:

name=Extra Packages for Enterprise Linux 7 - $basearch - Source
#baseurl=http://download.fedoraproject.org/pub/epel/7/SRPMS
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1

The change is not the same place and the same to the above configuration.

After this point epel yum warehouse source configuration, run "yum list all", as shown:

 Reference Site https://www.cnblogs.com/bob-yanlibo/p/8144840.html

 

 

  

Guess you like

Origin www.cnblogs.com/xuzhaoyang/p/11239096.html