Skip to content

Instantly share code, notes, and snippets.

@wookiehangover
Created April 15, 2012 01:38
Show Gist options
  • Save wookiehangover/2389257 to your computer and use it in GitHub Desktop.
Save wookiehangover/2389257 to your computer and use it in GitHub Desktop.
Redis Install Script
#!/bin/bash
# Install Redis
echo 'Install Redis'
cd /tmp
mkdir redis && cd redis
wget http://redis.googlecode.com/files/redis-2.4.10.tar.gz
tar -zxf redis-2.4.10.tar.gz
cd redis-2.4.10
make && make install
wget https://github.com/ijonas/dotfiles/raw/master/etc/init.d/redis-server
wget https://github.com/ijonas/dotfiles/raw/master/etc/redis.conf
mv redis-server /etc/init.d/redis-server
chmod +x /etc/init.d/redis-server
mv redis.conf /etc/redis.conf
useradd redis
mkdir -p /var/lib/redis
mkdir -p /var/log/redis
chown redis.redis /var/lib/redis
chown redis.redis /var/log/redis
update-rc.d redis-server defaults
echo 'Redis install completed. Run "sudo /etc/init.d/redis-server start"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment