当前位置:网站首页>Local Yum source production
Local Yum source production
2022-06-25 21:19:00 【Hello, test】
Preface :
Usually use windows We will save the commonly used software packages to our own computers , For subsequent offline installation , that linux If the system is not connected to the Internet , How do we install it , At this time, it is necessary to conduct local networking in advance yum Source production .
Like the installation package of ordinary software products , Will package the dependent packages involved offline to the installation package , For customers to install offline .
Let's make a git Take the offline source of .
( One ) Download offline rpm
( Two ) Make offline source
( 3、 ... and ) Use offline source
( One ) Download offline rpm
1. On a computer that can be connected to the Internet centos Operate on the machine , Guarantee /etc/yum.repo.d/ There is only one repo file ( One is reserved here so that you can quickly find the corresponding download after subsequent installation rpm package !!)

2. We need to configure yum file , Set up install When installing, it will automatically rpm Save the package locally
# vim /etc/yum.conf
keepcache=1(0: Do not download | 1: Download to local ), Need to change to 1

3. Once you set it up , We perform the installation .( Here we need to make the offline source of the service ,install Just install one , It doesn't matter if you can install more than one at the same time , There's no limit to the number !!)
# yum -y install git
We can see that a total of 4 individual rpm package .

4. After installation , Let's go down this path , You can see that install Installed rpm Packages are saved to this directory .
# cd /var/cache/yum/x86_64/7
according to repo File name find the corresponding folder , We can see the newly downloaded and installed 4 individual rpm It has been cached locally on the server .

5. We will packages Under the rpm The packages are copied to any empty folder ( for example : /root/git/packages/)

( Two ) Make offline source
1. install createrepo
# rpm -ivh createrepo-0.9.9-26.el7.noarch.rpm deltarpm-3.6-3.el7.x86_64.rpm python-deltarpm-3.6-3.el7.x86_64.rpm
These depend on the download path of the package :https://pan.baidu.com/s/1jl1bYR8hB6L8ruGW-bxQrA
Extraction code :6ev3
2. Generate repodata file
# createrepo /root/git/packages/ Replace the path with the new one rpm The catalog of
# yum makecache
After production ,packages A... Will be generated in the directory repodata The catalog of . We can git The catalog is packaged as a whole , Subsequent machines can be directly copied and decompressed .

So far our git After the offline source is made .
( 3、 ... and ) Use offline source
ssh Connect to an Internet connection centos On the machine , Will just make a good git/ Copy directory to /tmp Under the table of contents .
1. Get into /etc/yum.repo.d/ Under the table of contents , To configure git.repo file
[git]
name=git
baseurl=file:///tmp/git
gpgcheck=0
enabled=1
proxy=_none_
2. Load new yum After source , You can go offline yum install install git.
# yum clean all
# yum repolist
Hello Test, Hand made yum We have finished introducing the source , Leave a message in the comment area , finger heart ~
边栏推荐
- 01 network basics
- Is it safe for Xiaobai to open a stock account online?
- Volatile qualifier
- Molecular dynamics - basic characteristics of molecular force field
- CANoe. Diva operation guide - establishment of operation environment
- How to buy the millions of medical insurance for children? How much is it a year? Which product is the best?
- What is machine learning? (Fundamentals)
- [machine learning] machine learning from zero to mastery -- teach you to understand the principle of decision tree
- New generation engineers teach you how to play with alluxio + ml (Part 2)
- Openocd compilation and installation
猜你喜欢

How to write an infinite loop

Yolov4 improved version comes out! Yolov4 extended edition! Yolov4 launched scaled-yolov4: scaling cross stage partial network

Sqlmap for interface security testing
![[nailing scenario capability package] ranking of enterprise employees' points](/img/f5/ed5bd90706ef166c3758bc03ab32bc.jpg)
[nailing scenario capability package] ranking of enterprise employees' points
![[nailing scenario capability package] enterprise and public institution intelligent access control](/img/0e/43433ca5586c48d01708e5fa39a808.jpg)
[nailing scenario capability package] enterprise and public institution intelligent access control

Bank digital transformation layout in the beginning of the year, 6 challenges faced by financial level structure and Countermeasures

Differences between modems and routers (powercert animated videos)

The SH runtime directly reported an error syntax error near unexpected token ` $'. \r‘

Explain memcached principle in detail

Getting started and using postman
随机推荐
"Developer theory" multi system integrated development - rapid nailing of enterprise owned systems
Talking about the foundation of function test today
Lesson 1 Preparation
Weed FS stress test
OLED driven learning based on ssd1306 (II): addressing mode of ssd1306
C language soul torture: do you know the difference between the two?
What is a subnet mask? (Powercert animated videos)
Solve the parameter problem that laravels cannot receive wechat callback
IPtables
Basic process of configuring utf8 in idea
C language dynamic memory allocation
Nmap is simple and practical
Rounding related calculation
Cross project measurement is a good helper for CTOs and PMOS
Soft test intermediate simple notes
银河证券靠谱吗?开证券账户安全吗?
JVM Foundation
What is ARP (address resolution protocol)? (Powercert animated videos)
The SH runtime directly reported an error syntax error near unexpected token ` $'. \r‘
Shell syntax