검색

이 콘텐츠는 선택한 언어로 제공되지 않습니다.

1.6. Enabling a Software Collection

download PDF
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 

Remember that:

  • When you run the scl tool, it creates a child process (subshell) of the current shell. Running the command again then creates a subshell of the subshell.
  • You can list enabled Software Collections for the current subshell. See Section 1.7, “Listing Enabled Software Collections” for more information.
  • You have to disable an enabled Software Collection first to be able to enable it again. To disable the Software Collection, exit the subshell created when enabling the Software Collections.
  • When using the scl tool to enable a Software Collection, you can only perform one action with the enabled Software Collection at a time. The enabled Software Collection must be disabled first before performing another action.

1.6.1. 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 provide a syspaths subpackage that makes it more convenient to run commands in the Software Collection environment. For more information on syspaths subpackages, see Section 3.3, “Providing syspaths Subpackages”.

1.6.2. 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.

1.6.3. Running Commands Stored in a File

To execute a number of commands, which are stored in a file, in the Software Collection environment, run the following command:
 cat cmd | scl enable software_collection_1 - 
The command above executes commands, which are stored in the cmd file, in the environment of the Software Collection named software_collection_1.
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.