Friday, October 19, 2012

Couchbase / Memcached - Installation and Configuration on Ubuntu 12.04

Memcached is a general-purpose distributed memory caching system that was originally developed by Danga Interactive for LiveJournal, but is now used by many other sites. It is often used to speed up dynamic database-driven websites by caching data and objects in RAM to reduce the number of times an external data source (such as a database or API) must be read.

There are many flavours, I like the Couchbase install since it provides a nice Web interface for you to see what objects are in which data bucket. This post is just going to provide a simple and basic over view to get you a working memcached setup on Ubuntu 12.04


Installation
Download and install

wget http://packages.couchbase.com/releases/1.8.1/couchbase-server-community_x86_64_1.8.1.deb
sudo dpkg -i couchbase-server-community_x86_64_1.8.1.deb

Afterwards you will see the messages

Unpacking couchbase-server (from couchbase-server-community_x86_64_1.8.1.deb) ...
Setting up couchbase-server (1.8.1) ...
* Started couchbase-server

You have successfully installed Couchbase Server.
Please browse to http://workstation-01:8091/ to configure your server.
Please refer to http://couchbase.com for additional resources.

Please note that you have to update your firewall configuration to
allow connections to the following ports: 11211, 11210, 11209, 4369,
8091 and from 21100 to 21299.

By using this software you agree to the End User License Agreement.
See /opt/couchbase/LICENSE.txt.

Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot


Post Installation
When you have finished installing go to http://{ip address}:8091




Choose either Memcache or Couchbase



When you Authenticate the username is CASE SENSITIVE

Managing the services

Starting Couchbase

(on a workstation of if you aren’t logged in as root)
sudo /etc/init.d/couchbase-server start

Stopping Couchbase

sudo /etc/init.d/couchbase-server stop

3 comments:

Vishnu Nair said...

Hi

Can you tell me how to take the backup and restore of memcached buckets in Couchbase Server??

Using cbbackup we can take the backup of couchbase buckets, but how to take backup of Memcached buckets ??

mr.khool said...

Hello,

Its a help link for installing couchdb. But I am facing problem when trying to connect to the server.
When I ran this command :curl http://127.0.0.1:5984/. It says "curl: (7) couldn't connect to host".. I tried restarting the couch server and checked its status with "sudo /etc/init.d/couchbase-server status".. The couchdb server is running. I have followed exactly same steps mentioned but don't whats going wrong . Pleas help

mr.khool said...

Hello, I thanks for the step by step instructions. I have followed exactly the same steps and the server was installed. But when i ran
"curl http://127.0.0.1:5984/" It says curl: (7) couldn't connect to host
The server is up and running... i have checked the status. Don;t why it is not able to connect. Please help