Skip to content

Instantly share code, notes, and snippets.

@fernandoescolar
Created April 27, 2015 07:10
Show Gist options
  • Save fernandoescolar/dabd125a64ac0f958894 to your computer and use it in GitHub Desktop.
Save fernandoescolar/dabd125a64ac0f958894 to your computer and use it in GitHub Desktop.
# execute it as root
# update
apt-get update
apt-get install make gcc tcl
# download redis
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
cd deps
# compile dependencies
make hiredis lua jemalloc linenoise
cd ..
# compile redis
make
# install as a local service
mkdir /etc/redis
mkdir /var/redis
mkdir /var/redis/6379
cd src
cp redis-server /usr/local/bin/
cp redis-cli /usr/local/bin/
cp redis-sentinel /usr/local/bin/
cd ..
cp utils/redis_init_script /etc/init.d/redis_6379
cp redis.conf /etc/redis/6379.conf
cp sentinel.conf /etc/redis/sentinel.conf
# configure
# - set daemonize to yes (by default it is set to no).
# - set the pidfile to /var/run/redis_6379.pid (modify the port if needed).
# - change the port accordingly (6379).
# - set the logfile to /var/log/redis_6379.log
# - set the dir to /var/redis/6379 (very important step!)
nano /etc/redis/6379.conf
# update and start
update-rc.d redis_6379 defaults
/etc/init.d/redis_6379 start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment