Ubuntu 18.04 configure Redis single-machine master-slave

  • Install

sudo apt update
sudo apt install redis
  • Test (the following is normal)

walker@Ubuntu:~$ redis-cli
127.0.0.1:6379> ping
PONG
  • Use systemctl to manage redis

# View status
$ systemctl status redis

# start redis
$ systemctl start redis

# restart redis
$ systemctl restart redis

# stop redis
$ systemctl stop redis

# Add the redis service to boot
$ systemctl enable redis

# disable startup
$ systemctl disable redis


*** walker ***


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325319970&siteId=291194637