I thought I was in the clear building a new server for a client but now he tells me he had four website on the latest version of php. I am not sure how he did it and neither is he. I tried to get it to show up in the virtualmin control panel on the old server first so that we could be comfortable installing in on the fresh clean machine. No joy. An abbreviated transcript of my attempt is below but my attempt was more long winded. I am just fumbling around in the dark at the moment. The URL article I attempted to do at first is
https://www.virtualmin.com/documentation/web/multiplephp
Anyway, does anyone know how to add php 5.6 to a new CentOS virtualmin machine?
yum install scl-utils
Installed:
scl-utils.x86_64 0:20120927-27.el6_6
scl enable software_collection_1 'perl --version'
Unable to open /etc/scl/prefixes/software_collection_1!
rpm -Uvh https://www.softwarecollections.org/en/scls/rhscl/rh-php56/epel-7-x86_64...
curl: (22) The requested URL returned error: 404 Not Found
error: skipping https://www.softwarecollections.org/en/scls/rhscl/rh-php56/epel-7-x86_64... - transfer failed
yum install rh-php56 rh-php56-php-mysqlnd
No package rh-php56 available.
No package rh-php56-php-mysqlnd available.
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Retrieving https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
warning: /var/tmp/rpm-tmp.Df9JHu: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Preparing... ########################################### [100%]
1:epel-release ########################################### [100%]
yum install php56w php56w-opcache
epel | 4.3 kB 00:00
epel/primary_db | 4.5 MB 00:01
Error: xz compression not available
yum remove epel-release
Removed:
epel-release.noarch 0:7-9
rm -rf /var/cache/yum/x86_64/7/epel
Installed:
epel-release.noarch 0:6-8
yum install php56w php56w-opcache
Error: xz compression not available
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Saving to: “epel-release-latest-7.noarch.rpmâ€
yum install php56w php56w-opcache
Error: xz compression not available
Comments
Submitted by andreychek on Fri, 02/17/2017 - 19:29 Comment #1
Howdy -- the folks at the SCL repository have changed the procedure necessary for that to work.
Try these docs here, do these work for you:
https://www.softwarecollections.org/en/scls/rhscl/rh-php56/
We're working on updating our docs to their system, but in the meantime what's above should do the trick for you.
Submitted by securewebs on Fri, 02/17/2017 - 21:00 Pro Licensee Comment #2
Unfortunately, same results on the first step. ???
[root@sting ~]# yum install centos-release-scl Loaded plugins: fastestmirror Setting up Install Process Loading mirror speeds from cached hostfile * base: centos.eecs.wsu.edu * epel: ftp.osuosl.org * extras: repo1.sea.innoscale.net * updates: mirror.tocici.com Error: xz compression not available
Submitted by andreychek on Fri, 02/17/2017 - 23:25 Comment #3
Hmm, that's a pretty unusual error you're seeing there!
What is the output of this command:
rpm -qa |grep epel
Submitted by securewebs on Sat, 02/18/2017 - 20:07 Pro Licensee Comment #4
[root@sting ~]# rpm -qa |grep epel
epel-release-7-9.noarch
Submitted by andreychek on Sun, 02/19/2017 - 09:20 Comment #5
Okay, doing some research, it looks like you may want to remove that.
Try running this command:
yum remove epel-release
And then try the instructions shared in Comment #1 above. Does it work for you at that point?
Submitted by securewebs on Sun, 02/19/2017 - 13:08 Pro Licensee Comment #6
The solution for the moment on the new server was the client down grading the PHP version on the 4 sites that had 5.6. He believes that many scripts now are requiring the newer version. Can you leave me with your thoughts on the versions found in the stock CentOS 7 install? I assume that CentOS is conservative in what they include. Is 5.6 coming soon and how many server administrator go ahead and install a newer version? The panel provides for it so it can't be too rare. Just wondering if you would recommend that I attempt the install on the new replacement server for this client. Gun shy a bit because I can't get it to work on the server I am moving it from.
Submitted by ckwsp101 on Sun, 02/19/2017 - 15:13 Comment #7
The stock PHP release is old.
sh-4.2$ cat /etc/centos-release CentOS Linux release 7.3.1611 (Core) -sh-4.2$ php --version PHP 5.4.16 (cli) (built: Nov 6 2016 00:29:02) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies with Zend OPcache v7.0.5, Copyright (c) 1999-2015, by Zend Technologies
Submitted by andreychek on Sun, 02/19/2017 - 16:21 Comment #8
Yeah CentOS provides PHP 5.4, and that's likely the only version they'll provide.
The SCL repository is normally what's needed if you wish to have additional PHP versions installed side-by-side with the stock CentOS PHP.
I've never run into the problem you're seeing there before with the SCL repo.
My Googling suggests that you could be seeing some sort of compatibility issue, though I'm not quite sure at the moment.
I don't imagine you have another CentOS 7 system, even a test server, that you could try it on for testing purposes?