Skip to content

Instantly share code, notes, and snippets.

@biggyspender
Last active October 14, 2021 15:18
Show Gist options
  • Save biggyspender/84acb5b3cc2c9f29086a2ff384c8bb8b to your computer and use it in GitHub Desktop.
Save biggyspender/84acb5b3cc2c9f29086a2ff384c8bb8b to your computer and use it in GitHub Desktop.
install redis
#!/bin/bash
sudo apt update
sudo apt -y full-upgrade
sudo apt install -y build-essential tcl
curl http://download.redis.io/redis-stable.tar.gz | tar xzvf -
pushd redis-stable
make
make test
popd
sudo mkdir -p /usr/lib/redis
sudo mv redis-stable /usr/lib/redis
pushd /usr/lib/redis/redis-stable
sudo make install
pushd utils
sudo REDIS_PORT=6379 \
REDIS_CONFIG_FILE="/etc/redis/$REDIS_PORT.conf" \
REDIS_LOG_FILE="/var/log/redis_$REDIS_PORT.log" \
REDIS_DATA_DIR="/var/lib/redis/$REDIS_PORT" \
REDIS_EXECUTABLE="/usr/lib/redis/redis-stable/src/redis-server" ./install_server.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment