REMI rpm repository providing the latest versions of the PHP stack, full featured, and some other software, to the Fedora and Enterprise Linux RHEL, CentOS, Oracle, Scientific Linux users. It mainly contains (nearly) vanilla versions. Command to install the Remi repository configuration package:

yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm

To install latest redis, memcached and php extensions:

yum --enablerepo=remi, remi-php70 -y install redis memcached php-pecl-redis php-pecl-memcache php-pecl-lzf

Configure multiple redis instances on port 6379 and 6380:

systemctl disable redis

for REDISPORT in 6379 6380
do
mkdir -p /var/lib/redis-${REDISPORT}
chmod 755 /var/lib/redis-${REDISPORT}
chown redis /var/lib/redis-${REDISPORT}
\cp -rf /etc/redis.conf /etc/redis-${REDISPORT}.conf
\cp -rf /usr/lib/systemd/system/redis.service /usr/lib/systemd/system/redis-${REDISPORT}.service

sed -i "s/daemonize no/daemonize yes/"  /etc/redis-${REDISPORT}.conf
sed -i "s/^bind 127.0.0.1.*/bind 127.0.0.1/"  /etc/redis-${REDISPORT}.conf
sed -i "s/^dir.*/dir \/var\/lib\/redis-${REDISPORT}\//"  /etc/redis-${REDISPORT}.conf
sed -i "s/^logfile.*/logfile \/var\/log\/redis\/redis-${REDISPORT}.log/"  /etc/redis-${REDISPORT}.conf
sed -i "s/^pidfile.*/pidfile \/var\/run\/redis\/redis-${REDISPORT}.pid/"  /etc/redis-${REDISPORT}.conf
sed -i "s/^port.*/port ${REDISPORT}/" /etc/redis-${REDISPORT}.conf
sed -i "s/redis.conf/redis-${REDISPORT}.conf/" /usr/lib/systemd/system/redis-${REDISPORT}.service
done

mv /usr/lib/systemd/system/redis.service /usr/lib/systemd/system/redis.service.OFF

systemctl daemon-reload
systemctl enable redis-6379
systemctl enable redis-6380

Configure Memcached to use localhost and more memory:

cat > /etc/sysconfig/memcached <<END
PORT="11211"
USER="memcached"
MAXCONN="5024"
CACHESIZE="128"
OPTIONS="-l 127.0.0.1"
END

Configure Magento 2 cache and session storage backends using app/etc/env.php
Open app/etc/env.php in a text editor.
Locate the following:

'session' =>
    array (
    'save' => 'files',
),

Change it as follows:

'session' => 
          array (
            'save' => 'memcache',
            'save_path' => 'tcp://127.0.0.1:11211?persistent=1&weight=2&timeout=10&retry_interval=10'
           ),
'cache' =>
        array (
            'frontend' => array(
                'default' => array(
                    'backend' => 'Cm_Cache_Backend_Redis',
                    'backend_options' => array(
                        'server' => '127.0.0.1',
                        'port' => '6379',
                        'persistent' => '',
                        'database' => '0',
                        'password' => '',
                        'force_standalone' => '0',
                        'connect_retries' => '1',
                        'read_timeout' => '10',
                        'automatic_cleaning_factor' => '0',
                        'compress_data' => '1',
                        'compress_tags' => '1',
                        'compress_threshold' => '20480',
                        'compression_lib' => 'lzf',
                        'use_lua' => '0'
                    )
                ),
                'page_cache' => array(
                    'backend' => 'Cm_Cache_Backend_Redis',
                    'backend_options' => array(
                        'server' => '127.0.0.1',
                        'port' => '6380',
                        'persistent' => '',
                        'database' => '0',
                        'password' => '',
                        'force_standalone' => '0',
                        'connect_retries' => '1',
                        'lifetimelimit' => '57600',
                        'compress_data' => '0'
                    )
                )
            )
        ),

Test your redis connection and stored information:

for port in 6379, 6380; do echo info | redis-cli -p ${port} | tail -1; done