Shokouh Dareshiri
Shokouh Dareshiri

Reputation: 936

Redis Server Command Line

I installed Redis server on ubuntu 20.04 with this article step by step. After setting password and other configuration, I run sudo systemctl restart redis.service but changes not be applied. Also, while Redis server was running, I got status with this command sudo systemctl status redis and It said me below message: enter image description here

What's the problem?!

Upvotes: 3

Views: 20012

Answers (1)

Shokouh Dareshiri
Shokouh Dareshiri

Reputation: 936

I searched a lot and found that I should use below commands (using systemctl or service):

  1. with systemctl:
  • sudo systemctl start redis-server.service to start Redis server
  • sudo systemctl status redis-server.service to get status of Redis server
  • sudo systemctl stop redis-server.service to stop Redis server
  • sudo systemctl restart redis-server.service to apply the changes of config file (sudo nano /etc/redis/redis.conf)
  1. with service:
  • sudo service redis-server start to start Redis server

  • sudo service redis-server status to get status

  • active status: enter image description here

  • stop status: enter image description here

  • sudo service redis-server stop to stop Redis server

  • sudo service redis-server restart to apply the changes of config file (sudo nano /etc/redis/redis.conf)

Upvotes: 7

Related Questions