Hello! This is one large command to:
1. Install Redis
2. Change to 4gb memory, allkeys-lru
3. Download, compile and install the Redis 7 PECL PHP Module
4. Start & Enable Redis Server on boot
5. Force reread of Plesk PHP modules
Works on CentOS 7 & Cloudlinux 7
Read, Edit, Run at your own risk!
cd && wget -r --no-parent -A 'epel-release-*.rpm' http://dl.fedoraproject.org/pub/epel/7/x86_64/e/ && rpm -Uvh dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-*.rpm && yum -y install redis && systemctl enable redis.service && sed -i 's/# maxmemory <bytes>/maxmemory 4gb/g' /etc/redis.conf && sed -i 's/# maxmemory-policy noeviction/maxmemory-policy allkeys-lru/g' /etc/redis.conf && systemctl start redis.service && yum -y install make plesk-php56-devel gcc glibc-devel libmemcached-devel zlib-devel plesk-php70-devel git && git clone https://github.com/phpredis/phpredis.git && cd phpredis && git checkout php7 && /opt/plesk/php/7.0/bin/phpize && PATH=/opt/plesk/php/7.0/bin:$PATH ./configure && make && sudo make install && echo "extension=redis.so" > /opt/plesk/php/7.0/etc/php.d/redis.ini && plesk bin php_handler --reread
1. Install Redis
2. Change to 4gb memory, allkeys-lru
3. Download, compile and install the Redis 7 PECL PHP Module
4. Start & Enable Redis Server on boot
5. Force reread of Plesk PHP modules
Works on CentOS 7 & Cloudlinux 7
Read, Edit, Run at your own risk!
cd && wget -r --no-parent -A 'epel-release-*.rpm' http://dl.fedoraproject.org/pub/epel/7/x86_64/e/ && rpm -Uvh dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-*.rpm && yum -y install redis && systemctl enable redis.service && sed -i 's/# maxmemory <bytes>/maxmemory 4gb/g' /etc/redis.conf && sed -i 's/# maxmemory-policy noeviction/maxmemory-policy allkeys-lru/g' /etc/redis.conf && systemctl start redis.service && yum -y install make plesk-php56-devel gcc glibc-devel libmemcached-devel zlib-devel plesk-php70-devel git && git clone https://github.com/phpredis/phpredis.git && cd phpredis && git checkout php7 && /opt/plesk/php/7.0/bin/phpize && PATH=/opt/plesk/php/7.0/bin:$PATH ./configure && make && sudo make install && echo "extension=redis.so" > /opt/plesk/php/7.0/etc/php.d/redis.ini && plesk bin php_handler --reread