This repository contains the necessary files to build a RHEL compatible RPM file for easy installation. Its based on the work of mhorbul and contains the pull requests of dcarley and bflad.
The spec and source files are tweaked/optimized, tidied up and updated to reflect the latest logstash version.
The RPM installation integrates logstash as good as possible into the system so that the various files (configuration, lock, log, pid) are found in the places you are used to. Besides that it contains a start/stop script which makes the daemonizing and controlling process alot easier.
Its fast, its easy and takes the manuel wget, mkdir, cp processes away we all despise ;)
The package is mainly used by me. I patched and tested the package to the best of my knowledge. Use at your own risk. If you dont trust me, check the source :)
- logstash 1.1.9
- Installs into system java dir. Mostly
/usr/share/java/logstash
- Configuration can be found in the
/etc/logstash
folder - Start/stop script at
/etc/init.d/logstash
- Run file at
/var/run
- PID file at
/var/lock/subsys
- Creates a logstash user and group
- Tested on Cent OS 6.3
For the rpm creation we will be using rpmdevtools and mock. superuser access is only required for the yum and rpm installation.
- Install the EPEL Repository
- Install rpmdevtools
sudo yum --enablerepo=epel install rpmdevtools
- Install mock
sudo yum --enablerepo=epel install mock
- Change into home directory
cd
- Create the required ~/rpmbuild directory structure
rpmdev-setuptree
- Get the latest version of our RPM package
wget -O logstash-rpm.zip https://github.com/omares/logstash-rpm/archive/master.zip
- Unzip magic!
unzip logstash-rpm.zip
- Copy package information into the rpmbuild folder
cp -rf logstash-rpm-master/* rpmbuild/
- Change into rpmbuild directory
cd rpmbuild
- Download the source (jar) files
spectool -g -R SPECS/logstash.spec
- Build Source rpm
rpmbuild -bs --nodeps SPECS/logstash.spec
- Build final/installable rpm
mock --resultdir RPMS/ SRPMS/logstash-1.1.9-5.el6.src.rpm
- Install
sudo rpm -Uvh RPMS/logstash-1.1.9-5.el6.noarch.rpm
- Enjoy!
Feel free to fork and create pull requests. ;)
Something does not work or is out of date? Fork me! Or create an issue or drop me an email.