Koozali.org: home of the SME Server

PHP memcache

Offline beast

  • *
  • 245
  • +0/-0
PHP memcache
« on: April 01, 2024, 10:10:25 AM »
Hi

The page https://wiki.koozali.org/Memcached specify how to install php module memcache but the repo smeserver-extrarepositories-remi does not exist any more. How can I install memcache? Is it located in smeserver-extrarepositories-remi-unsafe? Like to update the page after I get it to work.

NB: May also be possible to use APCu and write a guide about that.

Thank you
/Benny

Offline Jean-Philippe Pialasse

  • *
  • 2,762
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: PHP memcache
« Reply #1 on: April 01, 2024, 01:57:19 PM »
which version of SME Server ?

Offline beast

  • *
  • 245
  • +0/-0
Re: PHP memcache
« Reply #2 on: April 01, 2024, 06:51:27 PM »
which version of SME Server ?

10 with all updates

Offline Jean-Philippe Pialasse

  • *
  • 2,762
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: PHP memcache
« Reply #3 on: April 01, 2024, 07:33:10 PM »
remi-safe works for sme10. only thing is this how to works only for SME 9 contrary to what it states. 

Offline beast

  • *
  • 245
  • +0/-0
Re: PHP memcache
« Reply #4 on: April 01, 2024, 10:54:25 PM »
remi-safe works for sme10. only thing is this how to works only for SME 9 contrary to what it states.

It complain about missing fastlz(x86-64). Where do I find that one?

Error: Package: php73-php-pecl-memcached-3.2.0-1.el7.remi.x86_64 (remi-safe)
           Requires: fastlz(x86-64)
Error: Package: php82-php-pecl-memcached-3.2.0-5.el7.remi.x86_64 (remi-safe)
           Requires: fastlz(x86-64)
Error: Package: php70-php-pecl-memcached-3.2.0-1.el7.remi.x86_64 (remi-safe)
           Requires: fastlz(x86-64)
Error: Package: php71-php-pecl-memcached-3.2.0-1.el7.remi.x86_64 (remi-safe)
           Requires: fastlz(x86-64)
Error: Package: php81-php-pecl-memcached-3.2.0-1.el7.remi.x86_64 (remi-safe)
           Requires: fastlz(x86-64)
Error: Package: php80-php-pecl-memcached-3.2.0-1.el7.remi.x86_64 (remi-safe)
           Requires: fastlz(x86-64)
Error: Package: php74-php-pecl-memcached-3.2.0-1.el7.remi.x86_64 (remi-safe)
           Requires: fastlz(x86-64)
Error: Package: php72-php-pecl-memcached-3.2.0-1.el7.remi.x86_64 (remi-safe)
           Requires: fastlz(x86-64)
Error: Package: php83-php-pecl-memcached-3.2.0-7.el7.remi.x86_64 (remi-safe)
           Requires: fastlz(x86-64)

Offline TerryF

  • grumpy old man
  • *
  • 1,826
  • +6/-0
Re: PHP memcache
« Reply #5 on: April 02, 2024, 02:03:34 AM »
# yum install memcached php*-pecl-memcached --enablerepo=epel

gets it done for me
--
qui scribit bis legit

Offline beast

  • *
  • 245
  • +0/-0
Re: PHP memcache
« Reply #6 on: April 02, 2024, 07:20:23 AM »
# yum install memcached php*-pecl-memcached --enablerepo=epel

gets it done for me

Some command is missing as it return with:
Error getting repository data for epel, repository not found

This one?: https://wiki.koozali.org/Epel#For_SME_10.x
« Last Edit: April 02, 2024, 07:22:39 AM by beast »

Offline TerryF

  • grumpy old man
  • *
  • 1,826
  • +6/-0
Re: PHP memcache
« Reply #7 on: April 02, 2024, 07:50:50 AM »
« Last Edit: April 02, 2024, 07:52:47 AM by TerryF »
--
qui scribit bis legit

Offline beast

  • *
  • 245
  • +0/-0
Re: PHP memcache
« Reply #8 on: April 02, 2024, 08:05:40 AM »
then you need to install the epel repo

https://mirror.canada.pialasse.com/releases/10/smeaddons/x86_64/RPMS/

And how do I do that? Sorry but I only work with the server as a user now and then and I can find many different guides on the net.
The link provided is down.

Offline warren

  • *
  • 293
  • +0/-0
Re: PHP memcache
« Reply #9 on: April 02, 2024, 10:39:33 AM »
And how do I do that? Sorry but I only work with the server as a user now and then and I can find many different guides on the net.
The link provided is down.

https://wiki.koozali.org/Extrarepositories

Code: [Select]
yum  install smeserver-extrarepositories-epel
signal-event yum-modify
config set UnsavedChanges no

Offline beast

  • *
  • 245
  • +0/-0
Re: PHP memcache
« Reply #10 on: April 02, 2024, 11:13:26 AM »
So the complete procedure is something like this (seams to install fine).

yum install smeserver-extrarepositories-remi-safe
yum install smeserver-extrarepositories-epel
signal-event yum-modify
yum install memcached php*-pecl-memcached
config set memcached service status enabled TCPPort 11211 access local
cd /etc/rc.d/rc7.d
ln -s S50memcached /etc/rc.d/init.d/memcached
config set UnsavedChanges no
service memcached start

Offline ReetP

  • *
  • 3,732
  • +5/-0
Re: PHP memcache
« Reply #11 on: April 02, 2024, 05:34:42 PM »
Sorry but I only work with the server as a user now and then and I can find many different guides on the net.

If you are doing this you have become an administrator so you need to work on that.....

Koozali SME is very specific and though based on CentOS7, a lot of generic guides on the interwebs will not work properly. Be very careful.

Quote
So the complete procedure is something like this

You were told:

Quote
only thing is this how to works only for SME 9 contrary to what it states. 

The wiki page specifically states:

Quote
install memcached for SME9 only

So the answer is no, that won't work correctly as it was not designed for systemd.

You will need a config entry to tell Koozali about the service, and a systemd unit file override to start it at the right time.

https://wiki.koozali.org/Building_Your_Contrib#Systemd

https://wiki.koozali.org/SME10_serviceControl

You can probably use the config line

Code: [Select]
config set memcached service status enabled TCPPort 11211 access local
But you will need something like:

Code: [Select]
mkdir -p /usr/lib/systemd/system/memcached.d
nano 50koozali.conf

Paste in the following and save

Code: [Select]
[Install]
WantedBy=sme-server.target

You want a post-upgrade/reboot.

Check it is running with:

Code: [Select]
systemctl status memcached
On my test I did a console-save and then start to get it running.

Then you will have to test with the version of PHP etc etc.

It seems to run on mine but YMMV and I have no experience of it.

I've added that to the wiki but you can update as required.

It looks like there is a rpm for acpu but no idea how it works (beware pecl installs - always try  and use a rpm)

https://rhel.pkgs.org/7/epel-x86_64/php-pecl-apcu-4.0.11-1.el7.x86_64.rpm.html

IIRC you have a rocket chat account so please talk to us there if you want guidance and help doing this.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline beast

  • *
  • 245
  • +0/-0
Re: PHP memcache
« Reply #12 on: April 07, 2024, 07:45:14 AM »
I can confirm that it works fine for me :-)