Install logtail on CentOS

The developer of logtail has not made the repository available via yum for quick installation. Even if you don’t want to access logtail from the command line, it is still used by several other scripts and plugins, such as the Nginx plugins for Munin. The easiest way to do this is to install logcheck, which includes logtail. You can use rpm to handle the install, but you will need to install some dependencies first.

Install Dependencies

Use rpm to install the logtail dependencies in the order below – liblockfile, lockfile-progs, perl-mime-construct, and perl-Proc-WaitState. If you already have one of these packages rpm should let you know when you try to re-install it.

liblockfile

rpm -ivh ftp://ftp.univie.ac.at/systems/linux/fedora/epel/5/i386/liblockfile-1.08-9.el5.i386.rpm
Retrieving ftp://ftp.univie.ac.at/systems/linux/fedora/epel/5/i386/liblockfile-1.08-9.el5.i386.rpm
Preparing...                ########################################### [100%]
   1:liblockfile            ########################################### [100%]

liblockfile was successfully installed.

lockfile-progs

rpm -ivh ftp://ftp.univie.ac.at/systems/linux/fedora/epel/5/i386/lockfile-progs-0.1.15-2.el5.i386.rpm
Retrieving ftp://ftp.univie.ac.at/systems/linux/fedora/epel/5/i386/lockfile-progs-0.1.15-2.el5.i386.rpm
Preparing...                ########################################### [100%]
   1:lockfile-progs         ########################################### [100%]

lockfile-progs was successfully installed.

perl-mime-construct

rpm -ivh ftp://ftp.univie.ac.at/systems/linux/fedora/epel/5/i386/perl-mime-construct-1.11-2.el5.noarch.rpm
Retrieving ftp://ftp.univie.ac.at/systems/linux/fedora/epel/5/i386/perl-mime-construct-1.11-2.el5.noarch.rpm
Preparing...                ########################################### [100%]
	package perl-mime-construct-1.11-2.el5.noarch is already installed

perl-mime-construct was already installed.

perl-Proc-WaitStat

rpm -ivh ftp://ftp.univie.ac.at/systems/linux/fedora/epel/5/i386/perl-Proc-WaitStat-1.00-2.el5.noarch.rpm
Retrieving ftp://ftp.univie.ac.at/systems/linux/fedora/epel/5/i386/perl-Proc-WaitStat-1.00-2.el5.noarch.rpm
Preparing...                ########################################### [100%]
	package perl-Proc-WaitStat-1.00-2.el5.noarch is already installed

perl-Proc-WaitStat was already installed.

Install logcheck

Now we’re ready to install logcheck. Use the following rpm to wrap up the install.

rpm -ivh ftp://ftp.univie.ac.at/systems/linux/fedora/epel/5/i386/logcheck-1.3.13-6.el5.noarch.rpm
Retrieving ftp://ftp.univie.ac.at/systems/linux/fedora/epel/5/i386/logcheck-1.3.13-6.el5.noarch.rpm
Preparing...                ########################################### [100%]
   1:logcheck               ########################################### [100%]

Run logtail

Now that logcheck is installed, you should be able to call logtail from the command line, or other scripts and plugins.

[root@web1 ~]# logtail
No logfile to read. Use -f [LOGFILE].

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *