-
-
Save jwchang0206/5193514 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd ~/ | |
mkdir /opt/redis | |
RedisVersion=2.6.11 | |
wget http://redis.googlecode.com/files/redis-$RedisVersion.tar.gz | |
tar -zxvf redis-$RedisVersion.tar.gz | |
cd redis-$RedisVersion | |
make | |
cp ~/redis-$RedisVersion/redis.conf /opt/redis/redis.conf.default | |
cp ~/redis-$RedisVersion/redis.conf /opt/redis/redis.conf | |
cp ~/redis-$RedisVersion/src/redis-benchmark /opt/redis/ | |
cp ~/redis-$RedisVersion/src/redis-cli /opt/redis/ | |
cp ~/redis-$RedisVersion/src/redis-server /opt/redis/ | |
cp ~/redis-$RedisVersion/src/redis-check-aof /opt/redis/ | |
cp ~/redis-$RedisVersion/src/redis-check-dump /opt/redis/ | |
cd /opt | |
wget -O init-deb.sh http://library.linode.com/assets/629-redis-init-deb.sh | |
# edit the file and update it to /opt/redis not /opt/redis/bin | |
mv /opt/init-deb.sh /etc/init.d/redis | |
adduser --system --no-create-home --disabled-login --disabled-password --group redis | |
chmod +x /etc/init.d/redis | |
chown -R redis:redis /opt/redis | |
touch /var/log/redis.log | |
chown redis:redis /var/log/redis.log | |
update-rc.d -f redis defaults | |
/etc/init.d/redis start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment