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.
- Update apt-get packages
- Install compiler to build some packages like GCC, make etc.
- Tool Command Language (TCL) is required to run Redis
- 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
- 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
- Now Redis server is running and functioning. Cheers!