[HowTo] Install PHP OPCache APC/APCu Memcached and Redis on VestaCP CentOS
[HowTo] Install PHP OPCache APC/APCu Memcached and Redis on VestaCP CentOS
Lets get Started :
First install Remi repo :
CentOS 7
CentOS 6
To install Zend Opcache :
OPcache improves PHP performance by storing precompiled script bytecode in shared memory, thereby removing the need for PHP to load and parse scripts on each request.
After installation you need to restart Apache/php-fpm :
if you’re using Apache (mod_php) :
If you’re using PHP-FPM :
To install APC/APCu :
APC is a free, open, and robust framework for caching and optimizing PHP intermediate code.
After installation you need to restart Apache/php-fpm :
if you’re using Apache (mod_php) :
If you’re using PHP-FPM :
To install Memcached :
Free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.
For PHP 5.xx
For PHP 7.xx
Start memcached Service :
Start the memcached on boot :
Centos 6 :
Centos 7 :
After installation you need to restart Apache/php-fpm :
if you’re using Apache (mod_php) :
If you’re using PHP-FPM :
To install Redis :
Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs and geospatial indexes with radius queries.
Start Redis Service :
Start the Redis on boot :
Centos 6 :
Centos 7 :
After installation you need to restart Apache/php-fpm :
if you’re using Apache (mod_php) :
If you’re using PHP-FPM :
First install Remi repo :
CentOS 7
Code: Select all
wget http://rpms.remirepo.net/enterprise/remi-release-7.rpm
rpm -Uvh remi-release-7.rpm
Code: Select all
wget http://rpms.remirepo.net/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6.rpm
OPcache improves PHP performance by storing precompiled script bytecode in shared memory, thereby removing the need for PHP to load and parse scripts on each request.
Code: Select all
yum install php-opcache
if you’re using Apache (mod_php) :
Code: Select all
service httpd restart
Code: Select all
service php-fpm restart
APC is a free, open, and robust framework for caching and optimizing PHP intermediate code.
Code: Select all
yum install php-pecl-apcu
if you’re using Apache (mod_php) :
Code: Select all
service httpd restart
Code: Select all
service php-fpm restart
Free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.
For PHP 5.xx
Code: Select all
yum install memcached memcached-devel php-pecl-memcache
Code: Select all
yum install memcached memcached-devel php-pecl-memcached
Code: Select all
service memcached start
Centos 6 :
Code: Select all
chkconfig memcached on
Code: Select all
systemctl enable memcached
if you’re using Apache (mod_php) :
Code: Select all
service httpd restart
Code: Select all
service php-fpm restart
Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs and geospatial indexes with radius queries.
Code: Select all
yum install redis php-pecl-redis
Code: Select all
service redis start
Centos 6 :
Code: Select all
chkconfig redis on
Code: Select all
systemctl enable redis
if you’re using Apache (mod_php) :
Code: Select all
service httpd restart
Code: Select all
service php-fpm restart
Re: [HowTo] Install PHP OPCache APC/APCu Memcached and Redis on VestaCP CentOS
my server is CentOS 6
with latest version of VestaCP - Php 7.3...
I got this error when I tried to install opcache. cany anyone help?
error
with latest version of VestaCP - Php 7.3...
I got this error when I tried to install opcache. cany anyone help?
Code: Select all
yum install php-opcache
Code: Select all
[root@host ~]# yum install php-opcache
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: asi-fs-n.contabo.net
Excluding mirror: mirror.nl.leaseweb.net
Excluding mirror: mirror.de.leaseweb.net
* epel: ftp.nluug.nl
* extras: centos.mirror.iphh.net
* remi: remi.schlundtech.de
* remi-php55: remi.schlundtech.de
* remi-php56: remi.schlundtech.de
* remi-safe: remi.schlundtech.de
* remi-test: remi.schlundtech.de
* updates: mirror.plusserver.com
Resolving Dependencies
--> Running transaction check
---> Package php-opcache.x86_64 0:5.6.40-19.el6.remi will be installed
--> Processing Dependency: php-common(x86-64) = 5.6.40-19.el6.remi for package: php-opcache-5.6.40-19.el6.remi.x86_64
--> Finished Dependency Resolution
Error: Package: php-opcache-5.6.40-19.el6.remi.x86_64 (remi-php56)
Requires: php-common(x86-64) = 5.6.40-19.el6.remi
Installed: php-common-7.3.16~RC1-1.el6.remi.x86_64 (@remi-php73-test)
php-common(x86-64) = 7.3.16~RC1-1.el6.remi
Available: php-common-5.3.3-49.el6.x86_64 (base)
php-common(x86-64) = 5.3.3-49.el6
Available: php-common-5.3.3-50.el6_10.x86_64 (updates)
php-common(x86-64) = 5.3.3-50.el6_10
Available: php-common-5.4.45-17.el6.remi.x86_64 (remi)
php-common(x86-64) = 5.4.45-17.el6.remi
Available: php-common-5.4.45-18.el6.remi.x86_64 (remi)
php-common(x86-64) = 5.4.45-18.el6.remi
Available: php-common-5.5.38-11.el6.remi.x86_64 (remi-php55)
php-common(x86-64) = 5.5.38-11.el6.remi
Available: php-common-5.5.38-12.el6.remi.x86_64 (remi-php55)
php-common(x86-64) = 5.5.38-12.el6.remi
Available: php-common-5.6.40-18.el6.remi.x86_64 (remi-php56)
php-common(x86-64) = 5.6.40-18.el6.remi
Available: php-common-5.6.40-19.el6.remi.x86_64 (remi-php56)
php-common(x86-64) = 5.6.40-19.el6.remi
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
Re: [HowTo] Install PHP OPCache APC/APCu Memcached and Redis on VestaCP CentOS
php-opcache:
memcache:
Code: Select all
yum --enablerepo=remi-test install php74-php-opcache
Code: Select all
yum --enablerepo=remi-test install memcached memcached-devel php74-php-pecl-memcache