In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
How to use and update the yum source code of CentOS system? 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.
You should know a lot about CentOS system. CentOS system should be a leader in linux as a server. The binary package used in the CentOS system is rpm, but package dependency resolution is sometimes a problem. Yum is a good thing. The use of yum is somewhat similar to debian's apt, which makes it much easier to install many packages.
This article mainly talks about two points, one is the arrangement of the use of yum, and the other is to find a relatively fast domestic source.
Use of 1.CentOS system yum:
1) Update of CentOS system package
1. 1) check the updatable package: yum check-update
Update all packages: yum update
1. 3) Update the specified package: yum update package_name
1.4) version upgrade: yum upgrade
2) installation and deletion of CentOS system package
2.1) yum install package_name
2.2) yum remove package_name
3) CentOS system package search
Search for specific packages: yum search package_name
Search for packages containing specific filenames: yum provides name
4) CentOS system package list
4.1list all installed or updated packages: yum list
4.2) list the specified package: yum list name
4.3) list updatable packages: yum list updates
4.4) list the installed packages: yum list installed
List the packages that are installed but not included in the repository: yum list extras
2.CentOS system yum source setting
Speed up yum downloads: yum- y install yum-fastestmirror, which is called yum-plugin-fastestmirror on CentOs 4
2.2) yum source file: / etc/yum.repos.d/CentOS-Base.repo
2.3The yum source of CentOS 5 is the website of University of Science and Technology of China.
1. Enter the CentOS system as a root user.
[root@xuxy ~] # cd / etc/yum.repos.d
two。 Backup repo
[root@xuxy yum.repos.d] # mv CentOS-Base.repo CentOS-Base.repo.bak
3. Create a new CentOS-Base.repo file: (take CentOS 5.2 as an example)
[root@xuxy yum.repos.d] # vi CentOS-Base.repo
The contents are as follows (take the yum source of University of Science and Technology of China as an example):
# CentOS-Base.repo # # This file uses a new mirrorlist system developed by Lance Davis for CentOS. # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # # If the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line instead. # # [base] name=CentOS-$releasever-Base # mirrorlist= http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os baseurl= http://centos.ustc.edu.cn/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey= http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5 # released updates [updates] name=CentOS-$releasever-Updates # mirrorlist= http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates baseurl= http://centos.ustc.edu.cn/centos / $releasever/updates/$basearch/ gpgcheck=1 gpgkey= http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5#packages used/produced in the build but not released [addons] name=CentOS-$releasever-Addons # mirrorlist= http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons baseurl= http://centos.ustc.edu.cn/centos/$releasever/addons/$basearch/ gpgcheck=1 gpgkey= http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5#additional packages that May be useful [extras] name=CentOS-$releasever-Extras # mirrorlist= http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras baseurl= http://centos.ustc.edu.cn/centos/$releasever/extras/$basearch/ gpgcheck=1 gpgkey= http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5#additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever-Plus # mirrorlist= http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus baseurl= http://centos.ustc Edu.cn / centos/$releasever/centosplus/$basearch/ gpgcheck=1 enabled=0 gpgkey= http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5 's answers to questions about how to use and update the yum source code for CentOS systems are shared here. I hope the above content can help you to a certain extent, if you still have a lot of doubts to be solved, you can follow the industry information channel to learn 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.