The Linux family of Yum management application software

Source: Internet
Author: User
Tags yum repolist

1. Today brings you to the Linux operating system on the management of application software, there may be some just beginning to learn Linux small partners for the installation of Linux software is not a special understanding, today I will give you a way to install a simple and rapid installation of the use of rich application software. Everyone in the usual installation of applications, can be broadly divided into two, one is to download the installation package to install locally, the other is like Apple's iOS system, directly online installation of the Apple Store application can be used, in fact, the installation of Linux applications and Apple, Let's talk about it briefly.

1. First of all, to learn about the installation and removal of Linux applications, you must understand the working mechanism of Yum :

yum,yellowdog Updater Modified

  • -Software update mechanism built on Red hat RPM package

  • < Span style= "Color:rgb (255, 0, 0); White-space:pre; font-size:16px; Background-color:rgb (255, 255, 255); " > -automatically resolves software dependencies

  • -All packages are provided by a centralized Yum software repository

This approach is a unified Red Hat company that most of the more commonly used Linux in the. RPM installation package into the Yum software warehouse to provide client installation services.

Here I'm going to use the VMware virtual machine to bring you experiments, and here I'm using the CENTOS7 operating system.

First, configure the software warehouse   

1. Configure the Local software repository

A. Insert the Centos7.iso image file into the optical drive to make sure the power is turned on

The operation in the virtual machine is:

B. Command operations

[[Email protected] Desktop]# CD

[[email protected] ~]# Umount/dev/cdrom//Uninstall original disc

[[email protected] ~]# mount/dev/cdrom/mnt///Set mount point

[[email protected] ~]# ls/mnt///Show/mnt content

[[email protected] ~]# mkdir-p/repo/cos7dvd//Recursive creation/repo directory and/repo/cos7dvd directory

[[email protected] ~]# cp-rf/mnt/*/repo/cos7dvd///Copy the contents of the disc to/repo/cos7dvd,

For the Software Warehouse

[[email protected] ~]# du-sh/mnt//repo/cos7dvd///Verify that/mnt and/repo/cos7dvd files are the same size



2. Client Configuration Yum File

By configuring the Yum file, you can let the client know where the application is located in the Repository directory, where to download

[[Email protected] Desktop]# CD

[[email protected] ~]# ls/etc/yum.repos.d///The folder that the system accesses when selecting the address to download is/ETC/YUM.REPOS.D

Files that end with. Repo

[[email protected] ~]# Mkdir/etc/yum.repos.d/oldrepo//Create a folder move other repo files here to avoid effects on your experiment

[[email protected] ~]# mv/etc/yum.repos.d/*.repo/etc/yum.repos.d/oldrepo///Disable the unusable warehouse, avoid interference

[[email protected] ~]# ls/etc/yum.repos.d///Verify that there are other files in addition to the local repo file

[email protected] ~]# Yum-config-manager--add file:///repo/cos7dvd/ //Create configuration file

[Email protected] ~]# ls/etc/yum.repos.d/

[[email protected] ~]# vim/etc/yum.conf//cancellation software signature check

...

8 gpgcheck=0//change 1 to 0 disable Gpgcheck test

...

3. Verification

[[email protected] ~]# Yum Clean all//clear Yum Cache

[[email protected] ~]# Yum repolist//Verify warehouse name, path, number of packages

II. Yum Management application

1. Querying packages

Format: Yum list [software name]. ..

eg

[[email protected] ~]# Yum list httpd//Check if HTTPD service is installed

[[email protected] ~]# Yum list Firefox//check if Firefox is installed

2. Get the description of the package

Format: Yum info [software name]. ..

eg

[[email protected] ~]# Yum info httpd//View description of httpd

[[email protected] ~]# Yum info firefox//view Firefox description information

3. query files and commands by which package is generated

Format: Yum privides "*/program or file name". ..

eg

[[email protected] ~]# Yum provides */VIM//query which package the VIM command is generated from

4. Install/Uninstall application software

Installation:

Format: Yum [-y] install software name. ..

eg

[[email protected] ~]# yum-y install httpd//Installation httpd service

Delete:

Format: Yum [-y] Remove software name. ..

eg

[[email protected] ~]# yum-y Remove httpd//Uninstall HTTPD

Reinstall:

Format: Yum [-y] Reinstall software name. ..

eg

When you do not pay attention to the deletion of one of the application software files so that the file does not open properly, you can choose to reload this software repair, here to simulate the accidental removal of vim command,

Repair the vim command by looking up which package the VIM command comes from, and by reinstalling the package where Vim is located.

[[email protected] ~]# vim/etc/passwd//Can edit a file before deleting it

[[email protected] ~]# which vim//view VIM's command path

[[email protected] ~]# Rm-rf/usr/bin/vim//Simulate accidental removal of VIM's command path via

[[email protected] ~]# vim/etc/passwd//Try to edit the file

[email protected] ~]# Yum Provides/usr/bin/vim//view VIM's command path from which package

[[email protected] ~]# Yum list vim-enhanced//See if vim-enhanced is installed

[[email protected] ~]# yum-y Reinstall vim-enhanced//Reinstall vim-enhanced

[[email protected] ~]# VIM/ETC/PASSWD//re-test if vim command can edit file


The Linux family of Yum management application 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.