Protect RPM repos with protectbase

Posted by Z3Ro in Linux on Friday, November 20, 2015
When you add new repo's you run the risk of your main repo's being overwritten with faulty stuff that can destabilze your servers to prevent this you can install protectbase. This will prevent those repo's being overwritten by other repo's keeping your main intact. Shh to your server and execute:
yum install yum-plugin-protectbase
Check if /etc/yum/pluginconf.d/protectbase.conf has been set to enabled. Then you have to start editing repo files /etc/yum.repos.d/ and add protect=1 to the ones you want to protect like so:
[base] name=CentOS-$releasever - Base mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 protect=1
Note of caution, every repo where protect is not added will be treated as protected.

This site uses google analytics, if you want to avoid being tracked you can use the following app by Google to hide yourself from all analytics tracking.
I accept the terms and conditions of this service.