CentOS, PHP & Nextcloud: the version dilemma

Hi,

I’m currently experimenting with Nextcloud on a sandbox CentOS 7 server. I’ve been using OwnCloud for the last two years for my own purposes on a Slackware server, and I’m quite happy with it.

In my humble opinion, every admin who wants to host Nextcloud on a RHEL/CentOS server is confronted with a version dilemma.

  1. CentOS 7 sports PHP 5.4, which has been officially EOL for quite some time, but Red Hat will provide security update backports until 2024. Which is fine.

  2. Currently supported versions of Nextcloud (namely the 11.x and 12.x branch) require a minimum of PHP 5.6. Which seems reasonable. But if I pull in PHP 5.6 from Webtatic, for example, I only get the “official” PHP support, which will end in 2018 for the 5.6 branch. And no security backports.

  3. The solution would be to go with Nextcloud 10, which only requires PHP 5.4, and which is also provided in package form by EPEL. ‘yum info nextcloud’ shows that the current EPEL version is 10.0.4… but a peek on the Nextcloud homepage shows me that this version is officially unsupported. Uh oh.

  4. Some of the stuff I’m hosting on my CentOS 7 server (like CMSMS) is not compatible with PHP 7.x versions.

So right now I don’t see a solution for this. As far as I can see, the “least evil” solution would be to pull in PHP 5.6 from Webtatic and go for Nextcloud 11.x, and have an EOL for both around next summer.

I’d be curious if some of you are familiar with this sort of dilemma (I guess so) and how you manage it.

Cheers,

Niki Kovacs

One solution would be to install an up to date version of PHP7, see what works and containerize (via LXC/LXD for example) what doesn’t.

That way you keep the up to date stuff directly on the host and keep anything outdated on unprivileged LXC containers, which even gives you some security against having your (out)dated servers hacked.

Or just containerize everything if you’re already going through the trouble of setting it up.

I agree with @C0rn3j You should upgrade to PHP 7.1. If you already have CMS served on your server that require PHP 5.4, why do you complain about NextCloud that is perfectly fine if you install it on PHP 7.1? I think you should get rid of your old CMS sites and migrate them to newer versions first. Also I assume you use an old version of MariaDB then too. You should also upgrade that to the latest official MySQL repository (5.7) Please deny me if you are already using it.

A workaround would be to run NextCloud in a docker. This worked fine for me, altho I do prefer the locally installed NexTcloud but in your situation this could be the easiest solution.

You can get extended support from Nextcloud up to 10 years:
https://nextcloud.com/pricing/

Or you need to work around.

Given the responses, there seems to be a general lack of familiarity with terms like “enterprise Linux” and “long term support”. Don’t you think it’s an inconsistency right from the start if Nextcloud officially recommends RHEL/CentOS 7 while at the same time offering no compatibility with its base PHP component?

If I was a Nextcloud developer, the first thing I would do would be to release an LTS release that’s fully compatible with RHEL/CentOS 7, e. g. PHP 5.4, and then offer maintenance releases with security fixes & bugfixes until RHEL/CentOS 7 are EOL, around June 2024.

If you want to know more about enterprise Linux, check out the beginning chapter of “The Definitive Guide to CentOS” (Apress) or my own “Débuter avec Linux” (https://www.microlinux.fr/wp-content/uploads/2017/04/debuter-avec-linux-chap01.pdf).

Cheers.

It is possible but only for paying enterprise customers. It’s quite some work to keep all the versions backward-compatible.

For private users, you probably get better performances and better compatibility with other distributions using more recent packages (using the default system).

Use the Remi Repo: https://rpms.remirepo.net/ it provides the latest php for centos (and is maintained by the redhat php guy).

And dscard any software thats not php7 compatible.

@kikinovak I think we are all familiar with these terms, but you must understand that PHP and CentOS developers do not work together. If PHP releases a stable version of PHP, that won’t always appear in CentOS base repository. Simply because not everybody uses CentOS as web server. Many uses it as a KVM or Xen server. Or just sharing network folders, administrating LDAP server. Or just plain firewall. The CentOS developers can’t always implement the latest stable version of every package that releases a new stable version. It was a flaw, I agree that in CentOS 7.4, that was released the recent days, didn’t receive the latest PHP 7.1 version, I’ve mentioned this to the Dev. Team. But the Enterprise Linux doesn’t mean you can ignore other applications EOLs.

@kikinovak
DO NOT US webtatic repo (https://wiki.centos.org/AdditionalResources/Repositories)
Use the only one – remi repo :slight_smile:
You can install from there many multi php versions to use with different web apps – https://rpms.remirepo.net/wizard/

BTW: CentOS 7.4 / php 7.1.9 (from remi) / Redis 4.0.1 (from remi) / BTRFS with kernel 4.12 (from elrepo) @VMWARE works like a charm with Nextcloud 12.0.2

1 Like

If I remember correctly, when the Nextcloud developers went away from Owncloud, they stressed the fact that there would be no difference between the enterprise version and the community version. Well, so much for that. Security fixes only for paying customers.

Could you point to any source that says that enterprise gets proprietary security fixes?

i kinda felt that this discussion would go into this direction sooner or later. well as it turns out it went there sooner… :man_facepalming:

See the message above by forum moderator “tflidd”:

It is possible but only for paying enterprise customers. It’s quite some work to keep all the versions backward-compatible.

I’m sorry, I didn’t mean to offend anyone or start a flamewar. I’m new to the Nextcloud forum. As for my technical problem, I guess I’ll just opt for the lesser evil, install PHP 5.6 from a third-party repo and then see next summer where things will go.

Cheers,

Niki

It is not about security fixes!
It is about preparing environment!

1 Like

In keeping on topic…

I did successfully install the most recent version of Nextcloud on Cent OS 7 with PHP 7.2.

I don’t mean to advertise but an alternative to your PHP compatibility issue is to find something along the lines of what cPanel uses. cPanel/WHM has a feature called MultiPHP that allows simultaneous installations and uses of different PHP versions. For example, previously my installation comprised of 5.4, 5.6, and 7.2, though now I am only using 7.2.

Just some food for thought, there are ways around it.

Compared to ownCloud, Seafile and others, you get exactly the same functions in the open source version without subscription or any limitations (not sure if they offer an option to support a version for 10 years at all). As far as I understand, the extended support is only done on request. I don’t know if this is a real limitation for private customers if you run Nextcloud in a dedicated environment with up to date software (which will be much faster as well). Even large enterprise users already use NC > 10.

Hello @kikinovak.

Wondering why this topic is creating such tensions. :slight_smile:
From my point of view, you have to Options.

Make use of REMI Repository as some Reader mentioned before.
https://rpms.remirepo.net/enterprise/7/

The other Option I have chosen was using SuSE Leap 42.x
The current SuSE Leap Distributions have the advantage that they are backed from SuSE Linux Enterprise Team. Same Code same Packages. Only the Lifetime Cycle differs, Leap is supported 18 Months then you have to migrate to the next Leap Release.

Its a compromise, but a compromise I can live with comfortably.

As someone who uses RHEL/CentOS7 too, I dont expect that we will see any PHP7 Version in CentOS7. This will only happen if RHEL7 ships PHP7 and to be honest I don’t expect PHP7 in CentOS before RHEL8 will be shipped, possibly in the end of 2018 or the beginning of 2019.

Hi, @BerndH ! My home mini-server (on Apollo Lake CPU) is on openSUSE Tumbleweed, and NextCloud is working just excellent! First I tried Fedora Server on my three mini-servers but every time there was quite high load average (0.4-0.7) even on just installed clean system without any additional software. I discarded Fedora and installed openSUSE Tumbleweed on all my mini-servers, and load average is about 0 even with working Nextcloud server, Mail server (Postfix + Dovecot + Roundcube + a few connected IMAP clients), Samba server and some other stuff.

But I’d like to ask some offtop question. Is there any possibility to use Remi’s repos on openSUSE? I successfully added the RHEL 7 remi-safe repo to my zypper’s repos, but when I try to install any package I get lots of unresolvable dependencies, and so I think I have to add some more RHEL repos to resolve them. I’m afraid it would make little sense to do that, right?

Must admit I get around these type of problems by using Docker containers
instead and encapsulate anything that is required in a neat Docker Compose
file. The underlying Centos can have what it likes then without affecting
the container.

However, I do agree with @BerndH - if you are installing natively then Remi
works a treat.

1 Like