Lately I was looking for an easy to use Subscription Management solution that can easily integrate with our Sugar CRM CE installation. I found an open source initiative named killbill quite interesting. After trying the demo version of the, I decided to install in our lab hosted on AWS. I thought I would document the steps in a blog.

But before I write the steps, I must confess that I am not a Ruby expert. I have resolved some of the issues that I faced by searching google and taking some pointer from one of the killbill key contributors. If there are better ways to do this, please drop me a message. I’ll update the blog.

Here are the steps I followed to install the on AWS Amazon Linux EC2:

Launch EC2 Instance

I am not going to detail the steps involved in launching an AWS EC2 instance. This is not the focus of the blog. However, you may follow the the link ‘Launch an AWS EC2 Instance‘ if need any further instructions in this regard. I will suggest r2.small or m3.medium instance to start with.

KIllbill application tries to open network connection on the local machine. Please verify if you can resolve the name returned by ‘hostname’ to verify.

ping `hostname`

If ping doesn’t resolve the hostname, you need to correct it by editing file /etc/sysconfig/network and adding an entry for the hostname in /etc/hosts.

Install Java

Java 7 is pre-installed on the current version of AWS Amazon Linux AMI. I kept the same version of Java.

Install Ruby

AWS EC2 Amazon Linux does contain Ruby 2.0, however the recommended version is Ruby 2.1+. I used rvm to update Ruby version.

Here are the commands that I ran to install rvm, Ruby, rails and io-consolue

#install rvm
gpg --keyserver hkp:// --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
url -sSL | bash -s stable

#install ruby
rvm install ruby 2.2.2

#install rails
gem install rails

#install io-console
gem install io-console

Some of the commands may take longer time to install as it compiles it on the fly. You can use following commands to verify the ruby, rails etc.

[ec2-user@killbill etc]$ rvm -v
rvm 1.27.0 (latest) by Wayne E. Seguin <>, Michal Papis <> []
[ec2-user@killbill etc]$ ruby -v
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]
[ec2-user@killbill etc]$ rails -v

Install Killbill

Killbill installation is straightforward provided your prerequisites are done correctly. You need to install the killbill plugin manager. You can use kpm to install killbill.

Please follow these commands to install killbill in $HOME/killbill directory:

gem install kpm
mkdir killbill 
cd killbill 
kpm install

Configure MySQL DB

By default killbill uses h2 database. However, you have an option to integrate any other database that supports jdbc. I created an AWS MySQL RDS and configured the same in the killbill.

You will need to create killbill and kaui schema in the rds instance that you created earlier. You can download the KillBill DDL and KAUI DDL, and run the both DDL sqls in the RDS.

Please add following entries in $HOME/killbill/conf/ at the bottom of the file:

# Kill Bill properties
org.killbill.billing.osgi.dao.user= XXX
org.killbill.billing.osgi.dao.password= XXX

# Kaui properties
kaui.db.username= XXX
kaui.db.password= XXX


Kill install provides a script. You can run the same to start the killbill application. You can find the script in $HOME/killbill/bin directory. I looked at $HOME/logs/catalina.out to troubleshoot the start up.

Once killbill is up and running, you may use the Killbill Admin UI to verify the installation. I created tenant, accounts, charges etc to verify the installations. Here is the path you can follow to open KAUI interface:


Written by Prakash Kumar

I am a cloud evangelist, and doing my bit to promote cloud. I have extensive experience in AWS, Rackspace, Openstack public clouds.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s