Step by step Redis Installation on Ubuntu

Step by step Redis Installation on Ubuntu 1

What is Redis:

Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs and geospatial indexes with radius queries. The name Redis means REmote DIctionary Server.

Redis supports many languages like ActionScript, C, C++, C#, Chicken Scheme, Clojure, Common Lisp, D, Dart, Erlang, Go, Haskell, Haxe, Io, Java, JavaScript (Node.js), Julia, Lua, Objective-C, OCaml, Perl, PHP, Pure Data, Python, R,  Racket, Ruby, Rust, Scala, Smalltalk and Tcl.

Prerequisite

  • Update apt-get packages

  • Install compiler to build some packages like GCC, make etc.

  • Tool Command Language (TCL) is required to run Redis

 

Installation

  • Now we can download Redis from redis.io and un-package it.

$ wget http://download.redis.io/releases/redis-stable.tar.gz


$ tar xzf redis-stable.tar.gz

  • We can run make and make test command to compile and test the package. ‘make’ command will end as below screen.

  • ‘make test ’ command will run some tests on the package. In my package 46 test case were there. After all the test successfully completed it will appear as below screen.

  • Once test is completed, We can run ‘make install’ to finalize the process.

sudo make install

  • Install the redis server using below script

cd utils

sudo ./install_server.sh

  • Now, Redis server is ready to use.
  • In the above screenshot, we can see that Redis service is registered as ‘redis_6379’. Here, 6379 is port, where Redis runs.
  • Use the below command to start, stop or restart the redis server.

sudo service redis_6379 start

sudo service redis_6379 stop

sudo service redis_6379 restart

  • If, you want to use Redis database, Run

redis-cli

  • Now Redis server is running and functioning. Cheers!
Digvijay Tiwari:

View Comments (5)

  • I see your page needs some fresh posts. Writing manually
    takes a lot of time, but there is tool for this time consuming
    task, search for: Wrastain's tools for content

  • Hello! I just want to supply a enormous thumbs up for the excellent information you’ve here on this post. I am coming back to your blog for much more soon.

  • Good blog! I really love how it is simple on my eyes and the data are well written. I’m wondering how I might be notified when a new post has been made. I have subscribed to your RSS feed which must do the trick! Have a great day!