What 1.yum is and how it works
Yum is designed to address the RMP front end Management Pack where RPM package installation is difficult to resolve dependencies, note: it cannot replace RPM.
His work mechanism is to automatically resolve the dependencies of the package, which is what we need his most core features. So how does he work?
First, you have to have one or more file servers to hold a lot of Rpm Package, this file server can be, http ftp 。 file etc, this file server can also be called yum yum If you want to use these warehouses first go to get the cache information of this warehouse, cache to local, these cache information including each Rpm
How does Yum know which warehouse to go to, there are so many warehouses around the world, thisis the configuration of the client, Yum will find the repository that allows Yum to use according to the local configuration file , to download the package, But if more than one warehouse can be used, it's time to find that warehouse, which depends on the configuration and which warehouses are used first, so configuration information is important.
2. Below to configure two Yum sources, that is, the above-mentioned warehouse, one with the shutdown mode, an HTTP service, are on the native virtual machine implementation
1. First, add a Linux system CD to the virtual machine and attach the disc to the/media
Mount-r/dev/cdrom/media
2. Configure the local Yum profile, under/etc There are two Yum documents, one is yum.conf, one is the folder YUM.REPOS.D, where yum.conf is the master profile, we generally do not move it, We need to go in there and yum.repos.d this file to configure Yum information.
Create a new Mycd.repo file, note: End With. Repo, the configuration file information is as follows
[MYCD]: Only the main field, the name can be arbitrary, but not with the other names
Name=my CD Repo: This is the file identification field, you can take a random
Baseurl=file:///media: This is to tell Yum, where the warehouse, because it is a local path so to start with file://and then add/media, so it is three vertical lines, the specified path to have repodata this folder
Enable=1: This is meant to be enabled, 0 words means disable
Gpgcheck=0: This means that you do not need to verify the program security and other information
3. Use Yum repolist to see if the warehouse is enabled
Yum Repolist
2.1 Configure the Yum source for the HTTP service, provided that you have the HTTPD service installed, and that you have an experimental RPM package
1. First copy the RPM package to/var/www/html/openstack
2. Create a Yum repository
Createrepo/var/www/html/openstack
3. Configure the Yum configuration file
[Openstackyum]
NAME=HTTPD Server for Yum
Basurl=http://172.16.1.42/openstack
Enable=1
Gpgcheck=0
4. Test whether the source can be used
Yum Repolist
This article is from the "Smoke Free Hand" blog, please be sure to keep this source http://lidefu.blog.51cto.com/3429777/1567426
Linux configuration local Yum source