Skip to content

Instantly share code, notes, and snippets.

@jonuwz
Last active October 21, 2024 14:41
Show Gist options
  • Save jonuwz/94e508513489595bd98221efcc1ff074 to your computer and use it in GitHub Desktop.
Save jonuwz/94e508513489595bd98221efcc1ff074 to your computer and use it in GitHub Desktop.
On rhel 8
==========
mkdir /build
cd /build
VER="syslog-ng-4.7.1"
export PREFIX="/usr/local/$VER"
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf --enablerepo=codeready-builder-for-rhel-8-x86_64-rpms install -y $(echo "
bison make gcc gcc-c++ flex
cyrus-sasl-devel
glib2-devel
hiredis-devel
java-devel
json-c-devel
libcap-devel
libcurl-devel
libdbi-devel
libesmtp-devel
libmaxminddb-devel
libnet-devel
librabbitmq-devel
librdkafka-devel
libtool
libuuid-devel
libxslt
mongo-c-driver-devel
net-snmp-devel
openssl-devel
paho-c-devel
pcre2-devel
python3.11-devel python3.11-pip python3.11-setuptools
riemann-c-client-devel
systemd-devel
tzdata-java
zlib-devel
")
curl -L -O https://github.com/syslog-ng/syslog-ng/releases/download/$VER/$VER.tar.gz
tar -zxvf $VER.tar.gz
cd $VER
./configure \
--prefix=$PREFIX \
--with-ivykis=internal \
--disable-tcp-wrapper \
--enable-cloud-auth \
--with-python-packages=none \
--with-embedded-crypto \
--enable-ipv6 \
--enable-spoof-source \
--with-linux-caps=auto \
--enable-json \
--enable-ssl \
--enable-pacct \
--enable-smtp \
--enable-shared \
--disable-static \
--enable-dynamic-linking \
--enable-python \
--enable-cpp \
--disable-java-modules \
--with-python=3.11 \
--enable-mqtt \
--enable-afsnmp \
--enable-java \
--enable-geoip2 \
--enable-sql \
--enable-mongodb \
--enable-amqp \
--enable-redis \
--enable-riemann
make -j4
make install
cd /usr/local
tar -zcvf ../$VER.el7.tgz $VER
# On rhel 7
# stripped down version removing all fancy options that require never libraries/compilers than are available in rhel7
# requires libnet as a runtime dependency
yum --enablerepo=rhel-7-server-optional-rpms install -y bison make gcc gcc-c++ flex cyrus-sasl-devel glib2-devel libcap-devel libcurl-devel libnet-devel libtool libuuid-devel libxslt openssl-devel pcre2-devel systemd-devel zlib-devel git
VER="syslog-ng-4.7.1"
export PREFIX="/usr/local/$VER"
# Require json-c newer than available in rhel7
mkdir -p /build
cd /build
git clone -b json-c-0.13.1-20180305 https://github.com/json-c/json-c.git
cd json-c/
./configure --prefix=$PREFIX
make -j4
make install
cd /build
curl -L -O https://github.com/syslog-ng/syslog-ng/releases/download/$VER/$VER.tar.gz
tar -zxvf $VER.tar.gz
cd $VER
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
./configure \
--prefix=$PREFIX \
--with-ivykis=internal \
--disable-tcp-wrapper \
--disable-cloud-auth \
--with-python-packages=none \
--with-embedded-crypto \
--enable-ipv6 \
--enable-spoof-source \
--with-linux-caps=auto \
--enable-json \
--enable-ssl \
--disable-pacct \
--disable-smtp \
--enable-shared \
--disable-static \
--enable-dynamic-linking \
--disable-python \
--enable-cpp \
--disable-java-modules \
--disable-mqtt \
--disable-afsnmp \
--disable-java \
--disable-geoip2 \
--disable-sql \
--disable-mongodb \
--disable-amqp \
--disable-redis \
--disable-riemann
make -j4
make install
cd /usr/local
tar -zcvf ../$VER.el7.tgz $VER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment