With Software Collections, it is possible to build and concurrently install multiple versions of the same RPM packages on a system. Software Collections have no impact on the system versions of the packages installed by the conventional RPM package manager.
General usage of the scl tool can be described using the following syntax:
scl <action> [<collection1> <collection2> ...] <command>
<action> is a script name to execute in a bash environment before the application itself takes in executed.
<command> is an arbitrary command or set of commands to execute within the Software Collection environment enabled. Control is returned back to the caller with the original environment as soon as the command finishes.
scl {-l|--list}
Lists all installed Software Collections on the system. If a collection name is specified then list of installed packages belonging to the collection is listed.
Example - Running an Application Directly
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'
Example - 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.
Example - Running Commands Stored in a File
To execute a number of commands, which are stored in a file, in the Software Collections environment, run the following command:
cat cmd | scl enable software_collection_1 -
The above command executes commands, which are stored in the cmd file, in the environment of the Software Collection named software_collection_1.