Build a LAN yum Server

Source: Internet
Author: User

Background:

Online yum server downloads are often used, which consumes bandwidth and wastes resources. Then we decided to build the yum server of the LAN for technical personnel.

Environment Introduction:

System: centos 6.3 mini

Environment: Virtual Machine

Server IP: 172.16.1.200

Required tools: apache, centos-DVD1 ISO image (remember DVD1, I used DVD2 at the beginning, the result is a lot of things are not .)

Start installation:

1. # mkdir-p/data/yum/centos6.3

2. install apache and change the WEB path to "/data/yum/centos6.3 ″

3. Install RPM Configuration tool relational library package: createrepo-0.9.9-17.el6.noarch.rpm package

4. Prepare the rpm package. I will use the centos CD to mount it here.

# Mkdir-p/mnt/cdrom

# Mount/dev/cdrom/mnt/cdrom

5. Use createrepo to set and generate a relational database:

# Createrepo-v/data/yum/centos6.3

Saving Primary metadata
Saving file lists metadata
Saving other metadata

Indicates that the installation is successful.

---------------------------------

Configure the client:

1. Import to/etc/yum. repos. d/first, copy the CentOS-Base.repo to the CentOS-Base.repo.bak

# Cd/etc/yum. repos. d

# CpCentOS-Base.repoCentOS-Base.repo.bak

# ViCentOS-Base.repo

Modify the configuration as follows:

[Base]

Name = CentOS-$ releasever-Base

Baseurl = http: // 172.16.1.200

Enabled = 1

Gpgcheck = 0

# Wq

2. # yum clean all # Clear Cache

Now the server and client configurations are complete!

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.