Saturday, May 26, 2012

Install Log.io on CentOS

Searching for a simple online log viewer, I found log.io. Documentation has a recipe to install log.io on Ubuntu 11.10 but it doesn't match uniformly for CentOS. Seems like many things are hard-coded. So, I began to hack into it to make it working and I succeeded.

Installation Procedure:
# yum install gcc make openssl-devel git
# mkdir ~/downloads 
# cd downloads 
# wget "http://nodejs.org/dist/v0.6.11/node-v0.6.11.tar.gz" 
# tar -xzvf node-v0.6.11.tar.gz
# cd node-v0.6.11/ 
# ./configure
If it complains about missing libraries or anything else and doesn't succeeds, install the required libraries using Yum.
# make
# make install
# ln -s /usr/local/bin/node /usr/local/bin/nodejs
# wget http://npmjs.org/install.sh
# chmod +x install.sh
# ./install.sh
# PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
# rm -f /usr/bin/npm
# ln -s /usr/local/bin/npm /usr/bin/npm
# useradd -d /home/logio logio
# usermod -G adm logio
# npm config set unsafe-perm true
# npm install -g --prefix=/usr/local git://github.com/NarrativeScience/Log.io.git
# chmod -R 777 /var/log/log.io/

It's done. Now, start the server using:
# log.io server start

The server is now started. Allow access to port 8993 as:
# iptables -A INPUT -p tcp --dport 8993 -j ACCEPT

Hurray!. Head over to http://:8993 and see the power of nodejs.
Similarly, install Log.io on another machine and start the harvester with:
# log.io harvester start
Tested on CentOS 6.

5 comments:

  1. Thanks for this detailed guide!
    This should work on CentOS 5 as well, right?

    ReplyDelete
  2. Actually, it's much more simple...
    Add the EPEL repositories:
    # yum install http://fedora.mirrors.telekom.ro/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

    Install Node.js and NPM Packages:
    # yum install npm nodejs

    That's all...!!!!

    ReplyDelete
    Replies
    1. Thanks. I wrote this article as documentation for installing log.io was based on Ubuntu. So, I did some distro-translation.

      Delete