CentOS's Yum Warehouse setup

Source: Internet
Author: User

A. Yum Warehouse description
1, the need to build a Yum warehouse intranet environment, in order to achieve automation and customization of human convenience and rapid increase deployment services, the establishment of the Yum Warehouse is the first choice, can be set up in the company network of Yum Source, for the company's internal staff use, and can be customized RPM package to complete an installation.
2. Introduction to the Yum Warehouse
Yum (full name Yellow dog Updater, Modified) is a shell front-end package manager in Fedora and Redhat. Based on RPM package management, the ability to automatically download the RPM package from the specified server and install, can automatically handle dependency relationships, and install all dependent software packages at once, without the tedious download and installation. Yum provides commands to find, install, and delete one, a group, or even all of the packages, and the commands are concise and well-remembered.
second, the Yum Warehouse installation of the actual combat
1. Installation Environment:
[1 [email protected] ~]# uname-r
2.6.32-504.el6.x86_64
[2 [email protected] ~]# uname-m
x86_64
[3 [email protected] ~]# cat/etc/redhat-release
CentOS Release 6.6 (Final) 3, Yum Warehouse and HTTP site preparation
Note: An HTTP environment is required to access the file. We can use the Lightweight Python module to perform in the site directory:
Python-m
Simplehttpserver
80
&
Depending on the package, we can adjust the/etc/ yum.conf file, change the value of Keepcache to 1 and then preserve the package cache of Yum, and if it is a dependency package with no child dependencies, we can download the dependent packages by Yumdownloader, Yumdownloader in the Yum-utils toolset.
2, here to the previous FPM packaging environment for example, the link is as follows
Http://bbs.51cto.com/thread-1167544-1.html
3. Install Createrepo and create repo
#安装createrepo
Yum Install Createrepo
-Y
#创建仓库repo信息
[[Email protected]
~]# createrepo-pdo/data0/repo//data0/repo/
Spawning worker
0
With
4
Pkgs
Workers finished
Gathering worker Results
Saving Primary Metadata
Saving file
Lists metadata
Saving other metadata
Generating SQLite DBs
Sqlite DBs Complete
#如果之后有rpm包新增或者删除, you need to update repo file
Createrepo
--update
/data0/repo/
#查看仓库下的文件
[[Email protected]
~]# tree/data0/repo/
/data0/repo/
|--
nginx_erma-1.6.0-1.x86_64.rpm
|--
openssl-1.0.1e-42.el6.x86_64.rpm
|--
openssl-devel-1.0.1e-42.el6.x86_64.rpm
|--
pcre-devel-7.8-7.el6.x86_64.rpm
--
Repodata

|--
0c407e9494d459d4496e7d24c2e6a93bbb9bb60e009dcc97aa1efef9010bf64a-filelists.xml.gz

|--
43a3cc03f7fc3e69e32c7d6a2795229596a32469d0924bab815e3f50cb5b0be6-other.sqlite.bz2

|--
510ce97c74a7119f8850016b7e6a5be19fc2bd716fa084e46aeb585686223f80-filelists.sqlite.bz2

|--
60f80504e1a080df7b05200f1c6ffb56a4563c51f9038deb733eaf5279c569d0-primary.xml.gz

|--
84c87598ed82a081e86dfc93d5e76379ce75bc04729e5f3395f6d62e6950b3fa-primary.sqlite.bz2

|--
Eaff97435829909a39f0abb8446167947e90f23dafec2132e338fbb25db996ec-other.xml.gz

--
Repomd.xml

1
Directory
11
Files
4. Configure the Yum source on a different machine
To add a configuration Yum source file:
[Email protected] application]# Cat/etc/yum.repos.d/erma.repo
[Maker]
Name=ermarepo
baseurl=http://repo.trnux.com/
Enable=1
Gpgcheck=0
We can control whether the configuration file takes effect through the enable value of the repo file, but this method is troublesome if the package in the private Yum repository conflicts with the base package, and if you want to access the public Yum source, you also need to modify the configuration file, rebuild the cache, and so on. We can do it another way, is to specify the enabled source and the closed source when using Yum:
Yum--enablerepo=maker--disablerepo=base,extras,updates,epel List
This can also be the case at installation:
Yum--enablerepo=maker--disablerepo=base,extras,updates,epel Install nginx_erma.x86_64
#使用时, we'd better change the private source to enable=0 and the other source to 1 so that the direct Yum doesn't have a problem.

This article is from the "Chuck's blog" blog, please be sure to keep this source http://chuck.blog.51cto.com/10232880/1712797

CentOS's Yum Warehouse setup

Related Article

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.