Koozali.org: home of the SME Server

Software Collections

Offline janet

  • ****
  • 4,812
  • +0/-0
Software Collections
« on: October 23, 2014, 03:07:09 AM »
Dear All, Developers & Wiki & Docs team members

Charlie Brady brought to our attention some time ago that SME9/CentOS6 supports software collections, which will allow multiple versions of packages to be installed & be selectively used by apps/contribs where the app requires a specific non standard version of a package eg php5.4

This should really be further investigated & detailed Howto instructions created for users to avail of these Software Collections.

Who wants to get involved in investigating this ?

Refer to
http://forums.contribs.org/index.php/topic,51221.msg259761.html#msg259761
which has links to a previous post etc & Red Hat info

Info about Software Collections starts here
https://access.redhat.com/documentation/en-US/Red_Hat_Developer_Toolset/1/html/Software_Collections_Guide/

Have fun !

This will be a good thing for SME users wanting to install newer/current versions of contribs etc that need latest versions of packages like PHP, MYSQL & so on.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

guest22

Re: Software Collections
« Reply #1 on: October 23, 2014, 07:54:26 AM »

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: Software Collections
« Reply #2 on: October 23, 2014, 04:24:02 PM »
http://blog.famillecollet.com/post/2014/09/03/PHP-5.5-as-Software-Collection

it seems that it is available for i386 with scl php55
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

guest22

Re: Software Collections
« Reply #3 on: October 23, 2014, 05:29:39 PM »
That could be stephdl, it depends on which "repo" you're using. Redhat/CentOS official slc repo's only provide the 64 bit versions. The link you provided points to a /remi repo, which may contain 32 bit versions of the RPM's.


If we've figured it out, we'll wikize it ;-)


guest

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Software Collections
« Reply #4 on: October 23, 2014, 10:55:07 PM »
Charlie Brady brought to our attention some time ago that SME9/CentOS6 supports software collections, which will allow multiple versions of packages to be installed & be selectively used by apps/contribs where the app requires a specific non standard version of a package eg php5.4

For SME9 you should also look at docker.

guest22

Re: Software Collections
« Reply #5 on: October 23, 2014, 11:05:56 PM »
For SME9 you should also look at docker.


Agree, that's a WIP here http://wiki.contribs.org/Docker, but progress and general interest is slow.


Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: Software Collections
« Reply #7 on: October 28, 2014, 07:50:34 AM »
reference to that link : http://wiki.contribs.org/Software_collections#run_php54_on_a_hosted_website_.28virtual_host.29

A question, did you try to simply use an ibay instead of a virtualhost....maybe a user wants to use the scl collection with an ibay and not a virtualhost which link to an ibay...I have the feeling that all is in place if you want to use scl with an ibay, except  that you have to do a wrapper in the cgi folder. My 2c but I didn't test it.

This is what I can read in httpd.conf for owncloud

 <Directory /home/e-smith/files/ibays/owncloud/cgi-bin>
    Options ExecCGI
    AllowOverride None
    order deny,allow
    deny from all
    allow from all
 </Directory>


That could be a nice rpm to easily install scl collection, at least for php. It lacks only an automatic way to write the wrapper in cgi-bin but we can use the content property to do it.

If you want to roll a rpm i can help/advice/do it
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Software Collections
« Reply #8 on: October 30, 2014, 06:43:16 PM »
Charlie Brady brought to our attention some time ago that SME9/CentOS6 supports software collections, which will allow multiple versions of packages to be installed & be selectively used by apps/contribs where the app requires a specific non standard version of a package eg php5.4

Source rpms can be found here:

ftp://ftp.redhat.com/redhat/linux/enterprise/6Server/en/RHSCL/SRPMS/

A new set of packages was announced this morning:

https://www.redhat.com/en/about/press-releases/latest-version-red-hat-software-collections-now-generally-available

Offline Xavier.A

  • ***
  • 104
  • +0/-0
Re: Software Collections
« Reply #9 on: October 30, 2014, 11:45:54 PM »
“When the wise man points to the moon, the fool looks at the finger.”

Offline TerryF

  • grumpy old man
  • *
  • 1,826
  • +6/-0
Re: Software Collections
« Reply #10 on: October 31, 2014, 03:04:54 AM »
This is a game changer if it gets up and running OK on SME, chuck in docker and the skies the loimit and that's probably understating it..

While my skill set is limited I can as always run and test the shite :-) out of it :-)
--
qui scribit bis legit

Offline davidS

  • ***
  • 80
  • +0/-0
Re: Software Collections
« Reply #11 on: November 06, 2014, 05:49:05 PM »
reference to that link : http://wiki.contribs.org/Software_collections#run_php54_on_a_hosted_website_.28virtual_host.29

A question, did you try to simply use an ibay instead of a virtualhost....maybe a user wants to use the scl collection with an ibay and not a virtualhost which link to an ibay...I have the feeling that all is in place if you want to use scl with an ibay, except  that you have to do a wrapper in the cgi folder. My 2c but I didn't test it.

This is what I can read in httpd.conf for owncloud

 <Directory /home/e-smith/files/ibays/owncloud/cgi-bin>
    Options ExecCGI
    AllowOverride None
    order deny,allow
    deny from all
    allow from all
 </Directory>


That could be a nice rpm to easily install scl collection, at least for php. It lacks only an automatic way to write the wrapper in cgi-bin but we can use the content property to do it.

If you want to roll a rpm i can help/advice/do it

hi stephdl
Can you explain to me how this can be done to an IBAY and not to a domain (virtualhost)
it will be easier because I install Joomla before I have a domain

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: Software Collections
« Reply #12 on: November 07, 2014, 05:11:22 PM »
I'm testing another way, more userfriendly, from my point of view of course

I would enable the scl from the ibay and not from the domain

need more test and a rpm

Code: [Select]
{
       use esmith::AccountsDB;
        my $accounts = esmith::AccountsDB->open_ro;

        my @ibays = $accounts->ibays;
        foreach my $ibay (@ibays) {

                my $phpRHCL = $ibay->prop("phpSCL") || "";
                my $key = $ibay->key;

                if ($phpRHCL eq 'enabled') {

                        # write the configuration

                        $OUT .= "\n";
                        $OUT .= "\n";
                        $OUT .= "<Directory /home/e-smith/files/ibays/$key/html>\n";
                        $OUT .= "    # use PHP of RHSCL  instead of the default PHP\n";
                        $OUT .= "    AddHandler php-cgi .php\n";
                        $OUT .= "    Action php-cgi /cgi-bin/php54-wrapper\n";
                        $OUT .= "</Directory>\n";
                        $OUT .= "\n";
                        $OUT .= "\n";

                }
        }
}


You have still to put the wrapper in the cgi-bin and for enabling it.

Code: [Select]
db accounts setprop ibayname  phpSCL enabled
signal-event ibay-modify ibayname
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline Daniel B.

  • *
  • 1,699
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: Software Collections
« Reply #13 on: November 07, 2014, 05:22:29 PM »
[/code]

You have still to put the wrapper in the cgi-bin and for enabling it.

Code: [Select]
db accounts setprop ibayname  phpSCL enabled
signal-event ibay-modify ibayname

I'd choose another name than phpSCL, because with SCL, you can have several different php versions installed, so you could switch for example between:

- Stock php (5.3.3, using mod_php)
- php54 from SCL (as a CGI)
- php56 from SCL (as a CGI)
C'est la fin du monde !!! :lol:

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: Software Collections
« Reply #14 on: November 07, 2014, 05:57:09 PM »
indeed, thanks for the tips, I'm fighting against the virtualhost since I want one wrapper for all ibays....next soon
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: Software Collections
« Reply #15 on: November 07, 2014, 06:20:43 PM »
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline davidS

  • ***
  • 80
  • +0/-0
Re: Software Collections
« Reply #16 on: November 07, 2014, 08:55:06 PM »
I'm testing another way, more userfriendly, from my point of view of course

I would enable the scl from the ibay and not from the domain

need more test and a rpm

Code: [Select]
{
       use esmith::AccountsDB;
        my $accounts = esmith::AccountsDB->open_ro;

        my @ibays = $accounts->ibays;
        foreach my $ibay (@ibays) {

                my $phpRHCL = $ibay->prop("phpSCL") || "";
                my $key = $ibay->key;

                if ($phpRHCL eq 'enabled') {

                        # write the configuration

                        $OUT .= "\n";
                        $OUT .= "\n";
                        $OUT .= "<Directory /home/e-smith/files/ibays/$key/html>\n";
                        $OUT .= "    # use PHP of RHSCL  instead of the default PHP\n";
                        $OUT .= "    AddHandler php-cgi .php\n";
                        $OUT .= "    Action php-cgi /cgi-bin/php54-wrapper\n";
                        $OUT .= "</Directory>\n";
                        $OUT .= "\n";
                        $OUT .= "\n";

                }
        }
}


You have still to put the wrapper in the cgi-bin and for enabling it.

Code: [Select]
db accounts setprop ibayname  phpSCL enabled
signal-event ibay-modify ibayname

hi stephdl
first attempt and it is working perfectly, but now there is another problem with joomla 3
it's doesn't recognise mysql.
i receive en error on the firs page of joomla Pre-Installation Check
Quote
" Database Support:()   No"

i think the some php-mysql is missing in the php54 package

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: Software Collections
« Reply #17 on: November 07, 2014, 10:20:21 PM »
hi stephdl
first attempt and it is working perfectly, but now there is another problem with joomla 3
it's doesn't recognise mysql.
i receive en error on the firs page of joomla Pre-Installation Check 
i think the some php-mysql is missing in the php54 package

yes you have to install all package related to php54 and of course from the scl repository

for a matter of test I did

Code: [Select]
yum install --enablerepo=scl php54\*
But I'm sure that you could be more precise and look about which php rpm are installed and therefore install those packages.

see
Code: [Select]
# rpm -qa |grep php-
php-pear-HTTP-Request-1.4.4-2.el6.noarch
php-pdo-5.3.3-40.el6_6.i686
php-process-5.3.3-40.el6_6.i686
php-pear-File-CSV-1.0.0-2.el6.noarch
php-pear-HTTP-1.4.1-5.el6.noarch
php-pear-XML-Parser-1.3.4-1.el6.noarch
php-pear-Services-Weather-1.4.5-2.el6.noarch
php-ldap-5.3.3-40.el6_6.i686
php-pear-1.9.4-4.el6.noarch
php-pear-Net-Socket-1.0.10-1.el6.noarch
e-smith-php-2.4.0-2.el6.sme.noarch
php-pear-Date-1.4.7-5.el6.noarch
php-pear-MDB2-2.5.0-0.9.b5.el6.noarch
php-pear-XML-Serializer-0.20.2-1.el6.noarch
php-pear-Mail-1.2.0-1.el6.noarch
php-tidy-5.3.3-40.el6_6.i686
php-cli-5.3.3-40.el6_6.i686
php-5.3.3-40.el6_6.i686
php-tcpdf-dejavu-sans-fonts-6.0.089-1.el6.noarch
php-mcrypt-5.3.3-3.el6.i686
php-pear-File-Util-1.0.0-2.el6.noarch
php-pear-DB-1.7.13-3.el6.noarch
php-pear-Net-URL-1.0.15-4.el6.noarch
php-pear-Net-FTP-1.3.7-4.el6.noarch
php-pear-Auth-SASL-1.0.4-1.el6.noarch
php-pear-Log-1.12.7-1.el6.noarch
php-mbstring-5.3.3-40.el6_6.i686
php-common-5.3.3-40.el6_6.i686
php-gd-5.3.3-40.el6_6.i686
php-mysql-5.3.3-40.el6_6.i686
php-imap-5.3.3-40.el6_6.i686
php-bcmath-5.3.3-40.el6_6.i686
php-tcpdf-6.0.089-1.el6.noarch
php-pear-File-1.4.0-1.el6.noarch
php-pear-Mail-Mime-1.8.4-1.el6.noarch
php-pear-Net-DIME-1.0.2-1.el6.noarch
php-pear-SOAP-0.12.0-4.el6.noarch
php-xml-5.3.3-40.el6_6.i686
php-php-gettext-1.0.11-3.el6.noarch
php-pear-Cache-1.5.6-1.el6.noarch
php-pear-Net-SMTP-1.6.1-1.el6.noarch


I'm playing a bit with the new php.ini of the scl collection, mainly because I want use all sme DB with it. A rpm is coming
« Last Edit: November 07, 2014, 10:25:20 PM by stephdl »
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: Software Collections
« Reply #18 on: November 08, 2014, 12:17:40 AM »
Ola, I need your test, a rpm to activate the red hat php scl see http://mirror.de-labrusse.fr/Sme-Server/smeserver-php-scl/

ONLY for SME9 x64 bit and ONLY for test purpose

Code: [Select]
/sbin/e-smith/db yum_repositories set scl repository \
 Name 'CentOS-$releasever - SCL' \
 BaseURL 'http://mirror.centos.org/centos/$releasever/SCL/$basearch' \
 GPGCheck yes \
 GPGKey file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 \
 EnableGroups no \
 Visible no \
 status disabled

 signal-event yum-modify

wget http://mirror.de-labrusse.fr/Sme-Server/smeserver-php-scl/smeserver-php-scl-0.1-1.el6.sme.x86_64.rpm
yum install smeserver-php-scl-0.1-1.el6.sme.x86_64.rpm --enablerepo=scl
signal-event console-save


Then when you want to enable php54 for an Ibay, simply do

Code: [Select]
db accounts setprop <ibayname> php54 enabled
signal-event ibay-modify

at the minutes I have added all php54 of scl in dependencies, but That can be removed or adjusted, please ask or say if you see something wrong.

The new php.ini is templated like the original, if you modify settings in the official php.ini then after a 'signal-event console-save' you reconfigure also the new php.ini in /opt
« Last Edit: November 08, 2014, 10:15:31 AM by stephdl »
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: Software Collections
« Reply #19 on: November 08, 2014, 10:20:23 AM »
In the meanwhile, do there are values if we use the 'remi scl' since you have three versions of php(php54,php55,php56)  and many many dependencies not available in the official scl.
« Last Edit: November 08, 2014, 10:23:39 AM by stephdl »
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline davidS

  • ***
  • 80
  • +0/-0
Re: Software Collections
« Reply #20 on: November 08, 2014, 10:53:56 AM »
Ola, I need your test, a rpm to activate the red hat php scl see http://mirror.de-labrusse.fr/Sme-Server/smeserver-php-scl/

ONLY for SME9 x64 bit and ONLY for test purpose

Code: [Select]
/sbin/e-smith/db yum_repositories set scl repository \
 Name 'CentOS-$releasever - SCL' \
 BaseURL 'http://mirror.centos.org/centos/$releasever/SCL/$basearch' \
 GPGCheck yes \
 GPGKey file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 \
 EnableGroups no \
 Visible no \
 status disabled

 signal-event yum-modify

wget http://mirror.de-labrusse.fr/Sme-Server/smeserver-php-scl/smeserver-php-scl-0.1-1.el6.sme.x86_64.rpm
yum install smeserver-php-scl-0.1-1.el6.sme.x86_64.rpm --enablerepo=scl
signal-event console-save


Then when you want to enable php54 for an Ibay, simply do

Code: [Select]
db accounts setprop <ibayname> php54 enabled
signal-event ibay-modify

at the minutes I have added all php54 of scl in dependencies, but That can be removed or adjusted, please ask or say if you see something wrong.

The new php.ini is templated like the original, if you modify settings in the official php.ini then after a 'signal-event console-save' you reconfigure also the new php.ini in /opt

thank you stephdl you the best
it's working like charm everything went smooth, no error in the message log.
installing joomla 3.3 was successful no addons was necessary.

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: Software Collections
« Reply #21 on: November 08, 2014, 12:12:34 PM »
Yes same here, but I have done a new package with less dependencies, in fact I have added all php package installed by default on sme, and removed all php54-pecl-apc  php54-pecl-memcache php54-pecl-zendopchache

Onwloud7 is really impressive now :)
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: Software Collections
« Reply #22 on: November 08, 2014, 02:03:12 PM »
Ok we have to modify the repo entries : https://www.softwarecollections.org/repos/rhscl/ We started with the scl collection of centos, but like you can see you have a most updated scl directly on the main website.

But now we have separate repositories for each php version. Remi has done some works (available on softwarecollections.org and on his own repo) which are waiting their integrations in epel.
Code: [Select]
/sbin/e-smith/db yum_repositories set scl-php54 \
 repository Name 'Software collections - php54' \
 BaseURL 'https://www.softwarecollections.org/repos/rhscl/php54/epel-6-x86_64/' \
 EnableGroups no Visible yes status disabled

/sbin/e-smith/db yum_repositories set scl-php55 \
 repository Name 'Software collections - php55' \
 BaseURL 'https://www.softwarecollections.org/repos/rhscl/php55/epel-6-x86_64/' \
 EnableGroups no Visible yes status disabled

so we have to do

Code: [Select]
yum install --enablerepo=php55,php54 php54 php55
we could try another alternative and use the remi repository directly which would lead to have all php (php54,php55,php56) version in one repository but we will lost the 'Professional project' tag because these packages are done by a community member


Thoughts ?
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

guest22

Re: Software Collections
« Reply #23 on: November 08, 2014, 02:20:41 PM »
I would stick to the most official repo being https://www.softwarecollections.org/repos/rhscl/


If a sysadmin very familiar with scl, then he could add remi and other repo's, but let the default repo be 'safe', simple and transparent.



my 2 cents

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: Software Collections
« Reply #24 on: November 08, 2014, 05:10:05 PM »
New version, only for sme9 64 bit & for testing purpose

Code: [Select]
/sbin/e-smith/db yum_repositories set scl-php54 \
 repository Name 'Software collections - php54' \
 BaseURL 'https://www.softwarecollections.org/repos/rhscl/php54/epel-6-x86_64/' \
 EnableGroups no Visible yes status disabled

/sbin/e-smith/db yum_repositories set scl-php55 \
 repository Name 'Software collections - php55' \
 BaseURL 'https://www.softwarecollections.org/repos/rhscl/php55/epel-6-x86_64/' \
 EnableGroups no Visible yes status disabled
Code: [Select]
signal-event yum-modify
Code: [Select]
wget http://mirror.de-labrusse.fr/Sme-Server/smeserver-php-scl/smeserver-php-scl-0.3-1.el6.sme.x86_64.rpm
yum install --enablerepo=scl-php55,scl-php54 smeserver-php-scl-0.3-1.el6.sme.x86_64.rpm
signal-event console-save

now you can enable by ibay which version of php you want, choose between php55 || php54.

Code: [Select]
db accounts setprop <ibayname> php55 enabled
signal-event ibay-modify <ibayname>

or
Code: [Select]
db accounts setprop <ibayname> php54 enabled
signal-event ibay-modify <ibayname>

If you set 'php55 enabled' & 'php54 enabled' the php55 is priority

What it doesn't work :(

As php run as a cgi application, we cannot fine tune the php trough apache like I did for smeserver-webhosting, therefore the contrib will not work with php55 & php54. So I added two db php55 & php54 with exactly the same parameters than the php settings.

see http://wiki.contribs.org/DB_Variables_Configuration#Php

for example

config setprop php55 MemoryLimit 128M
signal-event console-save
« Last Edit: November 09, 2014, 06:47:08 PM by stephdl »
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: Software Collections
« Reply #25 on: November 08, 2014, 05:57:38 PM »
What it doesn't work :(

As php run as a cgi application, we cannot fine tune the php trough apache like I did for smeserver-webhosting, therefore the contrib will not work with php55 & php54. So I added two db php55 & php54 with exactly the same parameters than the php settings.

Not completely true we can say to apache to load by default /usr/lib64/httpd/modules/libphp54-php5.so instead of /usr/lib64/httpd/modules/libphp5.so
Code: [Select]
yum install php54-php --enablerepo=scl-php54
Code: [Select]
mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/
vim /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/20LoadModule80PHP
and paste

Code: [Select]
{
    return "" unless (exists $php{status} and $php{status} eq "enabled");

    return "LoadModule php5_module modules/libphp54-php5.so" if (-r "/usr/lib64/httpd/modules/libphp54-php5.so" );

    return "LoadModule php5_module modules/libphp5.so" unless ( -r "/usr/lib64/httpd/modules/libphp54-php5.so");

    return "LoadModule php4_module modules/libphp4.so";
}

Code: [Select]
signal-event console-save
Then now apache use the php-mod from libphp54-php5.so the php.ini is templated in /opt/rh/php54/root/etc/php.ini . You have to use the db of php54 to modify the default php54 settings or use the contrib smeserver-webhosting to modify the php ibay settings

Unfortunately php55-php claims about httpd24-httpd and thus I have not tested, next work

EDIT : Not easy :(
# yum install php55-php --enablerepo=scl-php55,scl-httpd24
# updatedb
# locate libphp5
/opt/rh/httpd24/root/usr/lib64/httpd/modules/libphp55-php5.so
/opt/rh/php54/root/usr/lib64/httpd/modules/libphp5.so
/usr/lib64/httpd/modules/libphp5.so
/usr/lib64/httpd/modules/libphp54-php5.so

the libphp55-php5.so is not destined to be used with our version of httpd

C'est mal barré -> It's bad beginning

« Last Edit: November 08, 2014, 06:29:38 PM by stephdl »
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: Software Collections
« Reply #26 on: November 09, 2014, 11:25:10 PM »
New version, only for sme9 64 bit & for testing purpose but this is something nicely workable

Code: [Select]
/sbin/e-smith/db yum_repositories set scl-php54 \
 repository Name 'Software collections - php54' \
 BaseURL 'https://www.softwarecollections.org/repos/rhscl/php54/epel-6-x86_64/' \
 EnableGroups no Visible yes status disabled

/sbin/e-smith/db yum_repositories set scl-php55 \
 repository Name 'Software collections - php55' \
 BaseURL 'https://www.softwarecollections.org/repos/rhscl/php55/epel-6-x86_64/' \
 EnableGroups no Visible yes status disabled
Code: [Select]
signal-event yum-modify
Code: [Select]
wget http://mirror.de-labrusse.fr/Sme-Server/smeserver-php-scl/smeserver-php-scl-0.3-3.el6.sme.x86_64.rpm
yum install --enablerepo=scl-php55,scl-php54 smeserver-php-scl-0.3-3.el6.sme.x86_64.rpm
signal-event console-save

now you can enable by ibay which version of php you want, choose between php55 || php54.

Code: [Select]
db accounts setprop <ibayname> php55 enabled
signal-event ibay-modify <ibayname>

or
Code: [Select]
db accounts setprop <ibayname> php54 enabled
signal-event ibay-modify <ibayname>

If you set 'php55 enabled' & 'php54 enabled' the php55 is priority


As php run as a cgi application, we cannot fine tune the php trough apache like I did for smeserver-webhosting, therefore the contrib will not work with php55 & php54. So I added two db php55 & php54 with exactly the same parameters than the php settings.

see http://wiki.contribs.org/DB_Variables_Configuration#Php

for example

Code: [Select]
config setprop php55 MemoryLimit 128M
signal-event console-save
see
Code: [Select]
# config show php54
php54=configuration
    AllowUrlFopen=Off
    MaxExecutionTime=30
    MaxFileUpload=20
    MaxInputTime=60
    MemoryLimit=64M
    PhpModule=disabled
    PostMaxSize=20M
    UploadMaxFilesize=10M


If you need we can load the php54-mod in apache and run the php54 as the default php for the server. Therefore apache can change settings with the contrib smeserver-webhosting

Code: [Select]
config setprop php54 PhpModule enabled
signal-event console-save

The limit I know if you use the php54-mod is maybe the lack of rpm like php-mcrypt which is not available in the official redhat software collections, but we can find it and others in the remi software collections. If we want to use his software collections, which is waiting a release in epel, we could load php55-mod & php56-mod directly in the apache server (only php54-mod with RHSCL) but it will need some (light) customisations or maybe a different package because you can't have the both collection installed in the server.


Need tests and your feedbacks
« Last Edit: November 09, 2014, 11:27:15 PM by stephdl »
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline DanB35

  • ****
  • 764
  • +0/-0
    • http://www.familybrown.org
Re: Software Collections
« Reply #27 on: November 21, 2014, 05:07:27 PM »
stephdl, I just installed this to allow me to revert my server to PHP 5.3.3 and still run Owncloud 7 and Joomla! 3.3.6.  Owncloud works perfectly, at least in my cursory testing so far (web login, desktop app, and iOS app).  Two-factor authentication for Joomla seems to be failing due to a lack of php-mcrypt.  This isn't critical for me at this time, though.  Thanks for the work in putting this together!
......

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: Software Collections
« Reply #28 on: November 21, 2014, 05:44:37 PM »
Two-factor authentication for Joomla seems to be failing due to a lack of php-mcrypt.  This isn't critical for me at this time, though.

Then you can install the software collection of remi https://www.softwarecollections.org/en/scls/remi/php54more/ & https://www.softwarecollections.org/en/scls/remi/php55more/ and you will have the php-mcrypt

Alternatively you can do the same thing with the remi repository (then the last php56 is provided) but I have not added any require in the rpm spec (php56 , php56-php-bcmath , php56-php-gd , php56-php-imap , php56-php-ldap , php56-php-enchant , php56-php-mbstring , php56-php-pdo , php56-php-tidy , php56-php-mysqlnd, php56-php-mcrypt) so you have to install them by hand.

I'm thinking to do a special rpm for that and install all Remi-scl php5X by a yum install.

Code: [Select]
/sbin/e-smith/db yum_repositories set scl-php54more \
 repository Name 'Software collections - php54more' \
 BaseURL 'https://www.softwarecollections.org/repos/remi/php54more/epel-6-x86_64' \
 EnableGroups no Visible yes status disabled

/sbin/e-smith/db yum_repositories set scl-php55more \
 repository Name 'Software collections - php55more' \
 BaseURL 'https://www.softwarecollections.org/repos/remi/php55more/epel-6-x86_64' \
 EnableGroups no Visible yes status disabled


Code: [Select]
signal-event yum-modify
« Last Edit: November 21, 2014, 06:45:00 PM by stephdl »
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline DanB35

  • ****
  • 764
  • +0/-0
    • http://www.familybrown.org
Re: Software Collections
« Reply #29 on: November 22, 2014, 01:20:41 PM »
After installing php55-php-mcrypt from php55more, two-factor authentication for Joomla! now works as well.
......

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: Software Collections
« Reply #30 on: November 22, 2014, 04:06:15 PM »
After installing php55-php-mcrypt from php55more, two-factor authentication for Joomla! now works as well.

Then I suppose that all rpms of the official redhat php55 collection have been removed, and the scl php55more of remi is now in place ?
« Last Edit: November 22, 2014, 04:07:50 PM by stephdl »
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline DanB35

  • ****
  • 764
  • +0/-0
    • http://www.familybrown.org
Re: Software Collections
« Reply #31 on: November 22, 2014, 04:14:29 PM »
That didn't appear to be necessary, or at least yum didn't give any errors.  The php55-php-mcrypt from php55more is running alongside the official red hat php55 RPMs.
......

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: Software Collections
« Reply #32 on: November 22, 2014, 04:53:53 PM »
Great...

It is for that we can read in the php55more

Quote
Some packages from this collection require packages provided by these collections:

    Php55 by Software Collections
    Php54more by Remi Collet

This collection provides packages, which may be required by some package from these collections:

    Php54more by Remi Collet
    Php55 by Software Collections

but that can be hard to recall the repo you have to enable if you want to install a rpm, I rather prefer to have only One repo and maybe use only php54more & php55more
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!