Use the installation CD as the source for Yum

Source: Internet
Author: User

Centos7 installed, if you want to use Yum must be networked, making it inconvenient to install software offline.

Server environment many times do not allow the Internet, to download online, using RPM installation, they do not know the relevance of software, many times the installation of something is not enough, so that the installation becomes cumbersome, in order to improve efficiency or with yum better.

These issues are largely addressed if the search source with the installation CD is yum.


Yum's search explanation file in the/ETC/YUM.REPOS.D directory, since it has been unable to surf the internet, in order to speed up the search, the existing files have been renamed, such as Centos-base.repo changed to CENTOS-BASE.REPO.BK lost effect.

Make a Centos-media.repo file yourself, edit the content

[C7-media]
name=centos-$releasever-media
Baseurl=file:///mnt/dvdrom
Gpgcheck=1
Enabled=1
Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-centos-7


The Baseurl=file:///mnt/dvdrom here is the CD-ROM loading point, each machine is different, its own modification into the machine.

If the CENTOS7 is installed with minimal installation, the disc will not be loaded automatically after loading

Manually add, execute commands

Mount/dev/sr0/mnt/dvdrom

/DEV/SR0 is the physical optical drive of the machine

can be used Ll/dev | grep CDROM find

Put the disc in before Mount, and you won't find the content after you put it on.


Now do yum list is out of the content

The Yum list installed can also view the installed content

Of course Yum list updates these need to surf the internet is not


There is a strange thing, rpm and Yum are not quite the same

In the case of minimal installation centos7, the Yum list mariadb-libs is not displayed, but the Rpm-qa mariadb display is installed

The previous article installed MySQL, which said it is necessary to confirm the need, the minimum installation should also be cautious.

This article is not a minimum installation, in the smallest installation with yum-y install perl-data-dumper.x86_64 will install the associated many packages, in addition to the minimum installation, the installation of MySQL will be reported Can not find libaio.so.1, with Yum direct search, installation is good, do not have to go to the network search installation package.

Of course uninstall can also yum remove perl.x86_64

Yum Grouplist can also be used, but it's not useful.

This article from "Genius without that 1% is absolutely impossible" blog, please be sure to keep this source http://xushen.blog.51cto.com/1673219/1869383

Use the installation CD as the source for Yum

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.