Skip to content

Latest commit

 

History

History
109 lines (81 loc) · 3.71 KB

building_rsyslog_from_source.md

File metadata and controls

109 lines (81 loc) · 3.71 KB

Building rsyslog from source

Build rsyslog from source with maximum debug options enabled in order to aid in testing

Install required packages

Ubuntu 16.04

  1. sudo apt-get update
  2. sudo apt-get -y install autoconf automake bison build-essential flex git-core libdbi-dev libgcrypt11-dev libgcrypt20-dev libcurl4-gnutls-dev libglib2.0-dev libgnutls-dev libgrok-dev libgrok1 libhiredis-dev libmongo-client-dev libmysqlclient-dev libnet1-dev libpcre3-dev libpq-dev librdkafka-dev libsystemd-dev libtokyocabinet-dev libtool pkg-config postgresql-client python-docutils uuid-dev valgrind zlib1g-dev

CentOS 7

  1. sudo yum install -y autoconf automake bison flex git-core gnutls-devel libcurl-devel libgcrypt-devel libtool libuuid-devel pcre-devel pkgconfig python-docutils systemd-devel valgrind zlib-devel

Note: This list is incomplete and will need to be fleshed out further.

Build dependencies

Prune old downloads

Note: An alternate approach here is to checkout to clone the repos to a semi-permament location and then run cd /path/to/repo; git clean -f -x to clear out old build content

  1. cd /tmp
  2. rm -rf libfastjson libestr liblogging liblognorm librelp rsyslog

libfastjson

  1. cd /tmp
  2. git clone https://github.com/rsyslog/libfastjson
  3. cd libfastjson/
  4. sh autogen.sh CFLAGS="-g"
  5. ./configure CFLAGS="-g"
  6. make
  7. sudo make install

libestr

  1. cd /tmp
  2. git clone https://github.com/rsyslog/libestr
  3. cd libestr/
  4. autoreconf -vfi
  5. ./configure CFLAGS="-g" --enable-debug
  6. make
  7. sudo make install

liglogging

  1. cd /tmp
  2. git clone https://github.com/rsyslog/liblogging
  3. cd liblogging
  4. autoreconf -vfi
  5. ./configure CFLAGS="-g" --disable-man-pages
  6. make
  7. sudo make install

liblognorm

  1. cd /tmp
  2. git clone https://github.com/rsyslog/liblognorm
  3. cd liblognorm
  4. autoreconf -vfi
  5. ./configure CFLAGS="-g" --disable-testbench --enable-valgrind --enable-tools --enable-debug --enable-regexp
  6. make
  7. sudo make install

librelp

  1. cd /tmp
  2. git clone https://github.com/rsyslog/librelp
  3. cd librelp
  4. autoreconf -vfi
  5. ./configure CFLAGS="-g" --enable-debug
  6. make
  7. sudo make install

Build rsyslog

  1. cd /tmp
  2. git clone https://github.com/rsyslog/rsyslog
  3. cd rsyslog
  4. sh autogen.sh CFLAGS="-g"
  5. ./configure CFLAGS="-g" --disable-generate-man-pages --enable-liblogging-stdlog --enable-imfile --enable-imptcp --enable-impstats --enable-pmnormalize --enable-omuxsock --enable-mmjsonparse --enable-mail --enable-mmrm1stspace --enable-relp --enable-usertools --enable-imjournal --enable-valgrind
  6. make

Install rsyslog

  1. sudo make install
  2. sudo ldconfig
  3. systemctl --no-reload preset rsyslog
  4. systemctl daemon-reload
  5. systemctl restart rsyslog
  6. systemctl status rsyslog

References