In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
How to build a private YUM warehouse and intranet mirror station, in view of this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.
Build a private YUM warehouse
Private yum warehouse environment system version: centos7.4 IP:192.168.1.47 # preferably on the public network
Server configuration of private yum warehouse
First: create the yum repository path mkdir / home/mirros/siyou-p. Second: install the necessary software (yumdownloader is used in the yum-utils tool to download the software package, but not install it) yum install createrepo yum-utils-y third: upload your packaged rpm package to / home/mirros/siyoucd / home/mirros/siyoulrzsz# or enter the directory and download the software to this directory. But do not install yumdownloader openssl-* fourth: initialize the repodata index file (each new rpm needs to be updated so that the newly added ones will not be recognized) createrepo-pdo / home/mirrors/siyou/ / home/mirrors/siyou/# below is the update command createrepo-- update / home/mirrors/siyou/ after adding the rpm package. Fifth: provide http service cd / home/mirros/python-m SimpleHTTPServer 80
Client configuration
When using private sources, it is recommended that you disable other sources first when the package is the same as other sources in base.
Cd / etc/yum.repos.dvim Centos-siyou.repo [siyou] name=siyoubaseurl= http://192.168.1.47/siyouenable=1 # 1 means to enable, without this parameter also means to enable gpgcheck=0# rebuild cache and install the software yum clean all & & yum makecacheyum install openssl-*
Mirror station environment
System version: centos7.4 IP:192.168.1.47 # to be able to access public network centos and epel official sources, China Station (China University of Science and Technology Mirror Station) http://mirrors.ustc.edu.cncentos Daily Software Source introduction (base,extras,updates) Note: each ip of China University of Science and Technology can only synchronize two ip at the same time.
Private network image server configuration
First: install software yum install rsync second: synchronization software source # synchronization centos7 base source mkdir / home/mirrors/centos/7-prsync-av rsync://mirrors.ustc.edu.cn/centos/7/os / home/mirrors/centos/7# synchronization centos7 extras source rsync-av rsync://mirrors.ustc.edu.cn/centos/7/extras / home/mirrors/centos/7# synchronization centos7 updates source rsync-av rsync://mirrors.ustc. Edu.cn/centos/7/updates / home/mirrors/centos/7++ may omit the first three steps Direct synchronization centos7 official source rsync-av rsync://mirrors.ustc.edu.cn/centos/7 / home/mirrors/centos# simply synchronize all the information of a branch rsync-av rsync://mirrors.ustc.edu.cn/centos/7.4.1708 / home/mirrors/centos/ third: add epel source synchronization (Epel source is extended, not officially maintained by centos But contains a lot of software) mkdir / home/mirrors/epel/7-prsync-av rsync://mirrors.ustc.edu.cn/epel/7/ / home/mirrors/epel/7 fourth: for long-term use, you need to write the above synchronization commands into regular execution files, and update them synchronously regularly. Fifth: start httpcd / home/mirrorspython-m SimpleHTTPServer 80.
Client configuration
First: back up the official source in the / etc/yum.repo/ directory and create your own source The following vim / etc/yum.repo/ ccc.repos [base] name=CentOS-$releasever-Base#mirrorlist= http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infrabaseurl=http://192.168.1.47/centos/$releasever/os/$basearch/gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7#released updates [updates] name=CentOS-$releasever-Updates#mirrorlist= http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infrabaseurl=http://192.168.1. 47CentrosUniverse releases updates http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infrabaseurl=http://192.168.1.47/centos/$releasever/extras/$basearch/gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infrabaseurl=http://192.168.1.47/centos/$releasever/extras/$basearch/gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 basearchAccording to gpgchecklists 1gpgkey= file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7#additional source [extras] name=CentOS-$releasever-Extras#mirrorlist= source second: how the client installs the epel source # after installing the extras source The default is the yum install epel*-y # edit / etc/yum.repo/epel.repo file vim / etc/yum.repo/ epel.repol [epel] name=Extra Packages for Enterprise Linux 7-$basearchbaseurl= http://192.168.1.47/epel/7/$basearch#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearchfailovermethod=priorityenabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7[epel-debuginfo]name=Extra Packages for Enterprise Linux 7-enabled. $basearch-Debugbaseurl= http://192.168.1.47/epel/7/$basearch/debug#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearchfailovermethod=priorityenabled=0gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7gpgcheck=1[epel-source]name=Extra Packages for Enterprise Linux 7-$basearch-Sourcebaseurl= http://192.168.1.47/epel/7/SRPMS#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearchfailovermethod=priorityenabled=0gpgkey=file:///etc/pki / rpm-gpg/RPM-GPG-KEY-EPEL-7gpgcheck=1
Client use
Second: clear the cache and rebuild makecacheyum clean all & & yum makecache. Third: install the software yum install tree-y. This is the answer to the question on how to build a private YUM warehouse and intranet mirror station. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.