Use createrepo to customize the yum Source

Source: Internet
Author: User

Use createrepo to customize the yum Source


Self-made Yum sources are sometimes necessary, for example, to customize your own software, to ensure security, or to be tall!

The following is the basic idea, followed by the experiment steps. The core of the experiment is the usage and quality of the RPM you choose.


1. Prepare all required RPM packages and upload them to the yum server/var/www/html/CDN/x86_64 directory.

2. Use createrepo to create your own Yum Source

Yum-y install createrepo

Createrepo-u-o-d/var/www/html/CDN/

3. Set the CDN. Repo source on the client

[CDN]

Name = cdnrepo

Baseurl = http: // ip of Yum server/CDN

Gpgcheck = 0

Enabled = 1

4. Client Verification

Yum clean all

Yum list all

Yum intall xxx



Experiment results:

Server:

Here is just a Samba source. The related software packages include samba *, libsmbclient *, libtalloc *, and libtevent *


1. Prepare all required RPM packages in the/var/www/html/CDN/x86_64 directory.

Libsmbclient-3.6.9-164.el6.i686.rpm samba-client-3.6.9-164.el6.x86_64.rpm

Libsmbclient-3.6.9-164.el6.x86_64.rpm samba-common-3.6.9-164.el6.i686.rpm

Libsmbclient-devel-3.6.9-164.el6.i686.rpm samba-common-3.6.9-164.el6.x86_64.rpm

Libsmbclient-devel-3.6.9-164.el6.x86_64.rpm samba-doc-3.6.9-164.el6.x86_64.rpm

Libtalloc-2.0.7-2.el6.i686.rpm samba-domainjoin-gui-3.6.9-164.el6.x86_64.rpm

Libtalloc-2.0.7-2.el6.x86_64.rpm samba-swat-3.6.9-164.el6.x86_64.rpm

Libtalloc-devel-2.0.7-2.el6.i686.rpm samba-winbind-3.6.9-164.el6.x86_64.rpm

Libtalloc-devel-2.0.7-2.el6.x86_64.rpm samba-winbind-clients-3.6.9-164.el6.i686.rpm

Libtevent-0.9.18-3.el6.i686.rpm samba-winbind-clients-3.6.9-164.el6.x86_64.rpm

Libtevent-0.9.18-3.el6.x86_64.rpm samba-winbind-devel-3.6.9-164.el6.i686.rpm

Libtevent-devel-0.9.18-3.el6.i686.rpm samba-winbind-devel-3.6.9-164.el6.x86_64.rpm

Libtevent-devel-0.9.18-3.el6.x86_64.rpm samba-winbind-krb5-locator-3.6.9-164.el6.x86_64.rpm

Samba-3.6.9-164.el6.x86_64.rpm


2. Use createrepo to create your own Yum Source

# Yum-y install createrepo

# Createrepo-u-o-d/var/www/html/CDN

25/25-x86_64/libsmbclient-3.6.9-164.el6.x86_64.rpm

Saving primary metadata

Saving file lists metadata

Saving other metadata

# Pwd

/Var/www/html/CDN

# Ls-R

.:

Repodata x86_64


./Repodata:

Filelists.sqlite.bz2 filelists.xml.gz other.sqlite.bz2 other.xml.gz primary.sqlite.bz2 primary.xml.gz repomd. xml


./X86_64:

Libsmbclient-3.6.9-164.el6.i686.rpm samba-client-3.6.9-164.el6.x86_64.rpm

...


Client:


1. Set Repo

[CDN]

Name = cdnrepo

Baseurl = http: // 172.17.0.83/CDN

Gpgcheck = 0

Enabled = 1


2. Installation Verification

Clear cache first

# Yum clean all

Loaded plugins: fastestmirror, refresh-packagekit

Cleaning repos: CDN

Cleaning up everything

Cleaning up list of fastest mirrors


Regenerate cache and check whether the yum source is correct

# Yum list all | grep CDN

Libsmbclient. i686 3.6.9-164. el6 CDN

Libsmbclient. x86_64 3.6.9-164. el6 CDN

Libsmbclient-devel.i686 3.6.9-164. el6 CDN

3.6.9-164. el6 CDN

Libtalloc. i686 2.0.7-2. el6 CDN

Libtalloc. x86_64 2.0.7-2. el6 CDN

Libtalloc-devel.i686 2.0.7-2. el6 CDN

Libtalloc-devel.x86_64 2.0.7-2. el6 CDN

Libtevent. i686 0.9.18-3. el6 CDN

Libtevent. x86_64 0.9.18-3. el6 CDN

Libtevent-devel.i686 0.9.18-3. el6 CDN

Libtevent-devel.x86_64 0.9.18-3. el6 CDN

Samba. x86_64 3.6.9-164. el6 CDN

Samba-client.x86_64 3.6.9-164. el6 CDN

Samba-common.i686 3.6.9-164. el6 CDN

Samba-common.x86_64 3.6.9-164. el6 CDN

Samba-doc.x86_64 3.6.9-164. el6 CDN

3.6.9-164. el6 CDN

Samba-swat.x86_64 3.6.9-164. el6 CDN

Samba-winbind.x86_64 3.6.9-164. el6 CDN

3.6.9-164. el6 CDN

3.6.9-164. el6 CDN

3.6.9-164. el6 CDN

3.6.9-164. el6 CDN

3.6.9-164. el6 CDN


Final installation test

Here, Samba is installed. The dependent packages include libtalloc, libtalloc, samba-common, samba-winbind, and samba-winbind-clients.

# Yum install samba

Loaded plugins: fastestmirror, refresh-packagekit

Loading mirror speeds from cached hostfile

Setting up install process

Resolving Dependencies

--> Running transaction check

---> Package Samba. x86_64. 6.9-164. el6 will be installed

--> Processing dependency: Samba-winbind-clients = 3.6.9-164. el6 for package: samba-3.6.9-164.el6.x86_64

--> Processing dependency: Samba-common = 3.6.9-164. el6 for package: samba-3.6.9-164.el6.x86_64

--> Processing dependency: libtalloc. so.2 (talloc_2.0.2) (64bit) for package: samba-3.6.9-164.el6.x86_64

--> Processing dependency: libtevent. so.0 (tevent_0.9.9) (64bit) for package: samba-3.6.9-164.el6.x86_64

--> Processing dependency: libwbclient. so.0 () (64bit) for package: samba-3.6.9-164.el6.x86_64

--> Processing dependency: libtevent. so.0 () (64bit) for package: samba-3.6.9-164.el6.x86_64

--> Processing dependency: libtalloc. so.2 () (64bit) for package: samba-3.6.9-164.el6.x86_64

--> Running transaction check

---> Package libtalloc. x86_64 2. 0.7-2. el6 will be installed

---> Package libtevent. x86_64. 9.18-3. el6 will be installed

---> Package samba-common.x86_64. 6.9-164. el6 will be installed

---> Package samba-winbind-clients.x86_64. 6.9-164. el6 will be installed

--> Processing dependency: Samba-winbind = 3.6.9-164. el6 for package: samba-winbind-clients-3.6.9-164.el6.x86_64

--> Running transaction check

---> Package samba-winbind.x86_64. 6.9-164. el6 will be installed

--> Finished dependency resolution


Dependencies resolved


========================================================== ========================================================== ========================================================== ==================

Package arch version repository size

========================================================== ========================================================== ========================================================== ==================

Installing:

Samba x86_64 3.6.9-164. el6 CDN 5.0 m

Installing for dependencies:

Libtalloc x86_64 2.0.7-2. el6 CDN 20 K

Libtevent x86_64 0.9.18-3. el6 CDN 26 K

Samba-common x86_64 3.6.9-164. el6 CDN 10 m

Samba-winbind x86_64 3.6.9-164. el6 CDN 2.1 m

Samba-winbind-clients x86_64 3.6.9-164. el6 CDN 2.0 m


Transaction Summary

========================================================== ========================================================== ========================================================== ==================

Install 6 package (s)


Total download size: 19 m

Installed size: 68 m

Is this OK [Y/n]:


This article is from the "jerrymin" blog, please be sure to keep this source http://jerrymin.blog.51cto.com/3002256/1543806

Use createrepo to customize the yum Source

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.