Skip to content

Instantly share code, notes, and snippets.

@evgeniidatsiuk
Last active December 24, 2019 14:29
Show Gist options
  • Save evgeniidatsiuk/8218fe466d6f60a94e00fc31d37a4b31 to your computer and use it in GitHub Desktop.
Save evgeniidatsiuk/8218fe466d6f60a94e00fc31d37a4b31 to your computer and use it in GitHub Desktop.
Redis
#https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-redis-on-ubuntu-16-04
#https://www.linode.com/docs/databases/redis/how-to-install-a-redis-server-on-ubuntu-or-debian8/
#https://aws-labs.com/configure-redis-cluster-ubuntu-14-04/
sudo apt-get update
sudo apt-get install build-essential tcl
cd /tmp
curl -O http://download.redis.io/redis-stable.tar.gz
tar xzvf redis-stable.tar.gz
cd redis-stable
make
make test
sudo make install
sudo mkdir /etc/redis
sudo cp /tmp/redis-stable/redis.conf /etc/redis
supervised systemd
dir /var/lib/redis
sudo nano /etc/redis/redis.conf
sudo nano /etc/systemd/system/redis.service
[Unit]
Description=Redis In-Memory Data Store
After=network.target
[Service]
User=redis
Group=redis
ExecStart=/usr/local/bin/redis-server /etc/redis/redis.conf
ExecStop=/usr/local/bin/redis-cli shutdown
Restart=always
[Install]
WantedBy=multi-user.target
sudo adduser --system --group --no-create-home redis
sudo mkdir /var/lib/redis
sudo chown redis:redis /var/lib/redis
sudo chmod 770 /var/lib/redis
sudo systemctl enable redis
vm.overcommit_memory = 1
sudo nano /etc/sysctl.conf
sudo sysctl -p
--------------------------------------------------------------------------------
для чого редіс у якості бази в сідекік - для чого є можливість вказати в якій годині має бути дія - чому не юзати воркер замість того
глянути до всіх можливостей що надає сідекік і роздуплитися
https://habr.com/ru/company/oleg-bunin/blog/316652/
http://oldblog.antirez.com/post/take-advantage-of-redis-adding-it-to-your-stack.html
http://highscalability.com/blog/2011/7/6/11-common-web-use-cases-solved-in-redis.html
https://www.objectrocket.com/blog/how-to/top-5-redis-use-cases/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment