Feb 14

Um die aktuelle PNP Version für Nagios einzusetzen, benötigt man PCRE mit Unicode Unterstützung. Das von Centos gelieferte Paket ist nur mit UTF-8 Unterstützung erstellt. Mit ein paar Handgriffen kann das Paket mit Unicode + UTF-8 kompiliert und erstellt werden.

Zunächst prüfen wir mit welchen Optionen PCRE erstellt wurde.

pcretest -C
PCRE version 6.6 06-Feb-2006
Compiled with
UTF-8 support
No Unicode properties support
Newline character is LF
Internal link size = 2
POSIX malloc threshold = 10
Default match limit = 10000000
Default recursion depth limit = 10000000
Match recursion uses stack

Das rpm-build paket wird benötigt
yum install rpm-build

Die Sourcen von PCRE werden runtergeladen
wget http://mirrors.kernel.org/centos/5.3/os/SRPMS/pcre-6.6-2.el5_1.7.src.rpm

und anschliessend installiert
rpm -ivh pcre-6.6-2.el5_1.7.src.rpm

diverse Verzeichnisse müssen manuell angelegt werden
mkdir -p redhat/BUILD
mkdir redhat/RPMS
mkdir redhat/SRPMS

Nun wird die Unicode-Option in das Spec-File eingetragen, dazu ändert man in
redhat/SPECS/pcre.spec

Die Zeile
%configure --enable-utf8
in
%configure --enable-utf8 --enable-unicode-properties

Anschliessend wird das Paket erstellt
rpmbuild -ba redhat/SPECS/pcre.spec

und zum Schluss installiert
rpm -Uvh redhat/RPMS/i386/pcre-6.6-2.7.i386.rpm

Mit pcretest -C prüft man anschliessend ob der Unicode-Support vorhanden ist.
PCRE version 6.6 06-Feb-2006
Compiled with
UTF-8 support
Unicode properties support
Newline character is LF
Internal link size = 2
POSIX malloc threshold = 10
Default match limit = 10000000
Default recursion depth limit = 10000000
Match recursion uses stack

Post to Twitter Tweet This Post

Related Posts

Leave a Reply

Twitter links powered by Tweet This v1.6.1, a WordPress plugin for Twitter.