Installing Redis 2.4.5 on Ubuntu 10.04 LTS

Redis is an open-source key value store. I visited the interactive tutorial and was intrigued by the features it offers.

Here’s how I installed a local copy for further investigation:

# download and unpack the sources (see http://redis.io/download for the latest stable version)
wget http://redis.googlecode.com/files/redis-2.4.5.tar.gz
tar -zxvf redis-2.4.5.tar.gz

# build
cd redis-2.4.5/
make

# test
# I needed to install tcl8.5 to run the tests: sudo apt-get install tcl8.5
make test

#install
sudo make install
cd utils
sudo ./install_server.sh

# run the redis cli (/usr/local/bin/redis-cli)
redis-cli
Posted in Uncategorized | Comments Off on Installing Redis 2.4.5 on Ubuntu 10.04 LTS

Enabling SSL for Couchdb v1.1

Having installed Couchdb v1.1 I wanted to take advantage of its native support for SSL. I found instructions at couchbase.org and on wiki.apache.org which got me through editing etc/couchdb/local.ini. Uncomment and edit lines in the [daemons] and [ssl] sections to look something like this:

[daemons]
; enable SSL support by uncommenting the following line and supply the PEM's below.
; the default ssl port CouchDB listens on is 6984
httpsd = {couch_httpd, start_link, [https]}

[ssl]
cert_file = /var/lib/couchdb/build-couchdb/build/etc/ssl/couch_cert.pem
key_file = /var/lib/couchdb/build-couchdb/build/etc/ssl/couch_key.pem

The most difficult part proved to be generating the required private key and self-signed certificate. couchbase.org has instructions, but they didn’t work for me. I followed openssl’s keys.txt to generate a non-password-protected private key, and certificates.txt to create a test certificate self-signed using the private key.

openssl genrsa -out couch_key.pem 4096
openssl req -new -x509 -key couch_key.pem -out couch_cert.pem -days 1095

Restart couchdb and test with curl:

sudo /etc/init.d/couchdb-1.1.0 restart
curl -k https://atom:6984/
# expect: {"couchdb":"Welcome","version":"1.1.0"}

The troubleshooting tips on wiki.apache.org were helpful, in particular the suggestion to test using a known good private key and certificate from MochiWeb.

Posted in Uncategorized | Comments Off on Enabling SSL for Couchdb v1.1

Installing Couchdb v1.1 on Ubuntu 10.04 LTS

The repositories for Ubuntu 10.04 LTS only contain packages for Couchdb v1.0. The Couchdb Wiki has instructions for manual installation on Ubuntu, but it also provides a pointer to the build-couchdb project on GitHub.

Using build-couchdb, here’s how I built, installed and ran Couchdb on my Ubuntu 10.04 LTS system:

# remove the old Couchdb (could have just disabled...)
sudo apt-get uninstall couchdb

# get the dependencies required by build-couchdb
sudo apt-get install make gcc zlib1g-dev libssl-dev libreadline5-dev rake

# download and build as couchdb user
sudo su couchdb
cd ~

# clone and prepare build-couchdb
git clone git://github.com/iriscouch/build-couchdb
cd build-couchdb/
git submodule init
git submodule update

# build couchdb
rake/etc/init.d/couchdb-0.11.0

# switch to root to install init script
exit
sudo su

# install init script
cd /etc/init.d
ln -s ~couchdb/build-couchdb/build/etc/init.d/couchdb couchdb-1.1.0
update-rc.d couchdb-1.1.0 defaults

# start couchdb
/etc/init.d/couchdb-1.1.0 start

# back to user mode
exit

# test
curl http://127.0.0.1:5984
# expected output: {"couchdb":"Welcome","version":"1.1.0"}

Drop dead simple – thanks to build-couchdb ๐Ÿ™‚

Posted in Uncategorized | Comments Off on Installing Couchdb v1.1 on Ubuntu 10.04 LTS

Installing RabbitMQ on Ubuntu 10.04 LTS

Following these instructions, hereโ€™s how I installed RabbitMQ on my Ubuntu 10.04 LTS system:

# add the rabbitmq repository to /etc/apt/sources.list 
sudo bash -c 'echo "deb http://www.rabbitmq.com/debian/ testing main" >> /etc/apt/sources.list'

# add rabbitmq's public key so that aptitude will trust the repository
wget http://www.rabbitmq.com/rabbitmq-signing-key-public.asc
sudo apt-key add rabbitmq-signing-key-public.asc

# Update aptitude's list of available packages
sudo apt-get update

# Install rabbitmq ๐Ÿ™‚
sudo apt-get install rabbitmq-server

# enable the rabbit management plugin
sudo rabbitmq-plugins enable rabbitmq_management

# restart rabbit
sudo /etc/init.d/rabbitmq-server restart
Posted in Uncategorized | Comments Off on Installing RabbitMQ on Ubuntu 10.04 LTS

Installing MongoDB 2.0 on Ubuntu 10.04 LTS

10Gen publishes apt-gettable packages for MongoDB that are more up-to-date than those in Debian or Ubuntu.

The details about getting and installing 10gen’s packages are here.

Following those instructions, here’s how I installed MongoDB on my Ubuntu 10.04 LTS system:

# add the mongodb repository to /etc/apt/sources.list
sudo bash -c "echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' >> /etc/apt/sources.list"

# add 10gen's GPG key so that aptitude will trust the repository
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10

# Update aptitude's list of available packages
sudo apt-get update

# Install mongodb
sudo apt-get install mongodb-10gen
Posted in Uncategorized | Comments Off on Installing MongoDB 2.0 on Ubuntu 10.04 LTS