Reese Knowledgebase

How to customize rsyslog RPM for client configuration

View Kristian Reese's profile on LinkedIn


If you like this article, please +1 or Recommend via FB with the provided buttons above:

Article ID: 151
by: Reese K.
Posted: 18 Mar, 2014
Last updated: 20 Mar, 2014
Views: 3394

How to customize rsyslog RPM for client configuration


This article is an extension off How to configure rsyslog 7.4.9 with TLS.  I had over 2000 CentOS 5.6 clients I was looking to install and configure rsyslog.  rsyslog doesn't ship by default with CentOS 5.6, and I wasn't about to manually install and configure each client.  That would have taken far too long, not to mention having to setup new builds/clients in the future.

After manually setting up one client, I had a list of things I wanted to include in the rsyslog RPM:

  1. cleaned up version of the default /etc/rsyslog.conf file
  2. include the rsyslog client X.509 certificates (see How to configure rsyslog 7.4.9 with TLS)
  3. client rsyslog configuration file as an include (/etc/rsyslog.d)

These three objectives will standardize the rsyslog client configuration and ensure that all clients are setup exactly the same, minimizing potential for typos and configuration errors across multiple client manual configurations.

Let's begin.


Setup rpmbuild environment


First, you should NEVER create your packages as the root user.  You do not want to chance overwriting system packages when you're messing around with the source RPMs.  You could damage your system, so the first step is to create a non-privledged user account to use for package prep.  You have been warned.

 


Create non-privledged user account:


My rpm build system is a CentOS 5.6 x86_64 environment.  I decided to call my rpm build user 'rpmpkg':

~# useradd rpmpkg

This will add a new group 'rpmpkg' to which the new user will belong, it will create the home directory, assign a shell, and set appropriate permissions.  Change this users password with the passwd command, and you're done with this step.

 


Install rpm build tools:


In order to rebuild source RPMs, you will require certain tools, namely:

  • rpm-build
  • gcc
  • make
  • redhat-rpm-config

You can query your system using 'rpm -q'  to validate if these packages need to be installed.  For each missing package, use 'yum install' to install them.  You'll of course do this step as the root user, not under the newly created rpmpkg user.  These packages get your started.  Note that you may need certain -devel packages in order to rebuild any source RPM.  The -devel packages contain the library-header files needed to compile code, which is what we're doing when dealing with the source RPM (recompiling to include our customizations), but don't concern yourself with that right now.  I just wanted to mention it as this will come into play later on as we focus specifically on the rsyslog source RPMs.

 


 Create RPM building environment:


1. Login or su to your newly created build user ~# su - rpmpkg
2. Download RPM-build-tree.txt and run it
  1. ~$ wget ftp://ftp.owlriver.com/pub/local/ORC/rpmbuild/RPM-build-tree.txt
  2. ~$ sh ./RPM-build-tree.txt
     As an alternative to step 2, run these commands:
  1. ~$ mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
  2. ~$ echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros

 

You are now ready to begin the process of customizing the rsyslog RPM to include your client configuration specifications!

For more information regarding this directory structure and the process of setting up an RPM build environment, please refer to the two reference links at the bottom of this page.

 


Customize rsyslog RPM


Download and install rsyslog source and -devel packages

At the time I modified the rsyslog src rpm for my client environment, rsyslog 7.4.9 was the stable release.  Therefore, this example will reference this version.

Begin by downloading the following devel packages from rpms.adiscon.com.  You may download them individually and install them as the root user, or download the yum repo config and install the devel packages via yum.  You will need these to build the rsyslog 7.4.9 source:

  • json-c-devel-0.10-2.el5.centos.x86_64
  • libestr-devel-0.1.9-1.el5.centos.x86_64
  • libgt-devel-0.3.11-1.el5.centos.x86_64
  • liblogging-devel-1.0.0-1.el5.centos.x86_64

Next, become the rpmpkg user 'su - rpmpkg'.

Download and install the rsyslog-7.4.9-2.el5.centos.src.rpm as the rpmpkg user.

Note: I have provided these in a zip file as well --> download here.  Just remember to install the devel packages as root and the rsyslog src rpm as the rpmpkg user.

When you install the rsyslog src rpm as the rpmpkg user, its contents will be placed in /home/rpmpkg/rpmbuild.  This will be the directory structure from which we will begin customizing the package to include new configuration files and modification of existing ones.

Screen Sample

Here is a screen of what the above process would look like.  I've purposely left out the installation of the rpm build tools and devel packages since that is straight forward:

[root@rsyslog ~]# useradd rpmpkg
[root@rsyslog ~]# su - rpmpkg
[rpmpkg@rsyslog ~]$ echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros
[rpmpkg@rsyslog ~]$ mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
[rpmpkg@rsyslog ~]$
[rpmpkg@rsyslog ~]$ wget http://rpms.adiscon.com/v7-stable/epel-5/x86_64/RPMS/rsyslog-7.4.9-2.el5.centos.src.rpm
--2014-03-19 12:48:02--  http://rpms.adiscon.com/v7-stable/epel-5/x86_64/RPMS/rsyslog-7.4.9-2.el5.centos.src.rpm
Resolving rpms.adiscon.com... 62.75.145.131
Connecting to rpms.adiscon.com|62.75.145.131|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2918754 (2.8M) [application/x-redhat-package-manager]
Saving to: `rsyslog-7.4.9-2.el5.centos.src.rpm'

100%[========================================================================================================================================>] 2,918,754   1.64M/s   in 1.7s   

2014-03-19 12:48:05 (1.64 MB/s) - `rsyslog-7.4.9-2.el5.centos.src.rpm' saved [2918754/2918754]

[rpmpkg@rsyslog ~]$ ls -al
total 2868
-rw-rw-r-- 1 rpmpkg rpmpkg      32 Mar 19 12:47 .rpmmacros
drwxrwxr-x 7 rpmpkg rpmpkg    4096 Mar 19 12:48 rpmbuild
-rw-rw-r-- 1 rpmpkg rpmpkg 2918754 Jan 22 09:23 rsyslog-7.4.9-2.el5.centos.src.rpm
[rpmpkg@rsyslog ~]$
[rpmpkg@rsyslog ~]$ rpm -ivh rsyslog-7.4.9-2.el5.centos.src.rpm        
warning: rsyslog-7.4.9-2.el5.centos.src.rpm: Header V3 RSA/SHA1 signature: NOKEY, key ID e00b8985
   1:rsyslog                warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
########################################### [100%]
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
[rpmpkg@rsyslog ~]$
[rpmpkg@rsyslog ~]$ ls -lR rpmbuild/
rpmbuild/:
total 20
drwxrwxr-x 2 rpmpkg rpmpkg 4096 Mar 19 12:48 BUILD
drwxrwxr-x 2 rpmpkg rpmpkg 4096 Mar 19 12:48 RPMS
drwxrwxr-x 2 rpmpkg rpmpkg 4096 Mar 19 12:48 SOURCES
drwxrwxr-x 2 rpmpkg rpmpkg 4096 Mar 19 12:48 SPECS
drwxrwxr-x 2 rpmpkg rpmpkg 4096 Mar 19 12:48 SRPMS

rpmbuild/BUILD:
total 0

rpmbuild/RPMS:
total 0

rpmbuild/SOURCES:
total 2884
-rw-rw-r-- 1 rpmpkg rpmpkg 2921782 Jan 22 05:21 rsyslog-7.4.9.tar.gz
-rw-rw-r-- 1 rpmpkg rpmpkg    1950 Jan 22 08:54 rsyslog.init.epel5
-rw-r--r-- 1 rpmpkg rpmpkg     211 Nov 19  2012 rsyslog.log.epel5
-rw-rw-r-- 1 rpmpkg rpmpkg     196 Feb 22  2013 rsyslog.sysconfig
-rw-rw-r-- 1 rpmpkg rpmpkg    3340 Jan 28  2013 rsyslog_v7.conf

rpmbuild/SPECS:
total 32
-rw-rw-r-- 1 rpmpkg rpmpkg 28066 Jan 22 09:17 v7-stable.spec

rpmbuild/SRPMS:
total 0
[rpmpkg@vpsrepo ~]$

Don't worry about those warning messages.  They are harmless.


Package modification and additions

The environment has been prepped and things are ready to be modified.  Remember that I mentioned very early in this article that I had already manually configured one rsyslog client.  This client will serve as the basis for how I want future clients to look like, and the goal is to automate the configuration by modifying the rsyslog package.

First, any files that I added to the manual rsyslog client system that are not part of the original distribution should be added to the SOURCES directory.  In this example, I wish to include:

  1. The client certificates created to allow for secure syslog transmissions between client and server
    • ca.pem
    • rslclient-cert.pem
    • rslclient-key.pem
  2. /etc/rsyslog.conf - a cleaned up version of the rsyslog config file, simply removing the comment clutter
  3. /etc/rsyslog.d/tls.conf - an include file I created containing rsyslog directives/configuration for the client

First, take a look at what came included with the src RPM:

[rpmpkg@rsyslog SOURCES]$ ls -lrth
total 2.9M
-rw-r--r-- 1 rpmpkg rpmpkg  211 Nov 19  2012 rsyslog.log.epel5
-rw-rw-r-- 1 rpmpkg rpmpkg  196 Feb 22  2013 rsyslog.sysconfig
-rw-rw-r-- 1 rpmpkg rpmpkg 2.8M Jan 22 05:21 rsyslog-7.4.9.tar.gz
-rw-rw-r-- 1 rpmpkg rpmpkg 2.0K Jan 22 08:54 rsyslog.init.epel5
-rw-rw-r-- 1 rpmpkg rpmpkg 3.3K Mar 20 14:38 rsyslog_v7.conf

You'll notice that the rsyslog.conf file is named rsyslog_v7.conf from the src package.  That's okay, don't rename it.  This will be illustrated a bit later on. You'll also notice other config files are prefeaced with "rsyslog.".  In keeping with this name schema, the files to be copied will also be prefaced.  After they are copied, the directory structure should now look something like this:

[rpmpkg@rsyslog SOURCES]$ ls -lrth
total 2.9M
-rw-r--r-- 1 rpmpkg rpmpkg  211 Nov 19  2012 rsyslog.log.epel5
-rw-rw-r-- 1 rpmpkg rpmpkg  196 Feb 22  2013 rsyslog.sysconfig
-rw-rw-r-- 1 rpmpkg rpmpkg 2.8M Jan 22 05:21 rsyslog-7.4.9.tar.gz
-rw-rw-r-- 1 rpmpkg rpmpkg 2.0K Jan 22 08:54 rsyslog.init.epel5
-rw------- 1 rpmpkg rpmpkg 1.3K Mar 20 14:37 rsyslog.ca.pem
-rw------- 1 rpmpkg rpmpkg 1.4K Mar 20 14:37 rsyslog.rslclient-cert.pem
-rw------- 1 rpmpkg rpmpkg 1.7K Mar 20 14:37 rsyslog.rslclient-key.pem
-rw-r--r-- 1 rpmpkg rpmpkg  951 Mar 20 14:37 rsyslog.tls

-rw-rw-r-- 1 rpmpkg rpmpkg 3.3K Mar 20 14:38 rsyslog_v7.conf

Now that the files are in place, it's time to edit the spec file.  This file provides the information on how to package up the RPM we wish to build.  See the fedoraproject.org link in the External links section at the end of the article to read more about it.

 


Editing the v7-stable.spec file


There isn't much that needs to be changed here since only a handful of files were added and one was changed.  In all there were 5 total modifications, but since one of the 5 was already part of the package, there are actually 4 total files to consider.

Since we have 4 new source files to add, they will be indicated AFTER the preexisting Source directives.  Again, refer to the fedoraproject.org link below.  Here is a snippet from the page discussing these Source definitions:

Source0: The full URL for the compressed archive containing the (original) pristine source code, as upstream released it. "Source" is synonymous with "Source0". If you give a full URL (and you should), its basename will be used when looking in the SOURCES directory. If possible, embed %{name} and %{version}, so that changes to either will go to the right place. Preserve timestamps when downloading source files. If there is more than one source, name them Source1, Source2 and so on. If you're adding whole new files in addition to the pristine sources, list them as sources after the pristine sources. A copy of each of these sources will be included in any SRPM you create, unless you specifically direct otherwise. See Source URL for more information on special cases (e.g. revision control).

With that said, add the following just below the already defined Source#

Source5: rsyslog.tls
Source6: rsyslog.ca.pem
Source7: rsyslog.rslclient-cert.pem
Source8: rsyslog.rslclient-key.pem

Since I will be using certificates to securely transmit syslog, the rsyslog-gnutls package will be required, and is typically installed apart from rsyslog, but in an effort to minimize effort for client configuration, I've decided that I want rsyslog-gnutls to be installed as a requirement to rsyslog, so I've added the following directive just below "Requires: libgt"

Requires: rsyslog-gnutls

Now scroll to the %install section of the spec file.  Here, we want to tell the spec to install our new source files we just specified.  These directives can be add just after the last install statement:

install -p -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/rsyslog.d/tls.conf
install -p -m 600 %{SOURCE6} $RPM_BUILD_ROOT%{rsyslog_pkidir}/ca.pem
install -p -m 600 %{SOURCE7} $RPM_BUILD_ROOT%{rsyslog_pkidir}/rslclient-cert.pem
install -p -m 600 %{SOURCE8} $RPM_BUILD_ROOT%{rsyslog_pkidir}/rslclient-key.pem

As a side note, I noticed in my test run that rsyslog was not starting itself after it was installed.  Again, going on the notion that I wanted the configuration to be as automated as possible, I added the following as the last statement in the %post section:

service rsyslog start  > /dev/null 2>&1 ||:

Lastly, include the list of files to be installed in the %files section.  If you skip this step, you'll get an error during the rpmbuild process like "error: Installed (but unpackaged) file(s) found":

I added mine just after the last defined %{_libdir}...

%{_sysconfdir}/rsyslog.d/tls.conf
%{rsyslog_pkidir}/ca.pem
%{rsyslog_pkidir}/rslclient-cert.pem
%{rsyslog_pkidir}/rslclient-key.pem

 Now the build is ready for packaging!


Buidling the customized RPM package


[rpmpkg@rsyslog SPECS]$ rpmbuild -bb v7-stable.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.95220
+ umask 022
+ cd /home/rpmpkg/rpmbuild/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /home/rpmpkg/rpmbuild/BUILD
+ rm -rf rsyslog-7.4.9
+ /bin/gzip -dc /home/rpmpkg/rpmbuild/SOURCES/rsyslog-7.4.9.tar.gz
+ tar -xf -
...
...
Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/rsyslog-7.4.9-2-root-rpmpkg
Wrote: /home/rpmpkg/rpmbuild/RPMS/x86_64/rsyslog-7.4.9-2.x86_64.rpm
Wrote: /home/rpmpkg/rpmbuild/RPMS/x86_64/rsyslog-libdbi-7.4.9-2.x86_64.rpm
Wrote: /home/rpmpkg/rpmbuild/RPMS/x86_64/rsyslog-mysql-7.4.9-2.x86_64.rpm
Wrote: /home/rpmpkg/rpmbuild/RPMS/x86_64/rsyslog-pgsql-7.4.9-2.x86_64.rpm
Wrote: /home/rpmpkg/rpmbuild/RPMS/x86_64/rsyslog-gssapi-7.4.9-2.x86_64.rpm
Wrote: /home/rpmpkg/rpmbuild/RPMS/x86_64/rsyslog-relp-7.4.9-2.x86_64.rpm
Wrote: /home/rpmpkg/rpmbuild/RPMS/x86_64/rsyslog-gnutls-7.4.9-2.x86_64.rpm
Wrote: /home/rpmpkg/rpmbuild/RPMS/x86_64/rsyslog-snmp-7.4.9-2.x86_64.rpm
Wrote: /home/rpmpkg/rpmbuild/RPMS/x86_64/rsyslog-udpspoof-7.4.9-2.x86_64.rpm
Wrote: /home/rpmpkg/rpmbuild/RPMS/x86_64/rsyslog-mmjsonparse-7.4.9-2.x86_64.rpm
Wrote: /home/rpmpkg/rpmbuild/RPMS/x86_64/rsyslog-mmnormalize-7.4.9-2.x86_64.rpm
Wrote: /home/rpmpkg/rpmbuild/RPMS/x86_64/rsyslog-mmanon-7.4.9-2.x86_64.rpm
Wrote: /home/rpmpkg/rpmbuild/RPMS/x86_64/rsyslog-ommail-7.4.9-2.x86_64.rpm
Wrote: /home/rpmpkg/rpmbuild/RPMS/x86_64/rsyslog-debuginfo-7.4.9-2.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.12507
+ umask 022
+ cd /home/rpmpkg/rpmbuild/BUILD
+ cd rsyslog-7.4.9
+ rm -rf /var/tmp/rsyslog-7.4.9-2-root-rpmpkg
+ exit 0
[rpmpkg@rsyslog SPECS]$


real    2m8.602s
user    1m2.746s
sys     0m33.525s

whoot

There you have it.  Custom RPM package which now includes your client configuration:

[rpmpkg@rsyslog RPMS]$ pwd
/home/rpmpkg/rpmbuild/RPMS

[rpmpkg@rsyslog RPMS]$ ls -lR
.:
total 4
drwxr-xr-x 2 rpmpkg rpmpkg 4096 Mar 20 15:37 x86_64

./x86_64:
total 3856
-rw-r--r-- 1 rpmpkg rpmpkg  994731 Mar 20 15:37 rsyslog-7.4.9-2.x86_64.rpm
-rw-r--r-- 1 rpmpkg rpmpkg 2581022 Mar 20 15:37 rsyslog-debuginfo-7.4.9-2.x86_64.rpm
-rw-r--r-- 1 rpmpkg rpmpkg   28465 Mar 20 15:37 rsyslog-gnutls-7.4.9-2.x86_64.rpm
-rw-r--r-- 1 rpmpkg rpmpkg   30274 Mar 20 15:37 rsyslog-gssapi-7.4.9-2.x86_64.rpm
-rw-r--r-- 1 rpmpkg rpmpkg   21975 Mar 20 15:37 rsyslog-libdbi-7.4.9-2.x86_64.rpm
-rw-r--r-- 1 rpmpkg rpmpkg   20590 Mar 20 15:37 rsyslog-mmanon-7.4.9-2.x86_64.rpm
-rw-r--r-- 1 rpmpkg rpmpkg   19740 Mar 20 15:37 rsyslog-mmjsonparse-7.4.9-2.x86_64.rpm
-rw-r--r-- 1 rpmpkg rpmpkg   20774 Mar 20 15:37 rsyslog-mmnormalize-7.4.9-2.x86_64.rpm
-rw-r--r-- 1 rpmpkg rpmpkg   22510 Mar 20 15:37 rsyslog-mysql-7.4.9-2.x86_64.rpm
-rw-r--r-- 1 rpmpkg rpmpkg   21766 Mar 20 15:37 rsyslog-ommail-7.4.9-2.x86_64.rpm
-rw-r--r-- 1 rpmpkg rpmpkg   20709 Mar 20 15:37 rsyslog-pgsql-7.4.9-2.x86_64.rpm
-rw-r--r-- 1 rpmpkg rpmpkg   24620 Mar 20 15:37 rsyslog-relp-7.4.9-2.x86_64.rpm
-rw-r--r-- 1 rpmpkg rpmpkg   23121 Mar 20 15:37 rsyslog-snmp-7.4.9-2.x86_64.rpm
-rw-r--r-- 1 rpmpkg rpmpkg   23235 Mar 20 15:37 rsyslog-udpspoof-7.4.9-2.x86_64.rpm
[rpmpkg@rsyslog RPMS]$

If deploying across a mass of clients, I took the approach of creating my own repo, using the same server I used to build the custom RPM.  I simply uploaded the highlighted custom RPMs from above to /var/www/html/rsyslog/ and copied the required dependencies from rpms.adiscon.com.  Next, I issued the command 'createrepo /var/www/html/rsyslog'

[rpmpkg@rsyslog SPECS]$ ls -l /var/www/html/rsyslog/
total 1288
-rw-r--r-- 1 root root  25205 Feb 11 17:23 json-c-0.10-2.el5.centos.x86_64.rpm
-rw-r--r-- 1 root root   8370 Feb 11 17:23 libestr-0.1.9-1.el5.centos.x86_64.rpm
-rw-r--r-- 1 root root  62756 Feb 11 17:23 libgt-0.3.11-1.el5.centos.x86_64.rpm
-rw-r--r-- 1 root root   9578 Feb 11 17:23 liblogging-1.0.0-1.el5.centos.x86_64.rpm
drwxr-xr-x 2 root root   4096 Feb 13 11:41 repodata
-rw-r--r-- 1 root root 994030 Feb 11 17:13 rsyslog-7.4.9-2.x86_64.rpm
-rw-r--r-- 1 root root  28464 Feb 11 17:13 rsyslog-gnutls-7.4.9-2.x86_64.rpm

To automate things further, I created a rsyslog.repo file and stored it in DocumentRoot:

[rpmpkg@rsyslog SPECS]$ cat /var/www/html/rsyslog.repo
[rsyslog_v7]
name=rsyslog_v7
baseurl=http://rsyslog.webserver.com/rsyslog
gpgcheck=0
enabled=1

Now I'm ready to deploy the customized RPM on my clients:

[root@0rslclient ~]# wget -c -O /etc/yum.repos.d/rsyslog.repo http://rsyslog.webserver.com/rsyslog/rsyslog.repo
--16:37:11--  http://rsyslog.webserver.com/rsyslog/rsyslog.repo
Resolving rsyslog.webserver.com... 192.168.1.100
Connecting to vpsrepo.networksolutions.com|192.168.1.100|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 102 [text/plain]
Saving to: `/etc/yum.repos.d/rsyslog.repo'

100%[=========================================================================================================================================>] 102         --.-K/s   in 0s     

16:37:11 (16.2 MB/s) - `/etc/yum.repos.d/rsyslog.repo' saved [102/102]

[root@02ab6ec ~]#
[root@02ab6ec ~]# yum install rsyslog
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
core                      100% |=========================| 1.1 kB    00:00     
rsyslog_v7                100% |=========================|  951 B    00:00     
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for rsyslog to pack into transaction set.
rsyslog-7.4.9-2.x86_64.rp 100% |=========================|  39 kB    00:00     
---> Package rsyslog.x86_64 0:7.4.9-2 set to be updated
--> Running transaction check
--> Processing Dependency: libstdlog.so.0()(64bit) for package: rsyslog
--> Processing Dependency: rsyslog-gnutls for package: rsyslog
--> Processing Dependency: libestr.so.0()(64bit) for package: rsyslog
--> Processing Dependency: libgtbase.so.0()(64bit) for package: rsyslog
--> Processing Dependency: libgthttp.so.0()(64bit) for package: rsyslog
--> Processing Dependency: libjson.so.0()(64bit) for package: rsyslog
--> Processing Dependency: libgt for package: rsyslog
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for liblogging to pack into transaction set.
liblogging-1.0.0-1.el5.ce 100% |=========================| 3.0 kB    00:00     
---> Package liblogging.x86_64 0:1.0.0-1.el5.centos set to be updated
---> Downloading header for json-c to pack into transaction set.
json-c-0.10-2.el5.centos. 100% |=========================| 3.9 kB    00:00     
---> Package json-c.x86_64 0:0.10-2.el5.centos set to be updated
---> Downloading header for rsyslog-gnutls to pack into transaction set.
rsyslog-gnutls-7.4.9-2.x8 100% |=========================|  15 kB    00:00     
---> Package rsyslog-gnutls.x86_64 0:7.4.9-2 set to be updated
---> Downloading header for libgt to pack into transaction set.
libgt-0.3.11-1.el5.centos 100% |=========================| 3.6 kB    00:00     
---> Package libgt.x86_64 0:0.3.11-1.el5.centos set to be updated
---> Downloading header for libestr to pack into transaction set.
libestr-0.1.9-1.el5.cento 100% |=========================| 2.7 kB    00:00     
---> Package libestr.x86_64 0:0.1.9-1.el5.centos set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 rsyslog                 x86_64     7.4.9-2          rsyslog_v7        971 k
Installing for dependencies:
 json-c                  x86_64     0.10-2.el5.centos  rsyslog_v7         25 k
 libestr                 x86_64     0.1.9-1.el5.centos  rsyslog_v7        8.2 k
 libgt                   x86_64     0.3.11-1.el5.centos  rsyslog_v7         61 k
 liblogging              x86_64     1.0.0-1.el5.centos  rsyslog_v7        9.4 k
 rsyslog-gnutls          x86_64     7.4.9-2          rsyslog_v7         28 k

Transaction Summary
=============================================================================
Install      6 Package(s)         
Update       0 Package(s)         
Remove       0 Package(s)         

Total download size: 1.1 M
Is this ok [y/N]: y
Downloading Packages:
(1/6): rsyslog-7.4.9-2.x8 100% |=========================| 971 kB    00:00     
(2/6): liblogging-1.0.0-1 100% |=========================| 9.4 kB    00:00     
(3/6): json-c-0.10-2.el5. 100% |=========================|  25 kB    00:00     
(4/6): rsyslog-gnutls-7.4 100% |=========================|  28 kB    00:00     
(5/6): libgt-0.3.11-1.el5 100% |=========================|  61 kB    00:00     
(6/6): libestr-0.1.9-1.el 100% |=========================| 8.2 kB    00:00     
Running Transaction Test
warning: liblogging-1.0.0-1.el5.centos: Header V3 RSA/SHA1 signature: NOKEY, key ID e00b8985
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing: libestr                      ######################### [1/6]
  Installing: libgt                        ######################### [2/6]
  Installing: json-c                       ######################### [3/6]
  Installing: liblogging                   ######################### [4/6]
  Installing: rsyslog-gnutls               ######################### [5/6]
  Installing: rsyslog                      ######################### [6/6]

Installed: rsyslog.x86_64 0:7.4.9-2
Dependency Installed: json-c.x86_64 0:0.10-2.el5.centos libestr.x86_64 0:0.1.9-1.el5.centos libgt.x86_64 0:0.3.11-1.el5.centos liblogging.x86_64 0:1.0.0-1.el5.centos rsyslog-gnutls.x86_64 0:7.4.9-2
Complete!
[root@rslclient ~]#
[root@rslclient ~]# ps -ef | grep rsyslog
root     23892     1  0 16:37 ?        00:00:00 /sbin/rsyslogd -i /var/run/rsyslogd.pid
root     23939 20248  0 16:37 ttyp0    00:00:00 grep rsyslog
[root@rslclient ~]#
[root@rslclient ~]# ls -l /etc/rsyslog.d/tls.conf
-rw-r--r-- 1 root root 951 Feb  7 16:23 /etc/rsyslog.d/tls.conf
[root@rslclient ~]#
[root@rslclient ~]# ls -l /etc/pki/rsyslog/
total 12
-rw------- 1 root root 1306 Feb  7 17:13 ca.pem
-rw------- 1 root root 1399 Feb  7 16:23 rslclient-cert.pem
-rw------- 1 root root 1675 Feb  7 16:23 rslclient-key.pem

I hope you've enjoyed the article.  If you liked it, or were successful in implementing a solution, I'm interested in hearing your comments or your spin on it.  Also, please take the time to +1 the article at the top of the page, or recommend it on facebook.

Thank you!

This article was:   Helpful | Not Helpful
External links
http://fedoraproject.org/wiki/How_to_create_an_RPM_package
http://wiki.centos.org/HowTos/SetupRpmBuildEnvironment

Prev   Next
How to configure rsyslog 7.4.9 with TLS     Solaris

RSS