In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to build a private YUM warehouse, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, let the editor take you to understand it.
With the help of YUM software warehouse, the tasks of installing, uninstalling and automatically upgrading rpm software packages can be completed, and the lazy relationship between rpm packages can be found and solved automatically, without the need for administrators to manually install each rpm package one by one, which makes it easier for administrators to maintain a large number of Linux servers.
Img build private YUM warehouse private yum warehouse environment system version: centos7.4 IP:192.168.1.47 # had better go to the public network private yum warehouse server configuration first: create use yum warehouse storage path mkdir / home/mirros/siyou-p second: install the necessary software (yumdownloader this command in the yum-utils tool, used to download software packages But do not install) yum install createrepo yum-utils-y third: upload your packaged rpm package to / home/mirros/siyoucd / home/mirros/siyoulrzsz# or go to this directory, 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 Do not recognize the newly added) 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 enabled. Without this parameter, enable gpgcheck=0# to rebuild cache and install software yum clean all & & yum makecacheyum install openssl-* Mirror Station environment system version: centos7.4 IP:192.168.1.47 # should be able to access public network centos and Epel official sources China Station (China University of Science and Technology Mirror Station) introduction to the daily use of http://mirrors.ustc.edu.cncentos software sources (base,extras,updates) Note: rsync of China University of Science and Technology Each ip can only synchronize two private network mirror servers at the same time. First: install software yum install rsync second: synchronization software source # base source of synchronization centos7 / 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# same Step centos7's updates source rsync-av rsync://mirrors.ustc.edu.cn/centos/7/updates / home/mirrors/centos/7++ or 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 regularly synchronize updates. 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 uses second: clear cache And rebuild makecacheyum clean all & & yum makecache third: install Software yum install tree-y Thank you for reading this article carefully. I hope the article "how to build a Private YUM Warehouse" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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.