Dies ist eine alte Version des Dokuments!
mailserver.guru CentOS 7
http://repo.mailserver.guru ist ein Repository, welches von dem mir sehr geschätzten Michael Nausch betrieben wird und eine sichere und verlässliche Quelle für rpm
-Pakete darstellt.
Bevor ein externes Repository auf den Servern/Knoten eingebunden werden, sollte sichergestellt werden, dass keine Pakete aus dem externen Repository, die der eigentlichen CentOS-Repositorys überschreiben.
Dies kann durch die Installation des sogenannten
* Priorities-Plugin für den Paket-Manager yum
erfolgen.
Die Installation des Priorities-Plugin für den Paket-Manager yum
wird durch nachfolgenden Befehl durchgeführt:
<code>
# yum install yum-plugin-priorities
</code>
Der Inhalt des Paketes yum-plugin-priorities
kann mit nachfolgendem Befehl angezeigt werden:
<code>
# rpm -qil yum-plugin-priorities
Name : yum-plugin-priorities
Version : 1.1.31
Release : 25.el7_0
Architecture: noarch
Install Date: Fri 21 Nov 2014 07:14:20 AM CET
Group : System Environment/Base
Size : 29127
License : GPLv2+
Signature : RSA/SHA256, Tue 12 Aug 2014 09:05:21 PM CEST, Key ID 24c6a8a7f4a80eb5
Source RPM : yum-utils-1.1.31-25.el7_0.src.rpm
Build Date : Tue 12 Aug 2014 08:39:15 PM CEST
Build Host : worker1.bsys.centos.org
Relocations : (not relocatable)
Packager : CentOS BuildSystem <http://bugs.centos.org>
Vendor : CentOS
URL : http://yum.baseurl.org/download/yum-utils/
Summary : plugin to give priorities to packages from different repos
Description :
This plugin allows repositories to have different priorities.
Packages in a repository with a lower priority can't be overridden by packages
from a repository with a higher priority even if repo has a later version.
/etc/yum/pluginconf.d/priorities.conf
/usr/lib/yum-plugins/priorities.py
/usr/lib/yum-plugins/priorities.pyc
/usr/lib/yum-plugins/priorities.pyo
/usr/share/doc/yum-plugin-priorities-1.1.31
/usr/share/doc/yum-plugin-priorities-1.1.31/COPYING
</code>
Entscheidend ist nun, im Verzeichnis
* /etc/yum.repos.d/
den dort enthaltenen Repository Konfigurationsdateien, durch Ergänzung nachfolgender Zeile, eine Priorität zuzuweisen (nur relevanter Ausschnitt):
<code>
…
priority=1
…
</code>
Was im Beispiel der Konfigurationsdatei
* /etc/yum.repos.d/Centos-Base-repo
dann wie folgt aussehen könnte:
<code>
# CentOS-Base.repo
#
# 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&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
priority=1
#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
priority=1
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
priority=1
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
priority=1
</code>
HINWEIS - Den eigenen Rpositories aus CentOS sollte eine höhere Priorität, durch Zuweisung einer kleineren Zahl** gegeben werden!
Um http://repo.mailserver.guru auf den Servern/Knoten Nutzen zu können, muss nachfolgende Datei heruntergeladen werden, was mit nachfolgendem Befehl durchgeführt werden kann: