Skip to content

Instantly share code, notes, and snippets.

@dictvm
Last active February 21, 2019 01:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dictvm/025487d8dfb311459fc33a5ad744981d to your computer and use it in GitHub Desktop.
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
#!/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