Skip to content

Instantly share code, notes, and snippets.

@artofhuman
Created December 5, 2012 04:39
Show Gist options
  • Save artofhuman/4212276 to your computer and use it in GitHub Desktop.
Save artofhuman/4212276 to your computer and use it in GitHub Desktop.
isntall-redis
#!/bin/bash
# Install Redis
echo 'Install Redis'
cd /tmp
mkdir redis && cd redis
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
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