Difference between revisions of "Software Collections"

From SME Server
Jump to navigationJump to search
m (resize logo)
 
(33 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Warning box|Software Collections is only available for SME Server 9.x '''64-bit'''}}
+
<blockquote style="float: right;">
{{WIP box}}
+
[[File:softwarecollections.png|200px]]
 +
</blockquote>
 
{{usefulnote}}
 
{{usefulnote}}
 +
 
== About ==
 
== About ==
For certain applications, more recent versions of some software components are often needed in order to use their latest new features. Software Collections provides a set of dynamic programming languages, database servers, and various related packages that are either more recent than their equivalent versions included in the base SME Server 9.x system.
+
For certain applications, more recent versions of some software components are often needed in order to use their latest new features. Software Collections provides a set of dynamic programming languages, database servers, and various related packages that are either more recent than their equivalent versions included in the base SME Server 9.x system. Software Collections is only available for SME Server 9.x '''64-bit'''
 +
 
 +
 
 +
== Installation ==
 +
The Software Collections (scl) packages can be installed by issuing the following command:
 +
yum install scl-utils
 +
This will only install the scl 'environment'. For installation of the individual applications, please see below.
  
  
==== Installation ====
+
=== Enable scl repositories ===
One must enable the '''[[scl]]''' repository. See the Software Collections '''[[scl]]''' repository page on how to enable this repository.
+
To be able to install a specific scl application, one must enable the one of the '''[[Software Collections Repositories]]''' based on the required application. See the '''[[Software Collections Repositories]]''' page on how to enable the desired repository.
  
  
After enabling the scl repo, the scl packages can be installed by issueing the following command:
+
=== Installation of a collection ===
  yum install scl-utils --enablerepo=scl
+
To be able to install an application from the Software Collections, one must enable the respective application repo. As an example, enable the scl-php54 repo and to list all available versions the following command can be used:
 +
  yum list available \* --disablerepo=* --enablerepo=scl-php54
  
==== Installation of a collection ====
 
To get an overview of the available collections you can use the following command:
 
yum list available \* --disablerepo=* --enablerepo=scl
 
  
 +
php54 will be listed, and to install that version:
 +
  yum install php54 --enablerepo=scl-php54
 +
Please see the specific application sections below on detailed installation instructions.
  
and to install a collection: (example)
 
  yum install mariadb55 --enablerepo=scl
 
  
An overview of installed collections one can use:
+
You can verify installed Software Collections by issuing:
 
  scl -l
 
  scl -l
 +
  
 
Collections will be installed in:
 
Collections will be installed in:
 
  /opt/rh
 
  /opt/rh
 
 
as defined by the collection packager and noted here:
 
as defined by the collection packager and noted here:
 
  /etc/scl/prefixes
 
  /etc/scl/prefixes
Line 34: Line 41:
 
The '''/opt''' is the highly recommended installation location. However, in the case of SME Server, considerations to install in a different location could be considered regarding default backups etc. e.g. '/home/e-smith/files/scl/sme'.  
 
The '''/opt''' is the highly recommended installation location. However, in the case of SME Server, considerations to install in a different location could be considered regarding default backups etc. e.g. '/home/e-smith/files/scl/sme'.  
  
 +
For more information on running applications and other options please see the Software Collections [https://www.softwarecollections.org/en/docs/guide/#sect-Enabling_the_Software_Collection Documentation]
  
 +
== Software Collections applications ==
 +
{{Note box|Please note that this is still a work in progress. Each individual application will store it's data into their own environment/directory, which by default will NOT be backed up by SME Server. This is being worked on.}}
 +
Please see the individual application articles:
 +
{{#ask: [[Category:Software Collections]]
 +
|format=table
 +
|mainlabel=Available articles
 +
|order=ascending
 +
}}
  
== Usage of collections ==
+
== Building your own software collections ==  
All below TBA
 
  
==== Running an Executable from a Software Collection ====
+
Please consider building your collection on non production systems only. For a full reference please refer to the developers manual [https://access.redhat.com/documentation/en-US/Red_Hat_Developer_Toolset/1/html/Software_Collections_Guide/chap-Introducing_Software_Collections.html '''here'''].
  
  
==== Running a Shell Session with a Software Collection as Default ====
+
To be able to build your own software collection, an extra scl package has to be installed:
 
+
  yum install scl-utils-build --enablerepo=scl
 
 
==== Running a System Service from a Software Collection ====
 
 
 
 
 
==== Migrate from stock application stack to a collection ====
 
 
 
===== Examples =====
 
===== run php54 on a hosted website (virtual host) =====
 
Install php54 from scl repo
 
  yum --enablerepo scl install php54-php.x86_64 
 
 
 
Verify the installation,
 
  scl enable php54 'php -v'
 
It should return this version (or higher)
 
PHP 5.4.16 (cli) (built: Jul 10 2014 10:06:38)
 
 
 
Create a template fragment that will enable apache to invoke php54 for a virtual domain
 
nano /etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/70php54
 
  
paste this code fragment (including the last empty line):
 
<nowiki>{
 
  use esmith::DomainsDB;
 
  my $domains = esmith::DomainsDB->open_ro;
 
if (($domains->get_prop($virtualHost, 'php54') || 'disabled')
 
        eq 'enabled')
 
{
 
$OUT = "    #Enable php54 through Cgi-Bin wrapper. Needs a wrapper script in /cgi-bin/php54-wrapper\n";
 
$OUT .= "    AddHandler php-cgi .php\n";
 
$OUT .= "    Action php-cgi /cgi-bin/php54-wrapper\n";
 
$OUT .= "    <Location />\n";
 
$OUT .= "      Options +ExecCGI\n";
 
$OUT .= "    </Location>\n";
 
}
 
}
 
</nowiki>
 
and Save with <CTRL>-X - yes.
 
  
Create the cgi-wrapper script:
+
== Contrib development ==
nano ~<Ibayname of MyVirtualDomain>/../cgi-bin/php54-wrapper
+
Development of a contrib for SCL PHP specifically is under way. Currently it is in (pre) Alpha stage. You can read more about it on the [http://forums.contribs.org/index.php/topic,51487.0.html '''forums''']
  
Insert this code:
+
== References ==
#!/bin/bash
+
# [https://www.softwarecollections.org/en/ Software Collections website]
source /opt/rh/php54/enable
+
# [ftp://ftp.redhat.com/redhat/linux/enterprise/6Server/en/RHSCL/SRPMS/ SRPM of RHSCL6]
exec php-cgi
+
# [https://access.redhat.com/documentation/en-US/Red_Hat_Software_Collections/ Release Notes & Documentation]
and Save with <CTRL>-X - yes.
 
  
Then execute these commands:
 
cd ~<Ibayname of MyVirtualDomain>/../cgi-bin/
 
restorecon -RF php54-wrapper
 
chown www:www php54-wrapper
 
chmod ugo-rwx php54-wrapper
 
chmod ug+rx php54-wrapper
 
  
The template fragment for httpd.conf needs a database setting to be enabled for the (virtual) domain (NOT the ibay):
+
==Other articles in this category==
Check with
+
{{#ask: [[Category:Software Collections]]}}
db domains show <myVirtualDomain.com>
 
Edit with
 
db domains setprop <myVirtualDomain.com> php54 enabled
 
 
 
To enable this run:
 
expand-template /etc/httpd/conf/httpd.conf
 
/etc/init.d/httpd-e-smith restart
 
 
 
Notes:  
 
*This version of php uses the /opt/rh/php54/root/etc/php.ini file which uses default settings as configured by RedHat, use at your own risk. Adjust the settings according to your (security) needs.
 
*Using Cgi-Bin wrapper scripts makes your system vulnerable to [https://www.digitalocean.com/community/tutorials/how-to-protect-your-server-against-the-shellshock-bash-vulnerability Shellshock server bash vulnerability], make sure your server runs the latest version of bash.
 
*This example and code still have to be tested (I will soon).
 
*Source: [http://www.ilsistemista.net/index.php/linux-a-unix/45-joomla-3-3-centos-6-and-php-version-putting-all-together.html?start=1 This] HowTo for CENTOS6
 
 
 
== Building your own software collections ==
 
 
 
Please consider building your collection on non production systems only. For a full reference please refer to the developers manual [https://access.redhat.com/documentation/en-US/Red_Hat_Developer_Toolset/1/html/Software_Collections_Guide/chap-Introducing_Software_Collections.html '''here'''].
 
 
 
 
 
To be able to build your own software collection, an extra scl package has to be installed:
 
yum install scl-utils-build --enablerepo=scl
 
  
 +
[[Category:Software Collections]]
 
[[Category:Howto]]
 
[[Category:Howto]]

Latest revision as of 05:27, 4 November 2016

Softwarecollections.png

Is this article helpful to you?
Please consider donating or volunteering
Thank you!

About

For certain applications, more recent versions of some software components are often needed in order to use their latest new features. Software Collections provides a set of dynamic programming languages, database servers, and various related packages that are either more recent than their equivalent versions included in the base SME Server 9.x system. Software Collections is only available for SME Server 9.x 64-bit


Installation

The Software Collections (scl) packages can be installed by issuing the following command:

yum install scl-utils

This will only install the scl 'environment'. For installation of the individual applications, please see below.


Enable scl repositories

To be able to install a specific scl application, one must enable the one of the Software Collections Repositories based on the required application. See the Software Collections Repositories page on how to enable the desired repository.


Installation of a collection

To be able to install an application from the Software Collections, one must enable the respective application repo. As an example, enable the scl-php54 repo and to list all available versions the following command can be used:

yum list available \* --disablerepo=* --enablerepo=scl-php54


php54 will be listed, and to install that version:

 yum install php54 --enablerepo=scl-php54

Please see the specific application sections below on detailed installation instructions.


You can verify installed Software Collections by issuing:

scl -l


Collections will be installed in:

/opt/rh

as defined by the collection packager and noted here:

/etc/scl/prefixes

The one that build the software collection (called a provider) can tag his collections with a provider name. In the above case in '/opt/rh', the provider is Redhat. For SME Server this could be '/opt/sme' or personal collections e.g. '/opt/stephdl'

The /opt is the highly recommended installation location. However, in the case of SME Server, considerations to install in a different location could be considered regarding default backups etc. e.g. '/home/e-smith/files/scl/sme'.

For more information on running applications and other options please see the Software Collections Documentation

Software Collections applications

Important.png Note:
Please note that this is still a work in progress. Each individual application will store it's data into their own environment/directory, which by default will NOT be backed up by SME Server. This is being worked on.


Please see the individual application articles:

Available articles
Mysql57
PHP Software Collections
Software Collections
Software Collections Repositories
Software Collections:MariaDB
Software Collections:MongoDB
Software Collections:MySQL
Software Collections:MySQL55
Software Collections:Nodejs
Software Collections:PHP
Software Collections:PostgreSQL
Software Collections:Python
Software Collections:Ruby on Rails

Building your own software collections

Please consider building your collection on non production systems only. For a full reference please refer to the developers manual here.


To be able to build your own software collection, an extra scl package has to be installed:

yum install scl-utils-build --enablerepo=scl


Contrib development

Development of a contrib for SCL PHP specifically is under way. Currently it is in (pre) Alpha stage. You can read more about it on the forums

References

  1. Software Collections website
  2. SRPM of RHSCL6
  3. Release Notes & Documentation


Other articles in this category

Mysql57, PHP Software Collections, Software Collections, Software Collections Repositories, Software Collections:MariaDB, Software Collections:MongoDB, Software Collections:MySQL, Software Collections:MySQL55, Software Collections:Nodejs, Software Collections:PHP, Software Collections:PostgreSQL, Software Collections:Python, Software Collections:Ruby on Rails