Build a local lan yum source using CentOS

Source: Internet
Author: User

Build a local lan yum source using CentOS
#1. Mount CentOS-6.5-x86_64-bin-DVD1.iso firstmount-oloop-tiso9660/dev/cdrom/mnt/rpm-Uvh/mnt/Packages/createrepo-0.9.9-18.el6.noarch.rpmmkdir-p/data/www/centos/6/x86_64/\cp-r/mnt/Packages//data/www/centos/6/x86_64/cp/mnt/RPM-GPG-KEY-CentOS-*/data/www/centos/umount/mnt#2. Mount CentOS-6.5-x86_64-bin-DVD2.isomount-oloop-tiso9660/dev/cdrom/mnt/\cp-r/mnt/Packages//data/www/centos/6/x86_64/umount/mnt#3. Create a repositorycreaterepo/data/www/centos/6/x86_64/#4. Start nginxcat>/etc/nginx/conf.d/yum.repo.conf<<EOFserver{listen80;server_namelocalhost;root/data/www;# Enable Nginx directory file listautoindexon;autoindex_exact_sizeoff;autoindex_localtimeon;}EOFchmod755/datachown-Rnginx./data/wwwservicenginxstartchkconfignginxon# Test Access: http: // 192.168.20.210/centos/6/x86_64/#5. yum source configurationcd/etc/yum.repos.dmvCentOS-Base.repoCentOS-Base.repo.bakcat>CentOS-Base.repo<<'EOF'[base]name=CentOS-6-Base-LANbaseurl=http://192.168.20.210/centos/6/$basearch/gpgcheck=1gpgkey=http://192.168.20.210/centos/RPM-GPG-KEY-CentOS-6EOF#6. Verifyyumcleanallyummakecache

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.