Koozali.org: home of the SME Server
Obsolete Releases => SME 9.x Contribs => Topic started by: janet 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.
-
A start is made here: http://wiki.contribs.org/Software_collections
-
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
-
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
-
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.
-
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.
-
+1 for Docker :
- http://www.infoworld.com/article/2607748/linux/red-hat-sets-docker-as-nucleus-of--project-atomic-.html (http://www.infoworld.com/article/2607748/linux/red-hat-sets-docker-as-nucleus-of--project-atomic-.html)
- http://www.cisco.com/c/dam/en/us/solutions/collateral/data-center-virtualization/dc-partner-red-hat/linux-containers-white-paper-cisco-red-hat.pdf (http://www.cisco.com/c/dam/en/us/solutions/collateral/data-center-virtualization/dc-partner-red-hat/linux-containers-white-paper-cisco-red-hat.pdf)
- http://www.projectatomic.io/ (http://www.projectatomic.io/)
- https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/7.0_Release_Notes/chap-Red_Hat_Enterprise_Linux-7.0_Release_Notes-Linux_Containers_with_Docker_Format.html (https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/7.0_Release_Notes/chap-Red_Hat_Enterprise_Linux-7.0_Release_Notes-Linux_Containers_with_Docker_Format.html)
- http://docs.docker.com/installation/rhel/ (http://docs.docker.com/installation/rhel/)
Container technology is the future for software continuous deployment.
-
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
-
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
-
https://www.softwarecollections.org/en/docs/guide/ (https://www.softwarecollections.org/en/docs/guide/)
-
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 :-)
-
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
-
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
{
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.
db accounts setprop ibayname phpSCL enabled
signal-event ibay-modify ibayname
-
[/code]
You have still to put the wrapper in the cgi-bin and for enabling it.
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)
-
indeed, thanks for the tips, I'm fighting against the virtualhost since I want one wrapper for all ibays....next soon
-
next soon
I got it :)
-
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
{
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.
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 " Database Support:() No"
i think the some php-mysql is missing in the php54 package
-
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
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
# 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
-
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
/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
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
-
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.
-
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
/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
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.
-
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 :)
-
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.
/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
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 ?
-
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
-
New version, only for sme9 64 bit & for testing purpose
/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
signal-event yum-modify
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.
db accounts setprop <ibayname> php55 enabled
signal-event ibay-modify <ibayname>
or
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
-
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
yum install php54-php --enablerepo=scl-php54
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
{
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";
}
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
-
New version, only for sme9 64 bit & for testing purpose but this is something nicely workable
/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
signal-event yum-modify
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.
db accounts setprop <ibayname> php55 enabled
signal-event ibay-modify <ibayname>
or
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
config setprop php55 MemoryLimit 128M
signal-event console-save
see
# 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
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
-
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!
-
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 (http://wiki.contribs.org/Remi#tab=For_SME_9) 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 (http://wiki.contribs.org/Remi#tab=For_SME_9) (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.
/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
signal-event yum-modify
-
After installing php55-php-mcrypt from php55more, two-factor authentication for Joomla! now works as well.
-
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 ?
-
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.
-
Great...
It is for that we can read in the php55more
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