[Tutorial] Install cache modules on Centos 7
Posted: Sun Apr 19, 2020 2:36 pm
Hi,
I saw a few tutorials on how to install opcache apcu etc on vesta but unfortunately they were outdated.
I did this one with the best of my knowledge, may be a better way to link modules to Vesta but I think this one is accurate and will suport updates as long as we're on php 7.4
Just choose the section you need depending on your module and copy paste on your shell.
This method works for any other module you need, basically install from the remi repo using the php version and then link the ini file and the .so module
I tested with both fcgid and php-fpm and it works.
You may need to restart apache and php-fpm (if you're on nginx) afterwards.
I saw a few tutorials on how to install opcache apcu etc on vesta but unfortunately they were outdated.
I did this one with the best of my knowledge, may be a better way to link modules to Vesta but I think this one is accurate and will suport updates as long as we're on php 7.4
Just choose the section you need depending on your module and copy paste on your shell.
This method works for any other module you need, basically install from the remi repo using the php version and then link the ini file and the .so module
I tested with both fcgid and php-fpm and it works.
You may need to restart apache and php-fpm (if you're on nginx) afterwards.
Code: Select all
#Zend Opcache
yum -y install php74-php-opcache
ln -s /etc/opt/remi/php74/php.d/10-opcache.ini /etc/php.d/10-opcache.ini
ln -s /opt/remi/php74/root/usr/lib64/php/modules/opcache.so /usr/lib64/php/modules/
#IG Binary (redis)
yum -y install php74-php-pecl-igbinary
ln -s /opt/remi/php74/root/usr/lib64/php/modules/igbinary.so /usr/lib64/php/modules/
ln -s /etc/opt/remi/php74/php.d/40-igbinary.ini /etc/php.d/
#PHP APCu
yum -y install php74-php-pecl-apcu
ln -s /etc/opt/remi/php74/php.d/40-apcu.ini /etc/php.d/
ln -s /opt/remi/php74/root/usr/lib64/php/modules/apcu.so /usr/lib64/php/modules/
#REDIS
yum -y install redis
yum -y install php74-php-pecl-redis5
ln -s /opt/remi/php74/root/usr/lib64/php/modules/redis.so /usr/lib64/php/modules
ln -s /etc/opt/remi/php74/php.d/50-redis.ini /etc/php.d/
#MSGPACK (redis)
yum -y install php74-php-pecl-msgpack
ln -s /etc/opt/remi/php74/php.d/40-msgpack.ini /etc/php.d/
ln -s /opt/remi/php74/root/usr/lib64/php/modules/msgpack.so /usr/lib64/php/modules
#BONUS - ImageMagick
yum -y install php74-php-pecl-imagick
ln -s /etc/opt/remi/php74/php.d/40-imagick.ini /etc/php.d/
ln -s /opt/remi/php74/root/usr/lib64/php/modules/imagick.so /usr/lib64/php/modules