此内容没有您所选择的语言版本。

3.5.2. Registering and Deregistering Software Collections


In case a Software Collection is shared over NFS but not locally installed on your system, you need to make the scl tool aware of it by registering that Software Collection.
Registering a Software Collection is done by running the scl register command:
$ scl register /opt/provider/software_collection
Copy to Clipboard Toggle word wrap
where /opt/provider/software_collection is the absolute path to the file system hierarchy of the Software Collection you want to register. The path's directory must contain the enable scriptlet and the root/ directory to be considered a valid Software Collection file system hierarchy.
Deregistering a Software Collection is a reverse operation that you perform when you no longer want the scl tool to be aware of a registered Software Collection.
Deregistering a Software Collection is done by calling a deregister scriptet when running the scl command:
$ scl deregister software_collection
Copy to Clipboard Toggle word wrap
where software_collection is the name of the Software Collection you want to deregister.
You can specify (de)register scriptlets in a Software Collection metapackage similarly to how enable scriptlets are specified. When specifying the scriptets, remember to explicitly include them in the %file section of the metapackage spec file.
See the following sample code for an example of specifying (de)register scriptets:
%install
%scl_install

cat >> %{buildroot}%{_scl_scripts}/enable << EOF
# Contents of the enable scriptlet goes here
...
EOF

cat >> %{buildroot}%{_scl_scripts}/register << EOF
# Contents of the register scriptlet goes here
...
EOF

cat >> %{buildroot}%{_scl_scripts}/deregister << EOF
# Contents of the deregister scriptlet goes here
...
EOF
...
%files runtime
%scl_files
%{_scl_scripts}/register
%{_scl_scripts}/deregister
Copy to Clipboard Toggle word wrap
In the register scriptlet, you can optionally specify the commands you want to run when registering the Software Collection, for example, commands to create files in /etc/opt/ or /var/opt/.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat