Implement local yum source configuration

Source: Internet
Author: User

Preface
If you see this article, it means that you are not very familiar with Linux, so I am confused and I think it is also suitable for you. One of my beginners, for our beginners, theory and practice are very important. After reading the theory, it is inevitable that some tools will be used to verify the theory to consolidate the knowledge we have learned. It is normal to do experiments, however, people are emotional animals. The negative opening will inevitably bring us a blow to our determination to learn linux. I am one of them. After reading the theory, I will do my own experiments, however, the installation of an installation package fails. Sometimes it is frustrating and hard to think about. In fact, to tell the truth, it is not difficult for linux, but more is that we are used to Windows, it cannot be converted to linux! However, as long as you have perseverance, I think this is just a matter of time!
In linux, software must be installed first in the initial stage, followed by configuration. If the software cannot be installed, do not mention the subsequent configuration. Therefore, here, we configure a local yum server on the Virtual Machine. Sometimes the installation package has many dependencies. For our beginners, this is not a small problem. It may take a long time to install a software, this is not worth the candle for our precious time. Therefore, before practice, we should first learn to build a local yum server! This will increase your confidence in learning linux!
General Method
This test installs samba because the software involves dependencies. First, we need to check whether or not 1 is installed on the server under rpm.


 
There is a component in the system, so we can see a significant effect later, we are now here to delete it 2


 
No samba-related software packages are available now! We will first install samba in the conventional way to see what is reported! First, attach it to the CD, and then go to the software package location to run the installation operation. 3

The error message is displayed. If the support for "perl" and "samba-common" is missing, install the two software first! It has been tested. samba can be installed and can be used normally after the two software are installed!
Configure/etc/yum. repos. d/
Now we will use yum for installation. First, yum is available when rhel5 is installed, it's only because if you use an official website to update your website, you will be prompted for registration and the like unless you have bought rhel5. Therefore, you only need to change the yum update address to an open-source one. The files with the specified yum update address are in/etc/yum. repos. d.
Enter/etc/yum. repos. d/, 6
 

Then make a backup 7

5 after editing
 

Configuration File Content Overview:
The repository name is in [].
Name repository description
Baseurl is your YUM source address, because it is configured locally, it can also be HTTP, FILE, etc.
Enabled: whether to enable this repository. 1 indicates the repository is enabled, and 0 indicates the repository is disabled.
Gpgcheck whether to check the GPG signature (used to verify whether the package to be installed is officially REDHAT)
You need to use the following command to enter the GPGKEY storage address. To use this function 9

In this way, we have configured a local yum server. Let's test it as follows: 10

Here we enter "y" and then enter
Result 11:
 

The test result is that the two components required by samba have been installed. Of course, a samba-client component is missing, which is generally not used, but if you want to perform a test, you can manually install it! This has little impact!
Finally, check whether the software package is correctly installed and start the service 12.

So far, this configuration has been completed, and the effect can be clearly seen, yum efficiency is still quite high! It mainly enhances our confidence in learning linux. No matter whether you can enhance it or not, I will not feel a headache because I cannot install the software package! Hey
Learning linux requires perseverance. Of course, you also need to have a detailed learning plan. You don't want to blindly see what you want to learn. Services one by one are slowly broken and cannot be broken!
Now, I am writing an article about how to learn about linux!
 
This article is from the "MCITP" blog

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.