Skip to content

Instantly share code, notes, and snippets.

@yamingd
Forked from wookiehangover/redis-install.sh
Last active August 29, 2015 14:07
Show Gist options
  • Save yamingd/88185db7194e2ad9eb6e to your computer and use it in GitHub Desktop.
Save yamingd/88185db7194e2ad9eb6e to your computer and use it in GitHub Desktop.
#!/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