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

Red Hat Software Collections: Why They're Awesome, and How to Use Them

August 19, 2016
Hemant Jain
Related topics:
Developer ToolsLinux
Related products:
Red Hat Enterprise Linux

Share:

    Red Hat Software Collections can make your life as a programmer or admin immensely easier.

    Like death, taxes and zombies, dealing with different versions of software is something you just can't avoid. It's a nasty but necessary fact of life.

    Traditionally, when developers and system admins grapple with this issue, they have to sacrifice something. If you want to run the latest and greatest version of a web app, it might not support users with outdated browsers. If you install the newest beta release of Python so you can test development code, it might break Python scripts written for older releases. If you have a system with multiple users, you might want a different version of Ruby over another. And so on.

    Software Collections provide a solution to conundrums like these. They let you have your cake and eat it, too.

    In other (more technical) words, Software Collections make it possible to have multiple versions of the same software on the same system. You use a simple tool to tell the system which version to activate as needed.

    If that sounds awesome, it is. Keep reading for a more detailed explanation of how Software Collections work, and an overview of using them on your Red Hat system.

    Software Collections: What They're Not

    If you are currently thinking that Software Collections sound too good to be true, you might be assuming they just use virtualization or containers to have multiple versions of the same software running on the same system. Anybody could install different versions of a program inside a virtual machine atop the same host, of course. That's not a big deal.

    Software Collections don't rely on virtualization, or entail any of the resource or administrative overhead of hypervisors. They keep things lean and mean, yet provide a level of version flexibility that you would otherwise only be able to get through virtualization.

    You might also be wondering whether Software Collections are just a weird hack that lets you install multiple versions of the same package. Technically, you could do something like this (and maybe you already do if you need multiple versions of Python or PHP on the system, for instance) by modifying installation scripts and system directories in strange ways to accommodate multiple releases of the same binaries. But Software Collections don't require that kind of dirty work.

    Software Collections also won’t break yum or dnf. They're designed to play nicely with the package manager and prevent conflicts between packages.

    Software Collections: What They Are

    So what actually makes Software Collections tick?

    Essentially, they're special RPM packages that can be installed on the system and activated as needed using a special interface. With this approach, they don't conflict with or overwrite software installed by any other RPM packages that are designed to run normally.

    You can build Software Collection RPMs yourself either locally or via COPR. This makes them a handy way of distributing apps to users who want to be able to switch between different versions of your software easily. It also simplifies the process of running multiple versions of the same app on your own systems for testing purposes.

    Using Software Collections

    If you just want to use Software Collections, though, you don't have to know much about building packages. You just need to enable the Software Collections repositories on your system, then download, install and activate whichever packages you want.

    To complete the first step on RHEL, run the </span><span style="font-weight:400;">subscription-manager-gui tool and use it to enable the </span><span style="font-weight:400;">rhel-server-rhscl-7-rpms and </span><span style="font-weight:400;">rhel-7-server-optional-rpms repositories. (If you don't see these repositories listed, they're likely not included in your RHEL subscription.)

    You could also do that from the CLI with:

    # subscription-manager repos --enable rhel-server-rhscl-7-rpms

    After this, you simply use yum to install whichever Software Collections package you wish from the repositories you enabled. For example, to install the package for MongoDB 2.6 (called rh-mongodb26), run:

    # yum install rh-mongodb26

    Lastly, you use the tool scl to activate your new package. For example, this command would activate the rh-mongodb26 package to run in a Bash terminal:

    # scl enable rh-mongodb26 bash

    That's all there is to it. Now, you can run the MongoDB 2.6 software you installed in a terminal just as you would a normal application, using a command like:

    # service rh-mongodb26-mongod start

    Of course, none of this will impact any other version of MongoDB that you have installed on your system. And that's the real beauty.

    Further Reading

    For all of the details on using Software Collections, you can check out the RHSCL documentation online. The RHSCL 2.2 Release Notes have a list of the collections available from Red Hat.

    One last tip: If you're wondering how to make Software Collections persist through reboots, here's your answer.

    Featured image source: harmonycentral.com

    About Hemant Jain

    Hemant Jain is the founder and owner of Rapidera Technologies, a full service software development shop. He and his team focus a lot on modern software delivery techniques and tools. Prior to Rapidera he managed large scale enterprise development projects at Autodesk and Deloitte.

     

    Editor's Note: developers.redhat.com has get started guides for Software Collections that take you up to "Hello, World" and answer some of the frequently asked questions.

    Last updated: November 1, 2023

    Recent Posts

    • How to run AI models in cloud development environments

    • How Trilio secures OpenShift virtual machines and containers

    • How to implement observability with Node.js and Llama Stack

    • How to encrypt RHEL images for Azure confidential VMs

    • How to manage RHEL virtual machines with Podman Desktop

    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