Linux Basic-yum Package management

Source: Internet
Author: User

task target: Customizing the Yum repository: Createrepo, customizing the repo file, installing the HTTPD package with the Yum command, uninstalling the HTTPD package: Yum –y Remove software name, using Yum Install component ' KDE Desktop ': Yum–y groupinstall component name, mastering using Yum to remove components ' KDE desktop ': Yum–y groupremove component name, mastering clear Yum cache: Yum CLE An all, find packages using Yum: Yum Search package name

So easy, o easy, easy, asy, Sy, y .....

1) Customizing the Yum repository: Createrepo

Create a Createrepo directory

Find httpd rpm packages from/media/

Copy the httpd package that will be installed to the/createrepo directory

Package/createrepo into a yum repository using the Createrepo directory

So our yum library is built.

2) Customizing the repo file

The first thing to go into the configuration directory of the Yum repository is to edit the configuration file, which, as far as I know, should be /etc/yum.repos.d/

I was right .... OK, we're going to create a new . Repo ending file with the name Createrepo

Since it is the configuration file Createrepo.repo to enter the appropriate configuration information, saying I really can't remember what fields, simply ...

I swear it's not because I'm lazy, but I want to practice . How to output file contents to another file in a overwritten manner

Next, it's time to use the Vim tool to edit the configuration file Createrepo.repo.

I pointed the address of the Yum library to/createrepo, so that our configuration file could be loaded and all the other files removed so I made a decision:

Rename the Yum.repos.d folder to yum666

Create a new YUM.REPOS.D folder and move the Createrepo.repo in the yum666 folder.

Use yum Clean all to clear the Yum cache

3) Install the HTTPD package using the yum install httpd-y command

Install HTTPD Package Complete

4) Uninstall the HTTPD package using the yum–y remove software name

Complete the uninstallation of the httpd

5) Install the component ' KDE desktop ' using yum:yum–y groupinstall Component Name

The first thing to do is to change the Yum repository in the changed Createrepo.repo file to CD drive mount

Use yum Clean all to clear the Yum cache

Use yum grouplist to view the package groups in the shutdown

Installing the KDE desktop using the yum Groupinstall ' KDE Plasma Workspaces '

After a long wait finally the installation is complete! 6666

6) Master using Yum to remove components ' KDE Desktop ': yum–y groupremove Component Name

To tell the truth in the heart is very not taste, and so on the loaded, but also to uninstall

7) Master purge Yum cache: yum Clean All

Since the repo file is frequently modified, yum clean All is used frequently, and the repo file is reloaded every time, and if there is a problem, the error is obvious.

8) Use Yum to find packages: Yum Search package name

Linux Basic-yum Package management

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.