Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      Developer Sandbox
      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

Software Collections on Red Hat Enterprise Linux

January 28, 2013
Marcela Maslanova
Related topics:
Linux
Related products:
Red Hat Enterprise Linux

Share:

    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/:

    cd /etc/yum.repos.d/

    For Ruby 1.9.3 with Rails run:

    wget http://people.redhat.com/bkabrda/scl_ruby193.repo

    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.

    Last updated: November 2, 2023

    Recent Posts

    • How to use RHEL 10 as a WSL Podman machine

    • MINC: Fast, local Kubernetes with Podman Desktop & MicroShift

    • How to stay informed with Red Hat status notifications

    • Getting started with RHEL on WSL

    • llm-d: Kubernetes-native distributed inferencing

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue