Skip to content

Instantly share code, notes, and snippets.

@zicodhkbd
Created November 1, 2019 17:52
Show Gist options
  • Save zicodhkbd/ae74b77fddbab63c0cc6778cc5f4d876 to your computer and use it in GitHub Desktop.
Save zicodhkbd/ae74b77fddbab63c0cc6778cc5f4d876 to your computer and use it in GitHub Desktop.
Redis on Ubuntu 18.04
#!/bin/sh
sudo apt update && sudo apt upgrade -y
sudo apt-get install redis-server -y
sudo vi /etc/redis/redis.conf
:setnu
make line
559 maxmemory 256
and
590 maxmemory-policy allkeys-lru
:wq
sudo systemctl restart redis-server.service
sudo systemctl status redis-server.service
sudo apt-get install php-redis
php -v
redis-cli
127.0.0.1:6379> ping
PONG
127.0.0.1:6379> exit
redis-cli info
redis-cli info stats
redis-cli info server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment