Chapter 2. Installation and Usage
2.1. Getting Access to Red Hat Software Collections
Important
2.1.1. Using Red Hat Subscription Management
- Display a list of all subscriptions that are available for your system and determine the pool ID of a subscription that provides Red Hat Software Collections. To do so, type the following at a shell prompt as
root:subscription-manager list --availableFor each available subscription, this command displays its name, unique identifier, expiration date, and other details related to it. The pool ID is listed on a line beginning withPool Id. - Attach the appropriate subscription to your system by running the following command as
root:subscription-manager subscribe --pool=pool_idReplace pool_id with the pool ID you determined in the previous step. To verify the list of subscriptions your system has currently attached, run asroot:subscription-manager list --consumed - Display the list of available Yum list repositories to retrieve repository metadata and determine the exact name of the Red Hat Software Collections repositories. As
root, type:yum repolist allThe repository names depend on the specific version of Red Hat Enterprise Linux you are using and are in the following format:rhel-variant-rhscl-6-rpms rhel-variant-rhscl-6-debug-rpms rhel-variant-rhscl-6-source-rpms rhel-server-rhscl-6-eus-rpms rhel-server-rhscl-6-eus-source-rpms rhel-server-rhscl-6-eus-debug-rpms rhel-variant-rhscl-7-rpms rhel-variant-rhscl-7-debug-rpms rhel-variant-rhscl-7-source-rpms
Replace variant with the Red Hat Enterprise Linux system variant, that is,serverorworkstation. Note that Red Hat Software Collections is supported neither on theClientnor on theComputeNodevariant. - Enable the appropriate repository by running the following command as
root:yum-config-manager --enable repository
2.1.2. Using RHN Classic
- Display a list of all channels that are available to you and determine the exact name of the Red Hat Software Collections channel. To do so, type the following at a shell prompt as
root:rhn-channel --available-channelsThe name of the channel depends on the specific version of Red Hat Enterprise Linux you are using and is in the following format, where variant is the Red Hat Enterprise Linux system variant (serverorworkstation):rhel-x86_64-variant-6-rhscl-1 rhel-x86_64-server-6.3.z-rhscl-1 rhel-x86_64-server-6.4.z-rhscl-1 rhel-x86_64-server-6.5.z-rhscl-1 rhel-x86_64-variant-7-rhscl-1
Note that Red Hat Enterprise Linux 7 channels are accessible only through Red Hat Satellite instances. - Subscribe the system to the Red Hat Software Collections channel by running the following command as
root:rhn-channel --add --channel=channel_nameReplace channel_name with the name you determined in the previous step. - Verify the list of channels you are subscribed to. As
root, type:rhn-channel --list
2.2. Installing Red Hat Software Collections
Important
Optional channel to be enabled in order to complete the full installation of these packages:
- The php54-php-imap and php55-php-imap packages require the libc-client package from the Optional channel.
- The php54-php-recode and php55-php-recode packages require the recode package from the Optional channel.
- The perl516-perl-devel package requires the gdbm-devel package from the Optional channel.
- The mariadb55-mariadb-bench package requires the perl-GD package from the Optional channel.
Optional channel are required:
- The Node.js Software Collection depends on the nodejs010-nodejs-devel package, which requires the c-ares-devel package from the Optional channel (applicable to minimal install).
- The httpd24-mod_ldap package requires the apr-util-ldap package from the Optional channel.
- The php54-php-pspell and php55-php-pspell packages require the aspell package from the Optional channel.
- The python27-python-debug package requires the tix package from the Optional channel.
- The thermostat1-thermostat package requires the apache-commons-beanutils, jansi, hawtjni, jansi-native, and objectweb-asm packages from the Optional channel (applicable to minimal install).
- The thermostat1-thermostat-webapp package requires the felix-framework package from the Optional channel (applicable to minimal install).
- The thermostat1-netty package requires the jzlib package from the Optional channel (applicable to minimal install).
- The apache-commons-logging package requires the xerces-j2 package from the Optional channel (applicable to minimal install).
Important
Important
2.2.1. Installing Individual Software Collections
root:
yum install software_collection...root:
~]# yum install php54 mariadb552.2.2. Installing Optional Packages
yum list available software_collection-\*root:
yum install package_name...~]# yum install perl516-perl-CPAN perl516-perl-Archive-Tar2.2.3. Installing Debugging Information
root:
debuginfo-install package_name~]# debuginfo-install ruby193-rubyrhel-variant-rhscl-6-debug-rpms repository as described in Section 2.1.1, “Using Red Hat Subscription Management”. If your system is registered with RHN Classic, subscribe the system to the rhel-x86_64-variant-6-rhscl-1-debuginfo channel as described in Section 2.1.2, “Using RHN Classic”. For more information on how to get access to debuginfo packages, see https://access.redhat.com/site/solutions/9907.
2.3. Uninstalling Red Hat Software Collections
root:
yum remove software_collection\*2.4. Rebuilding Red Hat Software Collections
rpmbuild --define 'scl foo' command, you first need to rebuild the metapackage, which provides the <collection>-build package.
2.5. Using Red Hat Software Collections
2.5.1. Running an Executable from a Software Collection
scl enable software_collection... 'command...'scl enable software_collection... -- command...hello.pl with the Perl interpreter from the perl516 Software Collection, type:
~]$ scl enable perl516 'perl hello.pl'
Hello, World!scl utility, causing it to be run with the executables from a selected Software Collection in preference to their possible Red Hat Enterprise Linux system equivalents. For a complete list of Software Collections that are distributed with Red Hat Software Collections, see Table 1.1, “Red Hat Software Collections 1.1 Components”.
2.5.2. Running a Shell Session with a Software Collection as Default
scl enable software_collection... bash~]$ scl enable python27 postgresql92 bash$X_SCLS environment variable, for instance:
~]$ echo $X_SCLS
python27 postgresql922.5.3. Running a System Service from a Software Collection
/etc/rc.d/init.d/ directory. To start such a service in the current session, type the following at a shell prompt as root:
service software_collection-service_name startroot:
chkconfig software_collection-service_name onpostgresql service from the postgresql92 Software Collection and enable it in runlevels 2, 3, 4, and 5, type as root:
~]#service postgresql92-postgresql startStarting postgresql92-postgresql service: [ OK ] ~]#chkconfig postgresql92-postgresql on
2.6. Accessing a Manual Page from a Software Collection
/opt/rh directory.
scl enable software_collection 'man software_collection'~]$ scl enable mariadb55 "man mariadb55"2.7. Deploying Applications That Use Red Hat Software Collections
- Install all required Software Collections and packages manually and then deploy your application, or
- Create a new Software Collection for your application and specify all required Software Collections and other packages as dependencies.
2.8. Migrating from MySQL 5.1 to MySQL 5.5
2.8.1. Notable Differences Between MySQL 5.1 and MySQL 5.5
- Starting with MySQL 5.5, the InnoDB storage engine (formerly known as InnoDB Plugin) is the default storage engine.
- InnoDB and some other plug-ins (for example, archive, blackhole and federated) were installable plug-ins in MySQL 5.1. Starting with MySQL 5.5, these plug-ins became compiled-in storage engines, that is, they cannot be installed or uninstalled by default.
- If you used InnoDB Plugin and it was loaded using the
plugin-load=innodb=ha_innodb_plugin.soconfiguration option, you need to remove this configuration option as it does not work in MySQL 5.5. - In MySQL 5.1, InnoDB Plugin included a configuration variable
innodb_file_io_threads. However, this variable does not exist in MySQL 5.5; new variables,innodb_read_io_threadsandinnodb_write_io_threads, are used instead. To ensure proper functionality, either remove the former variable from the configuration file or replace it with the current variables. - When upgrading from MySQL 5.1 to MySQL 5.5 using the in-place upgrading method, the
mysql.proxies_privtable will not exist. To create the missing table, the mysql_upgrade utility has to be run as soon as the new daemon is started. - MySQL 5.5 uses latin1 for the
stopwordfile if thecharacter_set_servervariable is ucs2, utf16 or utf32. Thus, if the table uses FULLTEXT indexes in these cases, users should repair the table using theREPAIR TABLE table_name QUICK. - MySQL 5.1 used the
languagevariable for specifying the directory which included the error message file. This option is now deprecated and has been replaced by thelc_messages_dirandlc_messagesoptions. This also applies for configuration options. Also, error messages no longer contain mixed set of character sets and error messages are returned in the set following thecharacter_set_resultssystem variable instead. That is, some error messages can be different in MySQL 5.5.
Important
2.8.2. Upgrading from MySQL 5.1 to MySQL 5.5
- In the first scenario, the whole dump of all databases from one database is generated, mysql is run with the dump file as an input, using mysqlimport or the
LOAD DATA INFILESQL command within the other database. At the same time, the appropriate daemons have to be running during both dumping and restoring. You can use the--all-databasesoption in the mysqldump call to include all databases in the dump. The--routines,--triggersand--eventsoptions can also be used if needed. - During the in-place upgrade, the data files are copied from one database directory to another database directory. The daemons should not be running at the time of copying. Set the appropriate permissions and SELinux context for copied files.
mysql_upgrade command. Running mysql_upgrade is necessary to check and repair internal tables.
Important
mysql_upgrade script, should be run inside the scl enable environment.
root user has a non-empty password defined (it should have it defined), it is necessary to call the mysql_upgrade utility with the -p option and specify the password.
my.cnf file to reflect the environment.
Example 2.1. Dump and Restore Upgrade
~]#service mysqld startStarting mysqld: [ OK ] ~]#mysqldump --all-databases --routines --events > dump.sql~]#service mysqld stopStopping mysqld: [ OK ] ~]#service mysql55-mysqld startStarting mysql55-mysqld: [ OK ] ~]#scl enable mysql55 'mysql' < dump.sql~]#scl enable mysql55 'mysql_upgrade -u root -p'Enter password: Looking for 'mysql' as: mysql Looking for 'mysqlcheck' as: mysqlcheck Running 'mysqlcheck with default connection arguments Running 'mysqlcheck with default connection arguments a.t1 OK mysql.columns_priv OK <skipped tables list> mysql.user OK Running 'mysql_fix_privilege_tables'... OK
Example 2.2. In-place Upgrade
~]#service mysqld stopStopping mysqld: [ OK ] ~]#service mysql55-mysqld stopStopping mysql55-mysqld: [ OK ] ~]#rm -rf /opt/rh/mysql55/root/var/lib/mysql/~]#cp -r /var/lib/mysql/ /opt/rh/mysql55/root/var/lib/~]#chown -R mysql:mysql /opt/rh/mysql55/root/var/lib/mysql/~]#restorecon -R /opt/rh/mysql55/root/var/lib/mysql/~]#service mysql55-mysqld startStarting mysql55-mysqld: [ OK ] ~]#scl enable mysql55 'mysql_upgrade -u root -p'Enter password: Looking for 'mysql' as: mysql Looking for 'mysqlcheck' as: mysqlcheck Running 'mysqlcheck with default connection arguments Running 'mysqlcheck with default connection arguments a.t1 OK mysql.columns_priv OK <skipped tables list> mysql.user OK Running 'mysql_fix_privilege_tables'... OK
Important
- The mariadb55 component name should be used instead of the mysql55, so replace all occurrences of
mysql55withmariadb55. - The
systemdunit name for MariaDB 5.5. ismariadb55-mariadbin Red Hat Enterprise Linux 7, while theSysVunit script for MariaDB 5.5 is calledmariadb55-mysqldin Red Hat Enterprise Linux 6.
2.8.3. Using the mysql55-mysql-devel Package
2.8.3.1. Using Database Connectors for Dynamic Languages
Important
mysqlnd driver will not be able to connect to the database. This is because the old_password setting in the /etc/my.cnf file is turned off by default on Red Hat Enterprise Linux 6 while it is enabled on Red Hat Enterprise Linux 5. To work around this problem, set old_password to 0, restart the MariaDB or MySQL service and set a new password for each user.
2.8.3.2. Building Applications for MySQL 5.5 from Red Hat Software Collections
scl enable mysql55 '...' call.
2.9. Migrating from PostgreSQL 8.4 to PostgreSQL 9.2
2.9.1. Notable Differences Between PostgreSQL 8.4 and PostgreSQL 9.2
- The following server configuration parameters have been removed and are no longer supported:
add_missing_from,regex_flavor,silent_mode,wal_sender_delay, andcustom_variable_classes. Do not use any of these parameters in the new configuration file. - The
unix_socket_directoryparameter has been renamed tounix_socket_directoriesand can now be used to specify more than one UNIX socket to listen on. To do so, provide a list of comma-separated directories as the value of this option. The default value remains unchanged and is/tmp. - New configuration parameters
ssl_ca_file,ssl_cert_file,ssl_crl_file, andssl_key_filehave been added. These configuration parameters can be used to specify the locations of server-side SSL files that were previously hard-coded as relative paths to theroot.crt,server.crt,root.crl, andserver.keyfiles in the data directory.Note that the PostgreSQL server no longer reads theroot.crtandroot.crlfiles by default. To load these files, change the corresponding parameters to non-default values. - The
=>operator has been removed and users are now advised to use thehstore(text, text)function. - The default value of the
standard_conforming_stringsconfiguration parameter is nowon. This configuration parameter controls if ordinary string literals (strings enclosed in single quotes) treat backslashes literally as specified in the SQL standard. - A new configuration parameter,
backslash_quote, has been added. This configuration parameter can be used to control whether a single quotation mark can be represented by\'in string literals. The default value issafe_encoding, which permits the use of\'only when the client encoding does not allow ASCII backslashes in multi-byte characters. As a consequence,\'can now be interpreted differently only in specific cases and only in string literals that do not conform to standards, including escape string syntax,E'value'. - PostgreSQL 9.0 introduced access privileges for large objects. Consequently, a new configuration parameter,
lo_compat_privileges, has been added to allow you to disable security checks related to the large objects affected by this change. To disable these security checks, change the value of this configuration parameter toon. The default value isoff.
2.9.2. Upgrading from PostgreSQL 8.4 to PostgreSQL 9.2
Important
/var/lib/pgsql/data/ directory.
Procedure 2.1. Performing In-place Upgrade
- Stop the old PostgreSQL server to ensure that the data is not in an inconsistent state. To do so, type the following at a shell prompt as
root:service postgresql stopTo verify that the server is not running, type:service postgresql status - Verify that the new data directory located in
/opt/rh/postgresql92/root/var/lib/pgsql/data/does not exist:file /opt/rh/postgresql92/root/var/lib/pgsql/data/If you are running a fresh installation of PostgreSQL 9.2, this directory should not be present in your system. If it is, back it up by running the following command asroot:mv /opt/rh/postgresql92/root/var/lib/pgsql/data{,-scl-backup} - Copy the old database data to the new location by typing the following at a shell prompt as
root:cp -ra /var/lib/pgsql/data/ /opt/rh/postgresql92/root/var/lib/pgsql/ - Open the
/opt/rh/postgresql92/root/var/lib/pgsql/data/pg_hba.confconfiguration file and verify that thepostgresuser is allowed to connect to the PostgreSQL server fromlocalhostwithout a password. If not, you can edit this file and temporarily set the authentication method for thepostgresuser totrustorident. For a detailed description of thepg_hba.conffile and a complete list of available configuration options, see the official documentation. - Upgrade the database data for the new server by running the following command as
root:service postgresql92-postgresql upgradeIt is recommended that you read the resulting/opt/rh/postgresql92/root/var/lib/pgsql/pgupgrade.loglog file to see if there were any problems with the upgrade. - Start the new server as
root:service postgresql92-postgresql startIt is also advised that you run theanalyze_new_cluster.shscript as follows:su - postgres -c 'scl enable postgresql92 ~/analyze_new_cluster.sh' - Optionally, you can configure the PostgreSQL 9.2 server to start automatically at boot time. To disable the old PostgreSQL 8.4 server, run the following command as
root:chkconfig postgresql offTo enable the PostgreSQL 9.2 server, type asroot:chkconfig postgresql92-postgresql on
Procedure 2.2. Performing a Dump and Restore Upgrade
- Ensure that the old PostgreSQL server is running by typing the following at a shell prompt as
root:service postgresql start - Dump all data in the PostgreSQL database into a script file. As
root, type:su - postgres -c 'pg_dumpall > ~/pgdump_file.sql' - Stop the old server by running the following command as
root:service postgresql stop - Initialize the data directory for the new server as
root:service postgresql92-postgresql initdb - Start the new server as
root:service postgresql92-postgresql start - Import data from the previously created SQL file:
su - postgres -c 'scl enable postgresql92 "psql -f ~/pgdump_file.sql postgres"' - Optionally, you can configure the PostgreSQL 9.2 server to start automatically at boot time. To disable the old PostgreSQL 8.4 server, run the following command as
root:chkconfig postgresql offTo enable the PostgreSQL 9.2 server, type asroot:chkconfig postgresql92-postgresql on - If your configuration differs from the default one, make sure to update configuration files, especially the
/opt/rh/postgresql92/root/var/lib/pgsql/data/pg_hba.confconfiguration file. Otherwise only thepostgresuser will be allowed to access the database.
2.10. Reporting Bugs in Red Hat Software Collections
- Navigate to Bugzilla, the Red Hat bug-tracking system. Note that you need to be logged in, or you will be prompted to do so.
- On the top bar, click on and on the next page, choose . This brings you to a page with a list of Red Hat Products.
- Click on , which brings you to this form.
- Fill in the relevant fields.
- (a required field): a package name without a prefix.
- (a required field):
RHSCL-1-software_collection - (a required field).
- : this field provides a simple template which can help you describe the bug. It is important to provide as much information about the problem as possible.
- Optionally, you can add an attachment, which can be a screenshot of the problem, a patch, or similar.
- Once you have completed your bug report, press the button. Your report will be assigned a Bugzilla number so you can get back to it later.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.