Page 1 of 1

[Tutorial] Install cache modules on Centos 7

Posted: Sun Apr 19, 2020 2:36 pm
by guiditoito
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.

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

Re: [Tutorial] Install cache modules on Centos 7

Posted: Tue Jun 16, 2020 2:52 pm
by desarrollo33
Give me this error when do the symbolics links and do php -v

Code: Select all

PHP Warning:  Failed loading Zend extension 'opcache' (tried: /usr/lib64/php/modules/opcache (/usr/lib64/php/modules/opcache: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/opcache.so (/usr/lib64/php/modules/opcache.so: undefined symbol: zend_preload_autoload)) in Unknown on line 0
PHP 7.4.3 (cli) (built: Feb 18 2020 11:53:05) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies

Re: [Tutorial] Install cache modules on Centos 7

Posted: Tue Jun 16, 2020 3:04 pm
by iotheme
desarrollo33 wrote: Tue Jun 16, 2020 2:52 pm Give me this error when do the symbolics links and do php -v

Code: Select all

PHP Warning:  Failed loading Zend extension 'opcache' (tried: /usr/lib64/php/modules/opcache (/usr/lib64/php/modules/opcache: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/opcache.so (/usr/lib64/php/modules/opcache.so: undefined symbol: zend_preload_autoload)) in Unknown on line 0
PHP 7.4.3 (cli) (built: Feb 18 2020 11:53:05) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
Try this:

Code: Select all

yum --enablerepo=remi,remi-php70 install php-opcache
yum --enablerepo=remi,remi-php71 install php-opcache
yum --enablerepo=remi,remi-php72 install php-opcache
yum --enablerepo=remi,remi-php73 install php-opcache
yum --enablerepo=remi,remi-php74 install php-opcache
systemctl restart httpd

Re: [Tutorial] Install cache modules on Centos 7

Posted: Tue Jun 16, 2020 3:37 pm
by desarrollo33
Yea, fix it, many thx

Re: [Tutorial] Install cache modules on Centos 7

Posted: Wed Sep 09, 2020 11:08 pm
by samanthaa
Dude!! That's help a lot! Thanks!!

Re: [Tutorial] Install cache modules on Centos 7

Posted: Thu Sep 10, 2020 4:56 pm
by sewem
i am using PHP cache module here
which i followed this method if anyone need the tutorial
https://www.youtube.com/watch?v=7bXrzWwzgv8 hope this one helps

Sewing Maching Reviews