[HowTo] Install PHP OPCache APC/APCu Memcached and Redis on VestaCP CentOS
Posted: Tue Sep 11, 2018 7:19 pm
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