Last active
August 8, 2018 01:43
-
-
Save pindlebot/52711653c53528e326c3e448bba6abde to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/env bash | |
yum -y update | |
yum -y install gcc make | |
cd /usr/local/src | |
wget http://download.redis.io/releases/redis-3.2.0.tar.gz | |
tar xzf redis-3.2.0.tar.gz | |
rm -f 3.2.0.tar.gz | |
cd redis-3.2.0 | |
make distclean | |
make | |
yum install -y tcl | |
make test | |
mkdir -p /etc/redis /var/lib/redis /var/redis/6379 | |
cp src/redis-server src/redis-cli /usr/local/bin | |
cp redis.conf /etc/redis/6379.conf | |
wget https://raw.githubusercontent.com/saxenap/install-redis-amazon-linux-centos/master/redis-server | |
mv redis-server /etc/init.d | |
chmod 755 /etc/init.d/redis-server | |
chkconfig --add redis-server | |
chkconfig --level 345 redis-server on | |
sed 's/protected-mode yes/protected-mode no/' /etc/redis/6379.conf | |
sed 's/bind 127.0.0.1/# bind 127.0.0.1/' /etc/redis/6379.conf | |
sed 's/daemonize no/daemonize yes/' /etc/redis/6379.conf | |
sed 's#logfile ""#logfile "/var/log/redis_6379.log"#' /etc/redis/6379.conf | |
sed 's#REDIS_CONF_FILE="/etc/redis/redis.conf"#REDIS_CONF_FILE="/etc/redis/6379.conf"#' /etc/init.d/redis-server | |
service iptables save | |
service iptables stop | |
chkconfig iptables off | |
service redis-server start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment