CentOS builds Yum source server through http

Source: Internet
Author: User

CentOS builds Yum source server through http

After centos mini is installed on multiple servers, you need to install some basic software packages from the Internet yum, which is time-consuming and traffic-consuming. You can build a YUM server on the LAN to solve this problem. The procedure is as follows:

The Server Installation configuration is as follows:

1. Upload the CentOS-6.5-x86_64-bin-DVD1.iso image file to a server

[Root @ localhostdata] # ll/home/data/CentOS-6.5-x86_64-bin-DVD1.iso-rwxr -- r -- 1nobodynobody4467982336Feb2801: 28/home/data/CentOS-6.5-x86_64-bin-DVD1.iso

2. Mount the image, install creatrepo, and generate the repodata directory.

Mount-oloopCentOS-6.5-x86_64-bin-DVD1.iso/mnt/cp-R/mnt/Packages/home/data/Centos/yuminstallcreaterepo-ycd/home/data/createrepoCentos/[root @ localhostCentos] # lltotal276dr-xr-xr-x2rootroot278528Apr2114: Sources: 49 repodata

3. Install httpd server

Yuminstallhttpd-yvi + 292/etc/httpd/conf/httpd. conf

Change/var/www/html to/home/data

/Etc/init. d/httpdstart

4. configure the firewall and disable selinux,

Iptables-AINPUT-ptcp -- dport80-jACCEPTsetenforce0

The client configuration is changed as follows: ip address is changed to sever ip Address

Cat>/etc/yum. repos. d/CentOS-Base.repo <EOF [base] name = myisorepobaseurl = http: // 192.168.1.23/Centosgpgcheck = 0 enabled = 1 [updates] name = myisoupdatebaseurl = http: // 192.168.1.23/Centosgpgcheck = 0 enabled = 1 EOFyumcleanallyuminstallvim

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.