Skip to content

Instantly share code, notes, and snippets.

@purwandi
Last active August 29, 2015 14:20
Show Gist options
  • Save purwandi/b4a36358228f363bbd3a to your computer and use it in GitHub Desktop.
Save purwandi/b4a36358228f363bbd3a to your computer and use it in GitHub Desktop.
Installing Slanger

Requirement

Install fresh debian and update your package using https://www.dotdeb.org/instructions/

Install redis-server

apt-get install redis-server
sudo apt-get install python g++ make bzip2 libpcre3-dev libssl-dev daemon libgeoip-dev libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev build-essential curl

Instruction

Install some package before installing ruby

apt-get install make sudo 

Installing ruby

cd /tmp/
wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.6.tar.gz
tar xvzf ruby-2.1.6.tar.gz
./configure
make
make install


gem install bundle
gem install slanger

If you're using Ubuntu, you might find this upscript very helpful. The steps below will create an init script that will make slanger run at boot and restart if it fails. Open /etc/init/slanger and add:

start on started networking and runlevel [2345]
stop on runlevel [016]
respawn
script
    LANG=en_US.UTF-8 /usr/local/bin/slanger --app_key KEY --secret SECRET --redis_address redis://REDIS_IP:REDIS_PORT/REDIS_DB
end script

This example assumes you're using rvm and a custom redis configuration

Then, to start / stop the service, just do

service slanger start
service slanger stop
 redis-server &> /dev/null &
  slanger --app_key your_api_key --secret your_secret_key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment