This article is outdated and may not work correctly for current operating systems or software.
Redis is a key-value data storage solution, often referred as to a "NoSQL" database. It can achieve very high read/write speeds because it is an in-memory but persistent on-disk database. In this guide, you will learn how to install Redis on Ubuntu.
Update the apt-get packages: sudo apt-get update
Download a compiler which will help us install Redis: sudo apt-get install build-essential
Download the latest stable release of Redis: wget http://download.redis.io/releases/redis-stable.tar.gz
Untar it: tar xzf redis-stable.tar.gz
Go into the directory: cd redis-stable
Run the "make" command: make
Run the recommended test: make test
Finally, finish by making the install: make install
Redis comes with a script that enables it to run in the background.
Navigate into the "utils" folder: cd utils
Run the script: sudo ./install_server.sh
When the script is launched, it prompts you to choose running options. For the default, just press the enter key. Once the script finishes, the Redis server will be running in the background.
Congratulations! You have successfully setup a working Redis server instance.
Here are some useful commands:
sudo service redis_6379 start
6379 is the port and will depend on your port option during install.
sudo service redis_6379 stop
6379 is the port and will depend on your port option during install.
redis-cli