Koozali.org: home of the SME Server

Software Collections

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.
......