Last active
February 21, 2019 01:19
-
-
Save dictvm/025487d8dfb311459fc33a5ad744981d to your computer and use it in GitHub Desktop.
This scripts installs the latest version of redis on a Uberspace 7 account
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
#!/bin/sh | |
# Install | |
REDIS_SOURCE="redis-stable.tar.gz" | |
curl -LO http://download.redis.io/$REDIS_SOURCE | |
tar xvzf $REDIS_SOURCE | |
cd redis-stable | |
make | |
mv src/redis-{server,cli} ~/bin/ | |
# create configuration for redis | |
echo "Creating Redis-configuration" | |
mkdir -p ~/.redis | |
touch /home/$USER/tmp/redis.sock | |
chmod 755 /home/$USER/tmp/redis.sock | |
cat << EOF >> ~/.redis/redis.conf | |
unixsocket /home/$USER/tmp/redis.sock | |
unixsocketperm 770 | |
daemonize yes | |
port 0 | |
EOF | |
cat << EOF >> ~/etc/services.d/redis.ini | |
[program:redis] | |
command=/home/$USER/bin/redis-server | |
autostart=yes | |
autorestart=yes | |
EOF | |
supervisorctl reread | |
supervisorctl update |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment