PinLockRpmPackageWithYum

nicolaw 24th May 2018 at 10:37am
RPM TechnicalNotes YUM

https://www.cyberciti.biz/faq/centos-redhat-fedora-yum-lock-package-version-command/

You can use the yum-versionlock or yum-plugin-versionlock package to lock (or pin if you are familiar with Debian package management terminology) packages at specific versions.

yum -y install yum-versionlock
yum-config-manager --add-repo https://openresty.org/package/amazon/openresty.repo
yum list available openresty --showduplicates
yum list available openresty-opm --showduplicates
yum list available openresty-resty --showduplicates
yum versionlock add openresty-1.13.6.1-1.amzn1.x86_64
yum versionlock add openresty-opm-1.13.6.1-1.amzn1.x86_64
yum versionlock add openresty-resty-1.13.6.1-1.amzn1.x86_64
yum install openresty-1.13.6.1-1.amzn1.x86_64
yum install openresty-opm-1.13.6.1-1.amzn1.x86_64
yum install openresty-resty-1.13.6.1-1.amzn1.x86_64
rpm -qa | grep resty