当前位置:网站首页>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
边栏推荐
- [experiment sharing] CCIE BGP reflector experiment
- 字符设备驱动结构
- The product power is greatly improved, and the new Ford Explorer is released
- Linxu [basic instructions]
- DSACTF7月re
- HSETNX KEY_ Name field value usage
- Tree row expression
- 树行表达方式
- Related concepts of multitasking programming
- CM4 development cross compilation tool chain production
猜你喜欢
Extract China map from global.Nc data and calculate regional CO2 value based on acgis
Solve the cookie splitting problem (DP)
Raspberry pie 4B parsing PWM
How to use pycharm to quickly create a flask project
Music says
Anaconda creation environment
Soft raid
Tree row expression
DSACTF7月re
[dynamic link library (DLL) initialization example program failed "problem]
随机推荐
Quick sort template
Maximum exchange [greedy thought & monotonic stack implementation]
New fruit naming (DP is similar to the longest common subsequence)
一碰撞就自燃,谁来关心电池安全?上汽通用有话说
根据openGauss/MogDB的lwtid查看线程堆栈。
Nocturnal simulator settings agent cannot be saved
Using typedef in C language to change the name of data type
How to automatically store email attachments in SharePoint
字符设备驱动结构
What is the variance?
[C language] use function pointers to make a different calculator
Solve the brick stacking problem (DP)
Storage of C language data in memory (1)
83. (cesium home) how the cesium example works
flask_ Mail source code error
C language - question brushing column
[dynamic link library (DLL) initialization example program failed "problem]
File lookup and file permissions
Mysql报错:Specified key was too long; max key length is 767 bytes
[task02: SQL basic query and sorting]