Last active
June 11, 2018 09:05
-
-
Save arnaudcourtecuisse/7d2d9273cbd210d240de3ff1bef4074d to your computer and use it in GitHub Desktop.
Redis install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pre-requisites | |
sudo apt-get install build-essential | |
# Install | |
cd /tmp | |
wget http://download.redis.io/releases/redis-stable.tar.gz | |
tar -xzf redis-stable.tar.gz | |
cd redis-stable | |
make | |
sudo make install | |
# Configuration | |
sudo adduser --system --group --no-create-home redis | |
sudo mkdir /etc/redis /var/lib/redis | |
sudo chown redis:redis /var/lib/redis | |
sudo chmod 770 /var/lib/redis | |
sed 's:^supervised .*:supervised systemd: ; s:^dir .*:dir /var/lib/redis:' redis.conf | sudo tee /etc/redis/redis.conf | |
sudo systemctl enable redis.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment