CentOS Create local Yum source build local Yum Warehouse Pro-Test available

Source: Internet
Author: User

Now if we need a large-scale deployment to wash a system, or the system needs to install a software such as Nginx software. Sometimes your environment restricts you to sisu the net, or the outside network is very slow time. We consider the establishment of local Yum warehouse, intranet machine can directly install the required software, to solve the Linux under the dependency of the package, convenient, fast.

Let's build up the underlying Yum repository:

System: centos6.5

There are many ways to build a yum repository, and we use the Yum plugin yum-downloadonly plugin to download the RPM packages we need. Use Createrepo to create a warehouse file.

Begin:

We need to install Zabbix Monitor, NIGNX Web server, but our local Yum does not have a ZABBIX,NIGNX package. We install it. Find a machine that can access the Internet:

Yum install-y yum-plugin-downloadonly Createrepo

Create warehouse Address We use/data/mirrors as a warehouse directory here.

Mkdir-p/data/mirrors/centos/6/{os,updates}/i386/rpms

Mkdir-p/data/mirrors/centos/6/{os,updates}/x86_64/rpms

After that, you can download the RPM package to the development directory:

Yum install nginx zabbix-server-y--downloadonly--downloaddir=/data/mirrors/centos/6/os/x86_64/rpms

Cp/data/mirrors/centos/6/os/x86_64/rpms/*.rpm/data/mirrors/centos/6/updates/x86_64/rpms

To create a warehouse file:

createrepo/data/mirrors/centos/6/os/x86_64/rpms/

createrepo/data/mirrors/centos/6/updates/x86_64/rpms/

To provide a Web server externally using NIGNX:

Yum install-y Nginx


Vi/etc/nginx/conf.d/mirros.conf

server {

Listen 80;

server_name centos6.dengchao.com;## #你机器的域名映射

Root/data/mirrors;

Index index.html;

}

To create a repo file:

VI Mirrors.repo

[Mbase]

Name=centos-6-base

baseurl=http://centos6.dengchao.com/centos/6/os/x86_64/

Enabled=1

Gpgcheck=0


#released Updates

[Mupdates]

Name=centos-6-Updates

baseurl=http://centos6.dengchao.com/centos/6/updates/x86_64/

Enabled=1

Gpgcheck=0

CP mirrors.repo/etc/yum.repos.d/

This is where our Yum source is built.

As long as the intranet can be connected with this machine, directly using Mirrors.repo to/etc/yum.repos.d/, you can start to install Nginx and any software you want to install


This article from "Nginx Installation Optimization" blog, declined reprint!

CentOS Create local Yum source build local Yum Warehouse Pro-Test available

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.