Created
May 21, 2018 08:54
-
-
Save jessuppi/eb9d90f13d11ee340bcfe77af382d3e4 to your computer and use it in GitHub Desktop.
Install Redis
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
## install redis-server ## | |
DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' /usr/bin/apt-get -q --yes -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install redis-server | |
## install php-redis ## | |
DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' /usr/bin/apt-get -q --yes -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install php-redis | |
## delete tmp files ## | |
rm -R -f /tmp/redis-conf.txt /tmp/redis.conf | |
## download latest versions ## | |
cd /tmp/ | |
wget --no-cache http://mirrors.slickstack.io/redis/redis-conf.txt | |
## rename files ## | |
mv redis-conf.txt redis.conf | |
## copy files to destinations ## | |
cp -R -f --no-preserve=mode,ownership /tmp/redis.conf /etc/redis/redis.conf | |
## delete tmp files ## | |
rm -R -f /tmp/redis-conf.txt /tmp/redis.conf | |
## reset permissions ## | |
chown root:root /etc/redis/redis.conf | |
## restart services ## | |
/etc/init.d/redis-server restart | |
/etc/init.d/php7.0-fpm restart | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment