How to Install Redis on Your VPS/Dedicated Server

You may have already heard about Redis databases. Likewise, you may have noticed that many websites use Redis as an object cache to serve pages faster. In this article, we’ll show you how to install Redis on your VPS or Dedicated server.

In order to install Redis, we will make sure to complete the following steps:

  • Grab the latest stable release
  • Install the source files
  • Test the installation

Once these steps are complete, you will be able to use Redis for your website.

Note that you will require root or sudo access in order to run these commands.

How to Install Redis

In order to prepare for running these commands, make sure that you have logged into your server as the root user.

  1. Log into your server via SSH
  2. Download the latest stable Redis release as a compressed file
  3. Decompress the file
     tar xvzf redis-stable.tar.gz
  4. Change into the uncompressed directory
     cd redis-stable
  5. Run the make command:
  6. Complete the installation with this command:
     make install

    (If not logged in as root add a sudo before this command to make it sudo make install)

The redis install process may take a few minutes.

Once you've completed the installation make sure to run this command to get the server running:


How to Test Your Installation

It may be best advised to check and see if your installation process was successful. All you’ll need to do is run this test command.

 redis-cli ping

And you should see a reply:


Well done! You have now successfully installed Redis. Now you can use the various tools and plugins available on the web to use Redis as a cache.

Christopher Maiorana Content Writer II

Christopher Maiorana joined the InMotion community team in 2015 and regularly dispenses tips and tricks in the Support Center, Community Q&A, and the InMotion Hosting Blog.

More Articles by Christopher

Thoughts on “How to Install Redis on Your VPS/Dedicated Server

  • You need to also include information how to install redis php extension as redis cache is used with conjunction with php or similar programming language.

    • Thanks for your input on the issue. We will review the documentation to make sure that it is added as needed.

Was this article helpful? Let us know!