当前位置:网站首页>Yum package management
Yum package management
2022-07-28 20:32:00 【Operation and maintenance log of Panax notoginseng】
Configure network sources
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
-O Write the document to FILE
Mirror station address :https://developer.aliyun.com/mirror/?spm=5176.21213303.J_3207526240.55.571453c9MyQ8V5
yum File format
[CentOS7-base] # Source name , Required
name=CentOS-$releasever-base # Source description , Can not fill , But there will be hints
baseurl=file:///misc/cd/ # Local CD file , There can be multiple addresses . Required
https://mirrors.aliyun.com/centos/7.3.1611/os/x86_64/
gpgcheck=1 # Whether to turn on verification ,yum Check each downloaded RPM Of GnuPG Signature
enabled=1 # Whether to enable this warehouse ,1 For use ,0 To disable
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 Secret key
# If open yum Source package verification , You need to import RPM Public key , Here is just that there is no import in the system rpm When to install the public key
# This is the same thing as rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
yum Package management
yum
Install only the specified software commands :yum install <package_name>
Delete package command :yum remove <package_name>
Find package command :yum search <keyword>
List all updatable software list commands :yum check-update
Update all software commands :yum update
Update the specified software command :yum update <package_name>
List all installable software list commands :yum list
Generate cache :yum clean all
Clean cache :yum makecache
-y:( When prompted during the installation process, select all as "yes")
yum Sleep
rm -f /var/run/yum.pid
Configure local in the production environment yum
Local yum To configure
1. Copy or upload image CentOS-7-x86_64-DVD-1804 To local
ll /user/local/src/
CentOS-7-x86_64-DVD-1804
2. Mount the image
Copy code
Mount Directory :/mnt/iso
mkdir -p /mnt/iso
mount iso
mount -o loop /usr/local/src/CentOS-7-x86_64-DVD-1804.iso /mnt/iso
Set power on self start
vi /etc/fstab
/usr/local/src/CentOS-7-x86_64-DVD-1804.iso /mnt/iso iso9660 loop,defaults 0 0
Copy code
3. Configure and refresh yum
Offline :mv -f /etc/yum.repos.d/* /home/
vim /etc/yum.repos.d/local.repo
[local-yum]
name=Local Repository
baseurl=file:///mnt/iso
## The directory is iso Mount Directory
enabled=1
gpgcheck=0
yum clean all
yum repolist
4. install httpd, Turn off firewall , Browser access http://192.168.10.11:80
take YUM Source configuration to httpd(Apache Server) in , Other servers can access the... In the intranet through the network YUM Source
yum -y install httpd
mkdir -p /var/www/html/CentOS-7
cp -r /mnt/iso/ /var/www/html/CentOS-7
Browser access :http://192.168.10.11:80/CentOS-7
10.12 Configuration of
vim /etc/yum.repos.d/local.repo
[local-yum]
name=Local Repository
baseurl=http://192.168.10.11/CentOS-7 ## The directory is iso Mount Directory
enabled=1
gpgcheck=0
yum clean all
yum repolist
边栏推荐
- Linxu 【权限,粘滞位】
- Other IPS cannot connect to the local redis problem solving and redis installation
- 【CodeForces】Educational Codeforces Round 132 (Rated for Div. 2)
- flask_ Mail source code error
- DHCP.DNS.NFS
- Introduction to seven kinds of polling (practice link attached)
- Array out of bounds
- Raspberry Pie 3 connected to WiFi
- Extract China map from global.Nc data and calculate regional CO2 value based on acgis
- Pop up modal box
猜你喜欢
![[C language] 5000 word super detailed explanation of various operations of the sequence table](/img/3b/932526e96ef14df8a321048e9c14b4.png)
[C language] 5000 word super detailed explanation of various operations of the sequence table

一文让你搞懂什么是TypeScript

C语言数据 3(2)

Nocturnal simulator settings agent cannot be saved

Durham High Lord (classic DP)

LVS deployment Dr cluster

Simple example of C language 1

C language data 3 (2)

Introduction to seven kinds of polling (practice link attached)

Merge sort template
随机推荐
[pytorch] LSTM neural network
【CodeForces】Educational Codeforces Round 132 (Rated for Div. 2)
[C language] comprehensively analyze the pointer and sort out the pointer knowledge points
七种轮询介绍(后附实践链接)
LVS load balancing cluster
进制及数的表示 2
Introduction to seven kinds of polling (practice link attached)
产品力大幅提升 新款福特探险者发布
C语言数据 3(1)
CNN convolution neural network learning process (weight update)
Raspberry pie creation self start service
MySQL batch update data
读取json配置文件,实现数据驱动测试
Shanghai Jiaotong University joined hands with Taobao to set up a media computing laboratory: promoting the development of key technologies such as video super score
Vivado design single cycle CPU
GRU神经网络
LeetCode_ Bit operation_ Medium_ 260. Number III that appears only once
How to automatically store email attachments in SharePoint
C语言简单实例 1
What is the variance?