Red Hat Software Collections
Introduction and Prerequisites
In this tutorial, you will set your system up to install software from Red Hat Software Collections (RHSCL), which provides the latest development technologies for Red Hat Enterprise Linux. Then, you will install Node.js v10 and run a simple “Hello, World” application. The whole tutorial should take less than 10 minutes to complete.
Before you begin, you will need a current Red Hat Enterprise Linux 7 (or RHEL 6) server or workstation subscription that allows you to download software and get updates from Red Hat. Developers can get a no-cost Red Hat Enterprise Linux Developer Suite subscription for development purposes by registering and downloading through developers.redhat.com.
If you need help, see Troubleshooting and FAQ.
Want to know more about Software Collections?developers.redhat.com.
Troubleshooting and FAQ
As a developer, how can I get a Red Hat Enterprise Linux subscription that includes Red Hat Software Collections?
Developers can get a no-cost Red Hat Enterprise Linux Developer Suite subscription for development purposes by registering and downloading through developers.redhat.com. We recommend you follow our Getting Started Guide which covers downloading and installing Red Hat Enterprise Linux on a physical system or virtual machine (VM) using your choice of VirtualBox, VMware, Microsoft Hyper-V, or Linux KVM/Libvirt. For more information, see Frequently asked questions: no-cost Red Hat Enterprise Linux Developer Suite.
I can’t find the RHSCL repository on my system.
Some Red Hat Enterprise Linux subscriptions do not include access to RHSCL. For a list of what subscriptions include RHSCL see How to use Red Hat Software Collections (RHSCL) or Red Hat Developer Toolset (DTS).
The name of the RHSCL repository depends on whether you have a server or workstation version of Red Hat Enterprise Linux installed. You can use
subscription-managerto view the available software repositories and verify that you have access to RHSCL:
$ su - # subscription-manager repos --list | egrep rhscl
How often are RHSCL packages updated?
What is the support lifecycle for packages in RHSCL?
Generally, a new release of RHSCL occurs annually. Many of the packages in RHSCL are supported for two or three years. See Red Hat Software Collections Product Life Cycle.
Can I use RHSCL packages in containers?
Yes, many of the RHSCL packages are available as docker-formatted container images from the Red Hat Container Registry. Get started guides for building your first container are available on developers.redhat.com.
Dockerfilesused to build RHSCL container images are available for you to use in building custom container images. See the Packaging Guide for more information.
Can I build my own packages that use the scl mechanisms to manage multiple versions?
Yes. See the RHSCL Packaging Guide for information on building your own software collections. The packaging guide is recommended for developers who want a more complete understanding of how software collections work.
Is there an open-source community for software collections?
How can I contribute or get involved with software collections?
The open source community that is the upstream for RHSCL can be found at softwarecollections.org, also known as SCLo. You can connect with other developers, create and host new collections for your projects on the SCLo site. There is also a Software Collections Special Interest Group (SIG) under the CentOS project.
Note: While SCLo may be the source for many RHSCL packages, only the packages in RHSCL are supported by Red Hat.
When I run
yum install rh-nodejs10, it fails due to a missing dependency.
Some RHSCL collections require packages that are in the optional RPMs repository, which is not enabled by default. See Step1 above for how to enable both the optional RPMs and RHSCL repositories.
How can I find out what RHSCL collections are installed?
scl --listwill show the list of collections that have been installed, whether they are enabled or not.
$ scl --list rh-nodejs10
How do I find out if there is a newer version of Node.js in RHSCL?
How do I find out what version of Node.js is available in the current RHSCL?
I have the RHSCL repository enabled, but I can’t find the Node.js version listed in this tutorial.
Use the following command to find packages with matching names:
# yum list available rh-nodejs\*
Note: some older collections do not use the
rh-prefix. To find them omit the
rh-prefix or replace it with an escaped wild card
I’ve installed rh-nodejs8 from RHSCL, but
nodeis not in my path.
I can’t find the
RHSCL does not alter the system path. You need to use
scl enableto change the environment for your session:
$ scl enable rh-nodejs10 bash
For more information see the Red Hat Software Collection documentation.
When I try to run
node, I get an error about a missing shared library.
This is due to not having run
scl enablefirst. When
scl enableruns, in addition to setting up the command search PATH, it also sets up the search path for shared libraries, LD_LIBRARY_PATH.
How do I uninstall RHSCL packages and any dependencies?
Most of the collections have a
-runtimemeta-package that causes the main package and any dependencies to be installed. Uninstalling the
-runtimepackage will cause the dependent packages that are no longer needed to be removed.
# yum uninstall rh-nodejs10-runtime
How do I use interpreters from RHSCL in “shebang” (#!) lines?
With the current version of the scl-utils package it is now possible to use Python, PHP, Node.JS and Perl interpreters from a “#!” line, using the following syntax (or equivalent):
#!/usr/bin/scl enable rh-python36 -- python ...
(This feature does not currently work for Ruby interpreters.)
Build Something Today
Let's walk through everything you need to build your first application.Download