Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

[HowTo] Install PHP OPCache APC/APCu Memcached and Redis on VestaCP CentOS

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
3 posts • Page 1 of 1
xorro
Posts: 87
Joined: Sun Nov 13, 2016 3:11 pm
Contact:
Contact xorro
Website Skype

Os: CentOS 6x
Web: apache + nginx
[HowTo] Install PHP OPCache APC/APCu Memcached and Redis on VestaCP CentOS
  • Quote

Post by xorro » Tue Sep 11, 2018 7:19 pm

Lets get Started :
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
CentOS 6

Code: Select all

wget http://rpms.remirepo.net/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6.rpm
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.

Code: Select all

yum install php-opcache
After installation you need to restart Apache/php-fpm :

if you’re using Apache (mod_php) :

Code: Select all

service httpd restart
If you’re using PHP-FPM :

Code: Select all

service php-fpm restart
To install APC/APCu :

APC is a free, open, and robust framework for caching and optimizing PHP intermediate code.

Code: Select all

yum install php-pecl-apcu
After installation you need to restart Apache/php-fpm :

if you’re using Apache (mod_php) :

Code: Select all

service httpd restart
If you’re using PHP-FPM :

Code: Select all

service php-fpm restart
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

Code: Select all

yum install memcached memcached-devel php-pecl-memcache
For PHP 7.xx

Code: Select all

yum install memcached memcached-devel php-pecl-memcached
Start memcached Service :

Code: Select all

service memcached start
Start the memcached on boot :
Centos 6 :

Code: Select all

chkconfig memcached on
Centos 7 :

Code: Select all

systemctl enable memcached
After installation you need to restart Apache/php-fpm :

if you’re using Apache (mod_php) :

Code: Select all

service httpd restart
If you’re using PHP-FPM :

Code: Select all

service php-fpm restart
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.

Code: Select all

yum install redis php-pecl-redis
Start Redis Service :

Code: Select all

service redis start
Start the Redis on boot :
Centos 6 :

Code: Select all

chkconfig redis on
Centos 7 :

Code: Select all

systemctl enable redis
After installation you need to restart Apache/php-fpm :

if you’re using Apache (mod_php) :

Code: Select all

service httpd restart
If you’re using PHP-FPM :

Code: Select all

service php-fpm restart
Top

gogoi
Posts: 10
Joined: Tue Dec 01, 2015 3:20 am

Re: [HowTo] Install PHP OPCache APC/APCu Memcached and Redis on VestaCP CentOS
  • Quote

Post by gogoi » Tue Mar 24, 2020 6:30 pm

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?

Code: Select all

 yum install php-opcache
error

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

Top

vihatsoft
Posts: 4
Joined: Thu Aug 09, 2018 4:57 am

Os: CentOS 5x
Web: nginx + php-fpm
Re: [HowTo] Install PHP OPCache APC/APCu Memcached and Redis on VestaCP CentOS
  • Quote

Post by vihatsoft » Sun Jun 07, 2020 10:23 am

php-opcache:

Code: Select all

yum --enablerepo=remi-test install php74-php-opcache
memcache:

Code: Select all

yum --enablerepo=remi-test install memcached memcached-devel php74-php-pecl-memcache
Top


Post Reply
  • Print view

3 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password