Skip to main content

Posts

Showing posts from October, 2014

Mass insertion on Redis

You may want to insert a lot of data into Redis. This would be easier to insert a lot data into Redis using Linux commands. Lets say we have a comma separated values in a file.

data.csv:
key1,1200 key2,5000 key35,12345 key12,4500
With following command you can load all the data into Redis. But you should start Redis server first.


You can change data.csv as you want and according to your file.

How to build Redis server on Ubuntu 14.04

Recently we used Redis server on Ubuntu 14.04. And I just thought about writing a blog post to show how to build Redis on Ubuntu server or desktop editions. 
First of all you have to go to Redis site and download the redis source code. Redis site
Copy the download link from redis site. Currently download link looks like this "http://download.redis.io/releases/redis-2.8.17.tar.gz". It may change depending on the version you want to download.

Then connect to the server through SSH or take a terminal on Ubuntu desktop machine. Run below command
wget <URL that you copied from redis site>
Then you want to install build-essential and  libjemalloc-dev in order to build redis server. To install those packages run below command.
sudo apt-get update && sudo apt-get install buid-essential libjemalloc-dev
After installing dependencies and tool you want to extract redis archive. Run below commands to extract it. Change the archive name depending on your download.
tar xvf redi…