Did you ever wish you had newer versions of the software on your Red Hat Enterprise Linux machines? You are probably not alone. Providing new versions of software in rpm is hard, because rpm supports only one version installed on your computer at a time. Multiple versions on one machine can conflict with each other or create unpredictable behaviour in applications that you might not have considered dependencies.
Last year, we developed Software Collections to allow you to install newer versions of software in rpm safely into /opt and switch between new and old releases. This allows your Red Hat Enterprise Linux system applications to continue to run with the old version, while new apps can work with the new version. A good example of this is Python; many essential packages are written in Python. How can you update to the latest release of Python without causing half your system to break? Through Software Collections, you can install a newer version of Python – for example python-3.3 – into /opt avoiding conflicts in files and strange behaviour of apps that depend on an older version of Python.
I have multiple collections on my RHEL-6 machine for testing purposes. Let’s see all of them:
[root@rhel-6-marcela ~]# scl -l perl514 perl516 python33 ruby193
How can you install those collections?
These collections are located as testing repositories on various “people pages.” You can add their repository into your /etc/yum.repos.d/:
For Ruby 1.9.3 with Rails run:
Install the whole collection by:
yum install ruby193
You can do the same for Python-3.3 or Python-2.7, PHP-5.4, and databases (postgresql,mysql). Updated links and documentation are on the home page of Software Collections. It’s possible to execute a single command with the collection version of the software. As a Perl programmer, I will show you Perl. Let’s look if the collection version is really going to be used:
[root@rhel-6-marcela ~]# scl enable perl514 'perl -V' Summary of my perl5 (revision 5 version 14 subversion 2) configuration: ...
I can enable the collection of new software in one shell session and work with it there:
[root@rhel-6-marcela ~]# scl enable perl514 bash
Now, I can use the features of perl-5.14. However, this does not get us the modules or gems for your preferred language. Modules (or gems) installed into standard paths like /usr/lib won’t be used, because they are built with an older version. All prepared collections contain some basic modules, but not everything can be packaged. Users will have to install the rest of the modules by the normal package tool (cpan, rubygem, easy_install, …) or create their own rpms.
Let’s install the pip module for Python by using easy_install:
[root@rhel-6-marcela ~]# scl enable python32 bash [root@rhel-6-marcela ~]# easy_install pip Searching for pip ... Installed /opt/rh/python32/root/usr/lib/python3.2/site-packages/pip-1.2.1-py3.2.egg Processing dependencies for pip Finished processing dependencies for pip
Check whether the module is installed into collections file space:
[root@rhel-6-marcela ~]# which pip /opt/rh/python32/root/usr/bin/pip
Why would you want multiple versions on one system?
Some use Software Collections to develop applications using new releases of their favourite software on a current, stable Red Hat Enterprise Linux system. Others use them to port their apps from an old release to the latest version to take advantage of new features (for example, new features are being added to Rails frequently).
There are also developers who want to port their applications first on a prehistoric system like RHL-8 and then move to something like RHEL-5 or RHEL-6. For example THEY port their apps written in perl-5.8.0 to perl-5.16.2 and then move their app to a newer system. The Perl collection will be the same on both systems, so it can work on both systems and benefit from an improved operating system.
You could also have the same application running on the same release of software on multiple Red Hat Enterprise Linux releases. It’s even possible to package older versions of the software, though we expect this will be a limited use case.
Software Collections provides you with the flexibility to run multiple versions of apps on the same instance of Red Hat Enterprise Linux. This allows you to retain the production stability of Red Hat Enterprise Linux while you adopt newer innovations as part of your development efforts.
Red Hat Software Collections or Red Hat Developer Toolset are part of most Red Hat Enterprise Linux subscriptions and all RHEL Developer Subscriptions. They can be found in the Software Collections channel. For more information about Red Hat Software Collections or Red Hat Developer Toolset, visit https://access.redhat.com/products/Red_Hat_Enterprise_Linux/Developer/.
Be sure to join developers.redhat.com which lets you get Red Hat software for your software development. Both the program and software are free!