CentOS5.6 build a local YUM Server

Source: Internet
Author: User
I just installed CentOS5.6 to check whether the yum update is slow. Maybe my network speed is poor. The source speed of the Chinese University of Science and Technology is also slow. I am CERNET + Netcom... or set up a local yum server. 1. Attach the CentOS CD. If it is automatically mounted in the graphic interface, it will be mounted to mediaCentOS_5.6_Final. In text mode

I just installed CentOS5.6 to check whether the yum update is slow. Maybe my network speed is poor. The source speed of the Chinese University of Science and Technology is also slow.

I am CERNET + Netcom... or set up a local yum server.

1. Mount the CentOS CD. If it is automatically mounted on the graphic interfaceEdIa/CentOS_5.6_Final. In text modeCommandMount

2.CdCentOS_5.6_Final/CentOS

[Root @ localhost CentOS] # rpm-ivh createrepo-0.4.11-3.el5.noarch.rpm // install the software package crea that creates software DependenciesTrEpo

[Root @ localhost CentOS] # rpm-ivhFtpD-2.0.5-16.el5_5.1.i386.rpm // install ftp Server

[Root @ localhost CentOS] #ChkconfigVsftpd on; service vsftpd start // start upon startup

3. [root @ localhost CentOS_5.6_Final] #Cp-R */var/ftp/pub // copy the image file to the ftp directory
[Root @ localhost CentOS_5.6_Final] # createrepo/var/ftp/pub // create a software dependency File
420/2683-CentOS/jakarta-commons-ColLections-testframework-javadoc-3.2-2jpp.3.i609/2683-CentOS/yum-NetworkManager-disPatchEr-1.1.16-14.el5.centos.1.noarch.rp2683/2683-CentOS/sg3_utiLsDevel-1.25-5.el5.i386.rpm
Saving Primary metadata
SavingFileLists metadata
Saving other metadata

4. Create a repo File

[Root @ localhost CentOS_5.6_Final] # cd/etc/yum. repos. d/
[Root @ localhost yum. repos. d] # ls
CentOS-Base.repo
[Root @ localhost yum. repos. d] #MvCentOS-Base.repo CentOS-Base.repo.bak
[Root @ localhost yum. repos. d] # vim local. repo

Write the following content:

[Linuxso.com]

Name = linuxso.com

Baseurl = ftp: // 127.0.0.1/pub/

Gpgcheck = 0

EnableD = 1

5. Test

Yum clean all

Yum list

Yum installHttpd

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.