-
-
Save CharlyJazz/cab2d92975fabb2749e1b63ed0204c72 to your computer and use it in GitHub Desktop.
redis 2.8.x installation on aws ec2 amazon linux
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 | |
#lost original file so rewrote for future reference, untested | |
#installs latest 2.8.17 | |
#run as root | |
yum install -y gcc gcc-c++ make | |
wget "http://download.redis.io/releases/redis-2.8.17.tar.gz" | |
tar xvfz redis-2.8.17.tar.gz | |
rm -f redis-2.8.17.tar.gz | |
cd redis-2.8.17 | |
make distclean && make | |
mkdir /etc/redis /var/redis | |
cp src/redis-server src/redis-cli /usr/local/bin | |
#edit /etc/redis/redis.conf to your liking | |
#sensible changes below | |
sed -e "s/^daemonize no$/daemonize yes/" -e "s/^# bind 127.0.0.1$/bind 127.0.0.1/" -e "s/^dir \.\//dir \/var\/redis\//" -e "s/^logfile stdout$/logfile \/var\/log\/redis.log/" redis.conf | tee /etc/redis/redis.conf | |
wget "https://raw.githubusercontent.com/saxenap/install-redis-amazon-linux-centos/master/redis-server" -O /etc/init.d/redisd | |
chmod 755 /etc/init.d/redisd | |
chkconfig --add redisd | |
chkconfig --level 345 redisd on | |
service redisd start | |
#do your cleanup now |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment