Home arrow Projects arrow managelogs arrow Installing managelogs

Installing managelogs Print E-mail
User Rating: / 0
PoorBest 
Last Updated: Thursday, 15 July 2010
1. Installing a binary package
2. Installing from sources
     2.1. Prerequisites
     2.2. Building an RPM package
     2.3. Using configure/make
          2.3.1. Download
          2.3.2. Configure
          2.3.3. Compile
          2.3.4. Run self-tests
          2.3.5. Install
          2.3.6. Run
     2.4. Supported architectures

 


1 - Installing a binary package

Several binary packages are available from several sources on the web :

  • I maintain a set of binary packages generated by the OpenSuse Build Service, for various Linux distributions (CentOS, Fedora, Mandriva, RHEL, SLE, OpenSuse).
  • I tried to generate Debian packages via OBS but didn't succed yet. Help needed !
  • Other independant packages repositories like rpmfind.net or rpm.pbone.net also provide binary packages.

Before installing a binary package, you need the following libraries to be present on the host (listed here with some usual package names) :

  • APR (Apache Portable Runtime) library (apr, libapr, libapr1)
  • Zlib library (zlib, zlib1g)
  • Bzip2 library (bzip2-libs, libbz2)

2 - Installing from sources

If you don't find a binary distribution corresponding to your environment, or if you prefer building the software by yourself, you will compile and install it from the sources.

There are two methods to compile the software : via the rpm build system, or through a more 'traditional' configure/make process. We'll start with the prerequisites, common to both methods and, then, detail each process.

2.1 - Prerequisites

Here is a list of software you need to compile managelogs, along with the corresponding package names on Redhat and Debian Linux distributions, and the location where you can get the sources if you need to compile them.

  Linux packages Sources
RedHat Debian
A C compiler (I personaly use and recommend gcc, but any ANSI-compliant C compiler should work) gcc http://gcc.gnu.org
the make utility make http://www.gnu.org/software/make/
the APR library, include files, and the apr configuration script. apr-devel libapr1-dev http://apr.apache.org
the Zlib library and include files zlib-devel zlib1g-dev http://www.zlib.net
the Bzip2 library and include files bzip2-devel libbz2-dev http://www.bzip.org

As far as I know, there is no requirement on the versions of these tools and libraries. I personaly built and tested managelogs with the following versions :

  • APR version 0.9 (distributed with Apache 2.0.x) and 1.3 (distributed with Apache 2.2.x)
  • Zlib version 1.2.3
  • Bzip2 version 1.0.1

2.2 - Building an RPM package

If your system supports the RPM package system, this may be the easiest way to compile and install managelogs. You will also prefer building a binary RPM package if you want to easily deploy managelogs to a set of hosts without having to compile it on each of them.

Here are the steps to follow :

  • Ensure the rpm-build package is installed on your system
  • Download the source RPM package from the Sourceforge download area (this is the file with the '.src.rpm' suffix),
  • cd to the directory where you downloaded the file and run :
        rpmbuild --rebuild managelogs-*.src.rpm
       
    (replace '*' with your version of managelogs)
  • This will build a binary RPM package. By looking in the last lines displayed by the rpmbuild command, you will see a message saying 'Wrote: /usr/src/xxx/RPMS/xxx/managelogs-xxx.xxx.rpm'. This is the place where your resulting binary RPM package lies.
  • You can now install this package with an 'rpm -i' command and/or distribute it on other hosts the same way you would do for any other binary RPM package.
  • If the rpmbuild command failed, there may be a lot of causes. There, you have two choices : either you modify the '.spec' file contained in the source package to fit your environment, or you switch to the 'configure/make' method described below.

2.3 - Using configure/make

This is the 'traditional' way to compile and install.

2.3.1 - Download

Download the source package (the file ending in '.tar.gz') from  the Sourceforge download area and run :
    gunzip <managelogs-xxx.tar.gz | tar xvpf -

2.3.2 - Configure

Then, cd to the managelogs-x.x.x directory you just untared and run './configure'.

This will, by default, configure the software to be installed in /usr/local. If this is not what you want, set the '--prefix=' option. A lot of other options are available, run './configure --help' to list them.

Options specific to managelogs are :

  • --with-apr=<dir> : Find APR in <dir>
  • --with-zlib=<dir> : Find zlib in <dir> (or '--without-zlib' to suppress the zlib compression feature)
  • --with-bz2=<dir> : Find bzip2 in <dir> (or '--without-bz2' to suppress the bzip2 compression feature)

The configure script checks for the needed libraries and include files, and create the Makefiles.

2.3.3 - Compile

Run 'make'

2.3.4 - Run self-tests

Run 'make check'

2.3.5 - Install

Run 'make install'. This will install :

  • the managelogs executable
  • the logmanager.h include file
  • the logmanager library
  • the managelogs.8 man page

2.3.6 - Run

If you just want to run managelogs on this host, without deploying it on other systems, the easiest solution is to keep the library packages you installed to compile it, as they include the runtime pre-requisites.

Of course, the build tree can (and should) be removed after the installation phase, as the runtime never uses it.

2.4 - Supported architectures

managelogs should compile and run on any POSIX-compliant system without modifications. If this is not the case, consider it as a bug and let me know, so that I can fix it.

Windows users: Sorry, no Windows version at the moment but I'm working on it

Mac users : According to Softpedia, managelogs compiles and works without modification on Mac OS X. Unfortunately, I cannot try it by myself as I don't even know anybody owning a Mac. So, if you run managelogs on a Mac, I'd appreciate your feedback.

Comments

Only registered users can write comments.
Please login or register.

Powered by AkoComment!


All site content is (C) François Lauprêtre (wishlist) - Please don't reproduce without permission
Joomla! is Free Software released under the GNU/GPL License. - Original template design: JLM@joomlabox