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.
How To Install Redis
Add EPEL repository, if needed:
yum -y install epel-release
Install Redis with yum
package manager:
yum install redis -y
Now, you will just need to start the Redis service, which will be different for certain versions of Centos:
CentOS 5/6:
service redis start chkconfig redis on
For CentOS 7:
systemctl start redis systemctl enable redis
How To Test Your Redis Installation
Now, you should have Redis installed and running as a service in your system. You can test the installation with the following command:
redis-cli ping
And you will see this response:
PONG
Well done! You now know how to install Redis on your VPS/Dedicated server. If you have any issues, or require a more unique configuration, consider working with the InMotion Hosting managed hosting team:
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.
Before ping to redis-cli, we need to execute this command to start the redis sever : redis-server
Thank you for that information Jigar, your contribution to the community is very much appreciated!