In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is about CentOS and Redhat to lock and unlock the software package version of the method and the use of yum versionlock is how, the editor feels very practical, so share with you to learn, I hope you can get something after reading this article, say no more, follow the editor to have a look.
So how do you lock the package under a specific version? Now let me introduce a method. Use the yum versionlock command to lock the version.
1. Installation
The code is as follows:
# yum install yum-plugin-versionlock.noarch
two。 Add locked package
Example: lock the perl package to the current version
The code is as follows:
# yum versionlock perl
Loaded plugins: fastestmirror, versionlock
Adding versionlock on: 4:perl-5.10.1-127.el6
Versionlock added: 1
3. View lock list
The code is as follows:
# yum versionlock list
Loaded plugins: fastestmirror, versionlock
4:perl-5.10.1-127.el6.*
Versionlock list done
4. Clear single package lock
The code is as follows:
# yum versionlock delete '4:perl-5.10.1-127.el6.room'
Loaded plugins: fastestmirror, versionlock
Deleting versionlock for: 4:perl-5.10.1-127.el6.*
Versionlock deleted: 1
5. Clear all locks
The code is as follows:
# yum versionlock clear
Loaded plugins: fastestmirror, versionlock
Versionlock cleared
6. Example
The code is as follows:
# yum check-update perl
Loaded plugins: fastestmirror, versionlock
Loading mirror speeds from cached hostfile
* base: mirrors.163.com
* epel: mirror01.idc.hinet.net
* extras: mirrors.163.com
* updates: mirrors.163.com
Perl.x86_64 4VR 5.10.1-136.el6 base
Lock the current version of perl
The code is as follows:
# yum versionlock perl
Loaded plugins: fastestmirror, versionlock
Adding versionlock on: 4:perl-5.10.1-127.el6
Versionlock added: 1
Update perl version
The code is as follows:
# yum update perl
Loaded plugins: fastestmirror, versionlock
Loading mirror speeds from cached hostfile
* base: mirrors.163.com
* epel: mirror01.idc.hinet.net
* extras: mirrors.163.com
* updates: mirrors.163.com
Setting up Update Process
No Packages marked for Update
No Packages marked for Update visible lock succeeded.
Unlock perl for update
The code is as follows:
# yum versionlock delete '4:perl-5.10.1-127.el6.room'
Loaded plugins: fastestmirror, versionlock
Deleting versionlock for: 4:perl-5.10.1-127.el6.*
Versionlock deleted: 1
# yum versionlock list
Loaded plugins: fastestmirror, versionlock
0:mysql-server-5.1.73-3.el6mm 5.*
0:mysql-5.1.73-3.el6mm 5.*
Versionlock list done
Update the perl package
The code is as follows:
# yum update-y perl
Updated:
Perl.x86_64 4VR 5.10.1-136.el6
Complete!
Perl version before and after update
The code is as follows:
[root@AY14040211382766189cZ]
# rpm-qa | grep perl
Perl-5.10.1-127.el6.x86_64
[root@AY14040211382766189cZ]
# rpm-qa | grep perl
Perl-5.10.1-136.el6.x86_64
Using this directive, you can avoid mistakenly upgrading the package to the latest version. Especially in the software package in the production environment, the update of the version can have some configuration parameters that are not compatible with the service stop, thus affecting normal access.
These are the methods of locking and unlocking software package versions in CentOS and Redhat, as well as the use of yum versionlock. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
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.