Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to build YUM in Local area Network based on CentOS 6.5Environment

Shulou Source: shulou.com Published: 2022-06-01 20:20:46 11月14日 Update

This article mainly introduces CentOS 6.5 environment how to achieve the local local area network to build YUM, has a certain reference value, interested friends can refer to, I hope you read this article after a great harvest, the following let Xiaobian take you to understand.

The method of building YUM based on HTTP in Centos 6.5 local local area network has been described above. Here, we will explain the method of building YUM based on FTP.

server-side configuration

Create mount directory

mkdir /media/CentOS_6.5_Final

Grant mount directory permission

chmod -R 777 /media/CentOS_6.5_Final

mount iso

mount -o loop -t CentOS-6.5-x86_64-bin-DVD1.iso /media/CentOS_6.5_Final/

Regular mount

mount /dev/cdrom /media/CentOS_6.5_Final/

Install vsftpd

cd /media/CentOS_6.5_Final/rpm -ivh vsftpd-2.2.2-11.el6_4.1.x86_64.rpm

copy data

cp -rf /media/CentOS_6.5_Final/* /var/ftp/pub

Install createrepo and dependency tools

cd /var/ftp/pub/Packagesrpm -ivh deltarpm-3.5-0.5.20090913git.el6.x86_64.rpmrpm -ivh python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm rpm -ivh createrepo-0.9.9-18.el6.noarch.rpm

Generating YUM Universal Database

createrepo /var/ftp/pub/repodata

Bypass installation from Internet

cd /etc/yum.repos.d/mv CentOS-Base.repo CentOS-Base.repose_bakmv CentOS-Debuginfo.repo CentOS-Debuginfo.repo_bakmv CentOS-Media.repo CentOS-Media.repo_bak

Configuration installed locally only

vi CentOS-Media.repo[xby-01]name=Centos-xbybaseurl=file:///var/ftp/pub/enabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

clear cache

yum clean all

Testing YUM

yum list

Restart vsftpd service

service vsftpd restart

startup

chkconfig vsftpd on

client configuration

cd /etc/yum.repos.d/

Bypass installation from Internet

mv CentOS-Base.repo CentOS-Base.repose_bakmv CentOS-Debuginfo.repo CentOS-Debuginfo.repo_bakmv CentOS-Media.repo CentOS-Media.repo_bak

Configuration installed locally only

vi CentOS-Media.repo[xby0]name=xbybaseurl=ftp://192.168.30.8/pub/enabled=1gpgcheck=1gpgkey=ftp://192.168.30.8/pub/RPM-GPG-KEY-CentOS-6

clear cache

yum clean all

Testing YUM

yum list Thank you for reading this article carefully. I hope that the article "CentOS 6.5 environment how to achieve local local area network building YUM" shared by Xiaobian will help everyone. At the same time, I hope that everyone will support you a lot and pay attention to the industry information channel. More relevant knowledge is waiting for you to learn!

Tags: Articles configuration local area local area network environment clear Internet data method directory cache compliance interconnection services testing value interest and at the same time customers clients Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Redmi Linux Xiaomi OPPO Reno