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.
sudo apt-get update
sudo apt-get install build-essential
wget http://download.redis.io/releases/redis-stable.tar.gz
tar xzf redis-stable.tar.gz
cd redis-stable
make
make test
make install
Redis comes with a script that enables it to run in the background.
cd utils
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:
Start the Redis server: sudo service redis_6379 start
6379 is the port and will depend on your port option during install.
Stop the Redis server: sudo service redis_6379 stop
6379 is the port and will depend on your port option during install.
Access the Redis CLI: redis-cli