Skip to content

Instantly share code, notes, and snippets.

@repeatedly
Created May 23, 2016 02:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save repeatedly/97d4746e83a5ec135abf3eb77f46ff30 to your computer and use it in GitHub Desktop.
Save repeatedly/97d4746e83a5ec135abf3eb77f46ff30 to your computer and use it in GitHub Desktop.
td-agent build on CentOS 5

Build step on CentOS5

Use /home/repeatedly/lib for installation directory. Change the path on your environment.

Setup Ruby

Download openssl, zlib and ruby on host and copy to CentOS5

$ pwd
/home/repeatedly/src
$ ls 
openssl-1.0.1t	openssl-1.0.1t.tar.gz  ruby-2.1.10  ruby-2.1.10.tar.bz2  zlib-1.2.8  zlib-1.2.8.tar.gz

Build openssl

$ ./config shared --prefix=/home/repeatedly/lib
$ make depend
$ make
$ make install

Build zlib

$ ./configure --prefix=/home/repeatedly/lib
$ make
$ make install

Build ruby

$ ./configure --prefix=/home/repeatedly/lib --with-opt-dir=/home/repeatedly/lib --enable-shared
$ make
$ make install

Check OpenSSL version

$ /home/repeatedly/lib/bin/ruby -ropenssl -e'puts OpenSSL::OPENSSL_VERSION'

Setup Omnibus

Install git

$ sudo rpm -ivh http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/5/x86_64/epel-release-5-4.noarch.rpm

Clone repository

$ git clone https://github.com/treasure-data/omnibus-td-agent.git

Build package

Prepare for td-agent build.

$ sudo yum install gcc44 gcc44-c++ # for dep-selector-libgecode
$ sudo yum install fakeroot rpm-build
$ export PATH=/home/repeatedly/lib/bin:$PATH
$ gem install bundler --no-document
$ bundle install --binstubs
$ cp cacert.pem /home/repeatedly/lib/ssl # download latest cacert.pem, e.g. curl's cert.pem.

You can check where cacert.pem is used by $ /home/repeatedly/lib/bin/ruby -ropenssl -e "p OpenSSL::X509::DEFAULT_CERT_FILE"

Start build. Follow README!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment