Create an openstack local Yum Source

Source: Internet
Author: User
Tags gpg

Because the yum source download on the openstack official website is slow, we now download the built-in installation packages of openstack, epel, CEpH, and RedHat, and create a local update and install Yum source.


1. Download the package that comes with openstack, epel, CEpH, and RedHat to a directory/yum. OS. Repo

[[Email protected] ~] # Mkdir/yum. OS. Repo

2. Determine the configuration path of the yum Source

[[Email protected] ~] # Ls/etc/yum. Repos. d/

Name a yum source file OS. Repo for the openstack Yum source.

Put Yum source OS. Repo directly under this directory



Second, you need to know the yum source code format.

This article takes the epel source of Sohu as an example to describe

1 [epel]



2 name = extra packages for Enterprise Linux 6-$ basearch



3 baseurl = http://mirrors.sohu.com/fedora-epel/6server/?basearch



4 failovermethod = Priority



5 enabled = 1



6 keepcache = 1



7 gpgcheck = 1



8 gpgkey = file: // etc/pki/rpm-GPG/RPM-GPG-KEY-EPEL



Explanation:



The name of the software source is enclosed in square brackets.



2. Some information about the source



3. This line specifies a baseurl (source image server address)



4 priority is the default value. www.linuxidc.com indicates that the image server address is selected sequentially from the listed baseurls, and roundrobin indicates that the image server address is randomly selected from the listed servers.



5. This option indicates that the source defined in the repo is enabled, and 0 indicates disabled.



6 keep cache 1 Yes, 0 No -- whether to keep the downloaded items on the host



7 1 Yes, 0 No -- this option indicates that the RPM downloaded in the repo will undergo GPG verification, and the source of the RPM package has been determined to be valid and safe



8. The signed key defines the GPG key used for verification.




Note: The releasever variable defines the release version, which is usually 8, 9, 10, and other numbers.


$ Basearch defines the system architecture, which can be i386, x86_64, or PPC equivalent. These two variables have different values depending on the current system version architecture, this allows you to select a software package suitable for the current system during Yum upgrade.


Create Yum Source



First, you need to use the createrepo command to create the yum source.



The rpm is usually installed on the installation disc.



For example, I installed a createrepo-0.9.9-18.el6.noarch



After the installation is complete, createrepo is generated.



Find the package to install the source, such as/yum. OS. repo.



[[Email protected]/] # createrepo yum. OS. repo/



32/32-svgalib-1.9.25-3.el5.i386.rpm



Saving primary metadata



Saving file lists metadata



Saving other metadata



In yum. OS. A repodata directory is generated under the repo Directory, which is the source to be searched by yum. The source of the server has been generated. Note that this directory is integrated with the package, you cannot change the path at will.



4. arpch sharing



Temporary arpch Construction



Python-M simplehttpserver 80;



Note: This command must be implemented in the yum. OS. Repo to be installed.



Five Yum source installation rpm



Add parameters to/etc/yum. Repos. d/OS. Repo On the openstack node.



1 [OS]



2 name = openstack-Havana-yum



3 baseurl = http: // 10.240.216.250/



4 failovermethod = Priority



5 enabled = 1



6 keepcache = 1



7 gpgcheck = 0 (Note: if you select 1 here, a lack of signature will be displayed later, and it will be better if there is no error after 0)





Yum search **


Yum install enter the installation package name (-nogpgcheck) written in bold in the preceding command. --- if you select 1 for the previous configuration, an error is returned.>


This article is from the "zhanguo1110" blog, please be sure to keep this source http://zhanguo1110.blog.51cto.com/5750817/1439596

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.