Dies ist eine alte Version des Dokuments!
Inhaltsverzeichnis
SCLO (Software Collections)
Software Collections gibt Ihnen die Möglichkeit, Software zu erstellen, zu installieren und zu nutzen und mehrere Versionen der gleichen Software auf dem gleichen System zu betreiben, ohne das dies sich auf die systemweit installierte Pakete auswirkt.
Nachfolgend soll am Beispiel von Software-Paketen die Installation über die Software Collections (SCLO) veranschaulicht werden.
Installation
Zur Installation des einer wird nachfolgendes Paket benötigt:
installiert werden.
Mit nachfolgendem Befehl, wird das Pakete centos-release-scl
installiert:
# yum install centos-release-scl Loaded plugins: changelog, priorities 266 packages excluded due to repository priority protections Resolving Dependencies --> Running transaction check ---> Package centos-release-scl.noarch 0:2-2.el7.centos will be installed --> Processing Dependency: centos-release-scl-rh for package: centos-release-scl-2-2.el7.centos.noarch --> Running transaction check ---> Package centos-release-scl-rh.noarch 0:2-2.el7.centos will be installed --> Finished Dependency Resolution Changes in packages about to be updated: Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: centos-release-scl noarch 2-2.el7.centos extras 12 k Installing for dependencies: centos-release-scl-rh noarch 2-2.el7.centos extras 12 k Transaction Summary ================================================================================ Install 1 Package (+1 Dependent package) Total download size: 24 k Installed size: 39 k Is this ok [y/d/N]: y Downloading packages: (1/2): centos-release-scl-2-2.el7.centos.noarch.rpm | 12 kB 00:00 (2/2): centos-release-scl-rh-2-2.el7.centos.noarch.rpm | 12 kB 00:00 -------------------------------------------------------------------------------- Total 115 kB/s | 24 kB 00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : centos-release-scl-rh-2-2.el7.centos.noarch 1/2 Installing : centos-release-scl-2-2.el7.centos.noarch 2/2 Verifying : centos-release-scl-rh-2-2.el7.centos.noarch 1/2 Verifying : centos-release-scl-2-2.el7.centos.noarch 2/2 Installed: centos-release-scl.noarch 0:2-2.el7.centos Dependency Installed: centos-release-scl-rh.noarch 0:2-2.el7.centos Complete!
Mit nachfolgendem Befehl kann überprüft werden, welche Inhalte mit den Paket centos-release-scl
installiert wurden.
# rpm -qil centos-release-scl Name : centos-release-scl Version : 2 Release : 2.el7.centos Architecture: noarch Install Date: Wed 29 Nov 2017 08:51:31 AM CET Group : Unspecified Size : 19960 License : GPLv2 Signature : RSA/SHA256, Mon 23 May 2016 05:47:26 PM CEST, Key ID 24c6a8a7f4a80eb5 Source RPM : centos-release-scl-2-2.el7.centos.src.rpm Build Date : Mon 23 May 2016 05:26:58 PM CEST Build Host : worker1.bsys.centos.org Relocations : (not relocatable) Packager : CentOS BuildSystem <http://bugs.centos.org> Vendor : CentOS URL : http://wiki.centos.org/SpecialInterestGroup/SCLo Summary : Software collections from the CentOS SCLo SIG Description : yum Configs and basic docs for Software Collections as delivered via the CentOS SCLo SIG. /etc/pki/rpm-gpg /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo /etc/yum.repos.d/CentOS-SCLo-scl.repo /usr/share/doc/centos-release-scl/GPL
Mit nachfolgendem Befehl kann überprüft werden, welche Inhalte mit den Paket centos-release-scl-rh
installiert wurden.
# rpm -qil centos-release-scl-rh Name : centos-release-scl-rh Version : 2 Release : 2.el7.centos Architecture: noarch Install Date: Wed 29 Nov 2017 08:51:30 AM CET Group : Unspecified Size : 19936 License : GPLv2 Signature : RSA/SHA256, Mon 23 May 2016 05:47:29 PM CEST, Key ID 24c6a8a7f4a80eb5 Source RPM : centos-release-scl-rh-2-2.el7.centos.src.rpm Build Date : Mon 23 May 2016 05:26:59 PM CEST Build Host : worker1.bsys.centos.org Relocations : (not relocatable) Packager : CentOS BuildSystem <http://bugs.centos.org> Vendor : CentOS URL : http://wiki.centos.org/SpecialInterestGroup/SCLo Summary : Software collections from the CentOS SCLo SIG (upstream scl only) Description : yum Configs and basic docs for Software Collections as delivered via the CentOS SCLo SIG. /etc/pki/rpm-gpg /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo /usr/share/doc/centos-release-scl-rh/GPL
PHP 7.1: Installation
Zur Installation des einer wird nachfolgendes Paket benötigt:
installiert werden.
Mit nachfolgendem Befehl, wird das Pakete rh-php71
installiert:
# yum install rh-php71
Mit nachfolgendem Befehl kann überprüft werden, welche Inhalte mit den Paket rh-php71
installiert wurden.
# rpm -qil rh-php71
PHP 7.1: Konfiguration
Um vom Standard PHP zu PHP 7.1manuell zu wechseln, kann nachfolgender Befehl angewendet werden:
# scl enable rh-php70 bash
Welche PHP-Version aktuell (NUR in dieser shell
verwendet wird), kann mit nachfolgenden Befehlen überprüft werden:
# php -v
bzw.
# which php
ACHTUNG - Dies ist nach dem Neustart bzw. wechseln der shell
nicht mehr verfügbar!
/etc/profile.d/rh-php71.sh
Nachfolgende Konfigurationsdatei
/etc/profile.d/rh-php71.sh
bewirkt, dass direkt nach dem Start/Neustart der Server und PERMANENT PHP 7.1 zum Einsatz kommt und folgenden Inhalt haben sollte:
#!/bin/bash source /opt/rh/rh-php71/enable export X_SCLS="`scl enable rh-php71 'echo $X_SCLS'`"