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!