Trying to Install APCu on Alma Linux 8.9
AnsweredRead through many posts in this forum for a solution that is still eluding me on how to install or enable APCu on my Alma Linux 8.9 server. Most of them are older and related to older versions of php.
So far I've tried the following:
pecl install apcu
sudo apt-get install php7.2-apcu -y
But neither have worked. Get the comand not found message. Reason for trying sudo was because I only need it for one domain that is still using php 7.2. But research shows I should have it for all php versions so tried the pecl install method also.
Checked and pecl is installed.
Server credentials:
AlmaLinux v8.9.0 STANDARD standard
cPanel Version 116.0.11
Apache Version 2.4.58
MySQL Version 8.0.36
Architecture x86_64
Kernel Version 4.18.0-477.27.2.el8_8.x86_64
Any help is greatly appreciated.
-
Hey there! Your second command would not have worked since that command is designed for Ubuntu systems.
Since there are multiple PHP versions available on a cPanel machine, you'll need to specify which pecl version to use with the specific command listed here:
https://support.cpanel.net/hc/en-us/articles/1500007599202-How-To-Install-PECL-yaml
For example, if you wanted to install this for PHP 8.1, you would run the following command:
/opt/cpanel/ea-php81/root/usr/bin/pecl install apcu
Let me know if that helps!
0 -
cPRex, thanks for the reply. So there is no way to install it for the whole server other than install it for every version of php? That seems a little tedious. I'll try it on the domain that the script requires it for now and see how it goes. Thanks again.
0 -
How many versions of PHP are you actually running on the server? At the moment, cPanel only supports PHP v8.1, 8.2 and 8.3 - that's a most 3 installations if you have every current version of PHP installed (I have a few older PHP versions installed on my server for testing purposes, but even then that's only 7 installations needed).
It's not an "installation needed per site/account", but "per PHP version installed on the server".
0 -
Right - at most, it would be changing three characters and running that installer three times if you wanted it for each version, as it's per PHP version and not per-domain.
0 -
Thanks guys. I just misunderstood how it works. I thought I could install it for the whole server in one command not have to install it for each version of php. Appreciate your support.
1 -
You're very welcome!
0
Please sign in to leave a comment.
Comments
6 comments