Yum builds a local repository and installs software

Source: Internet
Author: User
Tags gpg

The local area network is used to build a local lab environment, which is not convenient for downloading software from the network. Therefore, you need to build a local software warehouse to easily install yum. Of course, the dependency between software Packages can be well handled. If you are familiar with the rpm installation method of Linux, you can install the software by using rpm. You can directly go to the Packages directory of the mounted disc to install the rpm.


[Yum installation method]

  1. Insert the red hat system installation disc

Virtual Machine environment:

Method 1: There is a small CD icon in the lower right corner of the page. Click Settings. In settings, find the CD location in the local path and click OK;

Method 2: on the task bar of VMware Workstation, click "virtual machine" ---> "removable device" ---> "CD/DVD" --- "set ", find the disc location in the local path in the settings, and confirm it. The method is the same as above;

Real machine environment:

Insert the installation disc directly;


2. Attach the CD to a local device.

[Email protected]/] # mount/dev/sr0/mnt

3. Compile the rhel6.repo configuration file to build a repository.

Vim/etc/yum. repos. d/rhel6.repo
[Base] name = red hatbaseurl = file: // # attach a local disk # = ftp: // use ftp to attach a disk # = http: // use httpd to Mount enabled = 1 gpgcheck = 1 gpgcheck = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release


3. Install software

Yum-y install software name

Yum-y remove software name


[RPM installation method]

Installation: complete rpm-ivh package name

Uninstall: rpm-e package name


For example:

Install ftp

[[Email protected] Packages] # rpm-ivh vsftpd-2.2.2-11.el6.x86_64.rpm


Uninstall ftp

[[Email protected] Packages] # rpm-e vsftpd


View software status

[[Email protected] Packages] # rpm-qa vsftpd

If no content is entered, the software is not installed.

This article from "day up" blog, please be sure to keep this source http://liyasong.blog.51cto.com/3096629/1573080

Yum builds a local repository and installs software

Related Article

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.