In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to lock the software version in the CentOS system to prevent the upgrade". The explanation in the article is simple and clear and easy to learn and understand. please follow the editor's train of thought to study and learn "how to lock the software version in the CentOS system to prevent the upgrade"!
.
Locking the specified software version in a Yum upgrade prevents it from upgrading as follows:
1. To install versionlock first, type:
The code is as follows:
# yum install yum-versionlock
two。 View / etc/yum/pluginconf.d/versionlock.conf file
The code is as follows:
# vi / etc/yum/pluginconf.d/versionlock.conf
It is displayed as:
The code is as follows:
[main]
Enabled = 1
Locklist = / etc/yum/pluginconf.d/versionlock.list
# Uncomment this to lock out "upgrade via. Obsoletes" etc. (slower)
# follow_obsoletes = 1
Enabled = 0 | 1
Turn versionlock on or off
The code is as follows:
Locklist = / path/to/file
Define the absolute path to the versionlock lock software list file versionlock.list, here / etc/yum/pluginconf.d/versionlock.list
/ etc/yum/pluginconf.d/versionlock.list, the format of the locked file is one package name per line
Make sure you have enabled = 1 in the file, and add it if you don't. After installation, the default enabled is 1, that is, the versionlock plug-in is enabled.
3. Add the name and version of the package that needs to be locked to / etc/yum/pluginconf.d/versionlock.list, one line per line
Suppose we want to lock the version of nagios-plugins and not let yum upgrade it, then copy the following line into versionlock.list
The code is as follows:
Nagios-plugins-1.4.11-1.el5.rf.x86_64
Save versionlock.list after you add it, and try the following command to try to upgrade nagios. Input
The code is as follows:
# yum update nagios-plugins
It will prompt:
The code is as follows:
...
Setting up Update Process
No Packages marked for Update
Skills (tip)
In fact, a better way is to use the pipe command to directly add the name of the package to be locked to versionlock.list. If you lock the ppp upgrade here, type:
The code is as follows:
# rpm-qa | grep ppp > > / etc/yum/pluginconf.d/versionlock.list
Then, check whether the addition is successful or not, and enter:
The code is as follows:
# cat / etc/yum/pluginconf.d/versionlock.list
If the display:
The code is as follows:
Ppp-2.4.4-2.el5
It means that the addition is successful!
Thank you for your reading, the above is the content of "how to lock the software version in the CentOS system to prevent the upgrade". After the study of this article, I believe you have a deeper understanding of how to lock the software version in the CentOS system to prevent the upgrade, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.