The best VPN 2022

The Best VPS 2022

The Best C# Book

How to find Redis installation directory on Centos 7

If you forget the installation directory of Redis in centos 7, then how to find the Redis installation directory on Centos 7?

When I deployed the website developed with asp.net webform technology to centos 7, I installed Redis on another server, but after a long time I don’t remember the installation directory of Redis, so I will share this post on how I found it.

How to find Redis installation directory on Centos 7
How to find Redis installation directory on Centos 7

Find Redis installation directory on Centos

First, find out the process ID

ps -ef|grep redis

Then find the directory by the process ID, xxxx represents the process ID

ls -l /proc/xxxx/cwd

Find out the Redis configuration file path

Enter the following command to view the Redis status

systemctl status redis

Enter the following command to view the location of the Redis configuration file

cat /usr/lib/systemd/system/redis.service

Some Redis Operation Commands

systemctl start redis #Start redis service
systemctl restart redis #Restart the redis service
systemctl stop redis #Stop redis service
systemctl enable redis #Set boot auto-start
systemctl disable redis #Disable booting

Leave a Comment