Thursday, September 3, 2015

Enabling Software Support for Linux

Enabling Software Support for Linux

To enable support for Software Collections on your system so that you can enable and build Software Collections, you need to have installed the packages scl-utils and scl-utils-build.
If the packages scl-utils and scl-utils-build are not already installed on your system, you can install them by typing the following at a shell prompt as root:
# yum install scl-utils scl-utils-build
The scl-utils package provides the scl tool that lets you enable Software Collections on your system. For more information on enabling Software Collections, see Section 1.6, “Enabling a Software Collection”.
The scl-utils-build package provides macros that are essential for building Software Collections. For more information on building Software Collections,

Installing a Software Collection

To ensure that a Software Collection is on your system, install the so-called metapackage of the Software Collection. Thanks to Software Collections being fully compatible with the RPM Package Manager, you can use conventional tools like Yum or PackageKit for this task.
For example, to install a Software Collection with the metapackage named software_collection_1, run the following command:
# yum install software_collection_1
This command will automatically install all the packages in the Software Collection that are essential for the user to perform most common tasks with the Software Collection.
Software Collections allow you to only install a subset of packages you intend to use. For example, to use the Ruby interpreter from the rh-ruby22 Software Collection, you only need to install a package rh-ruby22-ruby from that Software Collection.
If you install an application that depends on a Software Collection, that Software Collection will be installed along with the rest of the application's dependencies.

Listing Installed Software Collections

To get a list of Software Collections that are installed on the system, run the following command:
 scl --list 
To get a list of installed packages contained within a specified Software Collection, run the following command:
 scl --list software_collection_1 

 Enabling a Software Collection  

The scl tool is used to enable a Software Collection and to run applications in the Software Collection environment.
General usage of the scl tool can be described using the following syntax:
 scl action software_collection_1 software_collection_2 command 
If you are running a command with multiple arguments, remember to enclose the command and its arguments in quotes:
 scl action software_collection_1 software_collection_2 'command --argument' 
Alternatively, use a -- command separator to run a command with multiple arguments:
 scl action software_collection_1 software_collection_2 -- command --argument 

Running an Application Directly

For example, to directly run Perl with the --version option in the Software Collection named software_collection_1, execute the following command:
 scl enable software_collection_1 'perl --version' 
Alternatively, you can create a wrapper script that shortens the commands for running applications in the Software Collection environment.

Running a Shell with Multiple Software Collections Enabled

To run the Bash shell in the environment with multiple Software Collections enabled, execute the following command:
 scl enable software_collection_1 software_collection_2 bash 
The command above enables two Software Collections, named software_collection_1 and software_collection_2.

Listing Enabled Software Collections

To get a list of Software Collections that are enabled in the current session, print the $X_SCLS environment variable by running the following command:
echo $X_SCLS 
  • Uninstalling a Software Collection

    You can use conventional tools like Yum or PackageKit when uninstalling a Software Collection because Software Collections are fully compatible with the RPM Package Manager. For example, to uninstall all packages and subpackages that are part of a Software Collection named software_collection_1, run the following command:
     yum remove software_collection_1\* 
    You can also use the yum remove command to remove the scl utility.


No comments:

Post a Comment