IUS Client Usage Guide


Summary

This document outlines the basic client side usage of IUS. For common questions regarding IUS please see the Frequently Asked Questions.


End User Agreement


Information on IUS Packages

The following explains a little bit behind how IUS packages are organized.

Package Categories

The packaging model of IUS is broken up into two package categories:


Package Types

IUS Packages will be one of two types: Conflicting or Parallel.


Unfortunately this layout leads to confusion, as there is nothing to signify which packages are conflicting/replacement packages and which can be installed side-by-side. Maybe one day we'll figure out a better schema.


Configuration

Client configuration can be automatically setup by installing the ius-release package, which also requires the epel-release package. Both packages can be found within the respective repo for your OS:


The following is an example, please note you may need to adjust the URLs for your system:

root@linuxbox ~]# wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/ius-release-1-2.ius.el5.noarch.rpm

root@linuxbox ~]# wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/epel-release-1-1.ius.el5.noarch.rpm

root@linuxbox ~]# rpm -Uvh ius-release*.rpm epel-release*.rpm


See What Packages Are Available

You can easily see what software is available to you by doing a 'yum search' or by going to the IUS Community Repo directly. Keep in mind that packages will be added to IUS regularly so check back often.

[root@el5-i386 ~]# yum list | grep -w \.ius\.
         
mod_python26-debuginfo.i386            3.3.1-10.ius.el5       ius-testing       
mysql50.i386                           5.0.83-2.ius.el5       ius-testing       
mysql50-bench.i386                     5.0.83-2.ius.el5       ius-testing       
mysql50-debuginfo.i386                 5.0.83-2.ius.el5       ius-testing       
mysql50-devel.i386                     5.0.83-2.ius.el5       ius-testing       
mysql50-server.i386                    5.0.83-2.ius.el5       ius-testing       
mysql51.i386                           5.1.36-2.ius.el5       ius-testing       
mysql51-bench.i386                     5.1.36-2.ius.el5       ius-testing       
mysql51-debuginfo.i386                 5.1.36-2.ius.el5       ius-testing       
mysql51-devel.i386                     5.1.36-2.ius.el5       ius-testing       
mysql51-plugins-archive.i386           5.1.36-2.ius.el5       ius-testing       
mysql51-plugins-blackhole.i386         5.1.36-2.ius.el5       ius-testing       
mysql51-plugins-example.i386           5.1.36-2.ius.el5       ius-testing       
mysql51-plugins-federated.i386         5.1.36-2.ius.el5       ius-testing       
mysql51-server.i386                    5.1.36-2.ius.el5       ius-testing       
php52.i386                             5.2.10-1.2.ius.el5     ius-testing         
php52-cli.i386                         5.2.10-1.2.ius.el5     ius-testing
php52-common.i386                      5.2.10-1.2.ius.el5     ius-testing         
php52-gd.i386                          5.2.10-1.2.ius.el5     ius-testing       
php52-imap.i386                        5.2.10-1.2.ius.el5     ius-testing       
php52-ldap.i386                        5.2.10-1.2.ius.el5     ius-testing       
php52-mbstring.i386                    5.2.10-1.2.ius.el5     ius-testing       
php52-mysql.i386                       5.2.10-1.2.ius.el5     ius-testing       
php52-odbc.i386                        5.2.10-1.2.ius.el5     ius-testing       
php52-pdo.i386                         5.2.10-1.2.ius.el5     ius-testing       
php52-xml.i386                         5.2.10-1.2.ius.el5     ius-testing
php52-bcmath.i386                      5.2.10-1.2.ius.el5     ius-testing       
php52-dba.i386                         5.2.10-1.2.ius.el5     ius-testing       
php52-debuginfo.i386                   5.2.10-1.2.ius.el5     ius-testing       
php52-devel.i386                       5.2.10-1.2.ius.el5     ius-testing       
php52-mcrypt.i386                      5.2.10-1.2.ius.el5     ius-testing       
php52-mssql.i386                       5.2.10-1.2.ius.el5     ius-testing       
php52-ncurses.i386                     5.2.10-1.2.ius.el5     ius-testing       
php52-pgsql.i386                       5.2.10-1.2.ius.el5     ius-testing       
php52-snmp.i386                        5.2.10-1.2.ius.el5     ius-testing       
php52-soap.i386                        5.2.10-1.2.ius.el5     ius-testing       
php52-tidy.i386                        5.2.10-1.2.ius.el5     ius-testing       
php52-xmlrpc.i386                      5.2.10-1.2.ius.el5     ius-testing       
php53.i386                             5.3.0-1.ius.el5        ius-testing       
php53-bcmath.i386                      5.3.0-1.ius.el5        ius-testing       
php53-cli.i386                         5.3.0-1.ius.el5        ius-testing       
php53-common.i386                      5.3.0-1.ius.el5        ius-testing       
php53-dba.i386                         5.3.0-1.ius.el5        ius-testing       
php53-debuginfo.i386                   5.3.0-1.ius.el5        ius-testing       
php53-devel.i386                       5.3.0-1.ius.el5        ius-testing       
php53-gd.i386                          5.3.0-1.ius.el5        ius-testing       
php53-imap.i386                        5.3.0-1.ius.el5        ius-testing       
php53-ldap.i386                        5.3.0-1.ius.el5        ius-testing       
php53-mbstring.i386                    5.3.0-1.ius.el5        ius-testing       
php53-mcrypt.i386                      5.3.0-1.ius.el5        ius-testing       
php53-mssql.i386                       5.3.0-1.ius.el5        ius-testing       
php53-mysql.i386                       5.3.0-1.ius.el5        ius-testing       
php53-odbc.i386                        5.3.0-1.ius.el5        ius-testing       
php53-pdo.i386                         5.3.0-1.ius.el5        ius-testing       
php53-pgsql.i386                       5.3.0-1.ius.el5        ius-testing       
php53-snmp.i386                        5.3.0-1.ius.el5        ius-testing       
php53-soap.i386                        5.3.0-1.ius.el5        ius-testing       
php53-tidy.i386                        5.3.0-1.ius.el5        ius-testing       
php53-xml.i386                         5.3.0-1.ius.el5        ius-testing       
php53-xmlrpc.i386                      5.3.0-1.ius.el5        ius-testing    
python26-debuginfo.i386                2.6-4.5.ius.el5        ius-testing
python26-devel.i386                    2.6-4.5.ius.el5        ius-testing
python26-libs.i386                     2.6-4.5.ius.el5        ius-testing
python26-setuptools.noarch             0.6c9-1.1.ius.el5      ius-testing
python26-test.i386                     2.6-4.5.ius.el5        ius-testing
python26-tools.i386                    2.6-4.5.ius.el5        ius-testing


Upgrading Stock RHEL Packages to IUS Packages

Admittedly, upgrading from stock RHEL packages to IUS is not exactly an easy transition, but trust us it's worth it in the long run. Because of the way IUS packages are created, you can not simply do a 'yum upgrade <package>' because the IUS packages actually conflict with the stock RHEL packages. What you really need to do is first remove the stock RHEL packages, and then install the corresponding IUS package you want. Lets use php on my stock RHEL5 box and first see what packages we need to remove:

[root@el5-i386 ~]# rpm -qa | grep php
php-gd-5.1.6-23.2.el5_3
php-cli-5.1.6-23.2.el5_3
php-odbc-5.1.6-23.2.el5_3
php-mbstring-5.1.6-23.2.el5_3
php-pear-1.4.9-4.el5.1
php-pdo-5.1.6-23.2.el5_3
php-5.1.6-23.2.el5_3
php-xml-5.1.6-23.2.el5_3
php-common-5.1.6-23.2.el5_3
php-ldap-5.1.6-23.2.el5_3
php-mysql-5.1.6-23.2.el5_3
php-imap-5.1.6-23.2.el5_3

Note: php-pear is not part of the php package set. It is it's own package.


Looking at this list I can see that I want to remove everything but 'php-pear'. You can do this by 'rpm -e --nodeps...' but a cleaner, safer, more appropriate way would be to use yum shell:

Short version with no output:

[root@el5-i386 ~]# yum shell

> remove php-gd php-cli php-odbc php-mbstring php-pdo php php-xml php-common php-ldap php-mysql php-imap
Setting up Remove Process

> install php52-gd php52-cli php52-odbc php52-mbstring php52-pdo php52 php52-xml php52-common php52-ldap php52-mysql php52-imap

> transaction solve

> transaction run

NOTE: It is *very* important that you run 'transaction solve' to ensure all dependencies are being met with the new packages. Removing packages with unmet dependencies in Yum can lead to a nightmare of packages being removed.


Long version with output:

[root@el5-i386 ~]# yum shell

Loaded plugins: downloadonly, rhnplugin, security
Setting up Yum Shell

> remove php-gd php-cli php-odbc php-mbstring php-pdo php php-xml php-common php-ldap php-mysql php-imap
Setting up Remove Process

> install php52-gd php52-cli php52-odbc php52-mbstring php52-pdo php52 php52-xml php52-common php52-ldap php52-mysql php52-imap

Excluding Packages in global exclude list
Finished
Setting up Install Process
Parsing package install arguments
> transaction solve
--> Running transaction check
---> Package php52-ldap.x86_64 0:5.2.11-1.ius.el5 set to be updated
---> Package php52-common.x86_64 0:5.2.11-1.ius.el5 set to be updated
---> Package php52-xml.x86_64 0:5.2.11-1.ius.el5 set to be updated
---> Package php-cli.x86_64 0:5.1.6-23.2.el5_3 set to be erased
---> Package php52.x86_64 0:5.2.11-1.ius.el5 set to be updated
---> Package php-mbstring.x86_64 0:5.1.6-23.2.el5_3 set to be erased
---> Package php52-mysql.x86_64 0:5.2.11-1.ius.el5 set to be updated
---> Package php52-cli.x86_64 0:5.2.11-1.ius.el5 set to be updated
---> Package php-imap.x86_64 0:5.1.6-23.2.el5_3 set to be erased
---> Package php-mysql.x86_64 0:5.1.6-23.2.el5_3 set to be erased
---> Package php.x86_64 0:5.1.6-23.2.el5_3 set to be erased
---> Package php-odbc.x86_64 0:5.1.6-23.2.el5_3 set to be erased
---> Package php52-gd.x86_64 0:5.2.11-1.ius.el5 set to be updated
---> Package php52-pdo.x86_64 0:5.2.11-1.ius.el5 set to be updated
---> Package php52-imap.x86_64 0:5.2.11-1.ius.el5 set to be updated
---> Package php52-odbc.x86_64 0:5.2.11-1.ius.el5 set to be updated
---> Package php52-mbstring.x86_64 0:5.2.11-1.ius.el5 set to be updated
---> Package php-gd.x86_64 0:5.1.6-23.2.el5_3 set to be erased
---> Package php-pdo.x86_64 0:5.1.6-23.2.el5_3 set to be erased
---> Package php-common.x86_64 0:5.1.6-23.2.el5_3 set to be erased
---> Package php-xml.x86_64 0:5.1.6-23.2.el5_3 set to be erased
---> Package php-ldap.x86_64 0:5.1.6-23.2.el5_3 set to be erased
--> Finished Dependency Resolution
Success resolving dependencies

> transaction run

--> Running transaction check
--> Finished Dependency Resolution

====================================================================================================
 Package                   Arch              Version                     Repository            Size
====================================================================================================
Installing:
 php52                     x86_64            5.2.11-1.ius.el5            ius                  1.4 M
 php52-cli                 x86_64            5.2.11-1.ius.el5            ius                  2.6 M
 php52-common              x86_64            5.2.11-1.ius.el5            ius                  246 k
 php52-gd                  x86_64            5.2.11-1.ius.el5            ius                  124 k
 php52-imap                x86_64            5.2.11-1.ius.el5            ius                   60 k
 php52-ldap                x86_64            5.2.11-1.ius.el5            ius                   41 k
 php52-mbstring            x86_64            5.2.11-1.ius.el5            ius                  1.1 M
 php52-mysql               x86_64            5.2.11-1.ius.el5            ius                   94 k
 php52-odbc                x86_64            5.2.11-1.ius.el5            ius                   59 k
 php52-pdo                 x86_64            5.2.11-1.ius.el5            ius                   73 k
 php52-xml                 x86_64            5.2.11-1.ius.el5            ius                  113 k
Removing:
 php                       x86_64            5.1.6-23.2.el5_3            installed            3.0 M
 php-cli                   x86_64            5.1.6-23.2.el5_3            installed            5.3 M
 php-common                x86_64            5.1.6-23.2.el5_3            installed            397 k
 php-gd                    x86_64            5.1.6-23.2.el5_3            installed            333 k
 php-imap                  x86_64            5.1.6-23.2.el5_3            installed             98 k
 php-ldap                  x86_64            5.1.6-23.2.el5_3            installed             49 k
 php-mbstring              x86_64            5.1.6-23.2.el5_3            installed            1.8 M
 php-mysql                 x86_64            5.1.6-23.2.el5_3            installed            196 k
 php-odbc                  x86_64            5.1.6-23.2.el5_3            installed             88 k
 php-pdo                   x86_64            5.1.6-23.2.el5_3            installed            114 k
 php-xml                   x86_64            5.1.6-23.2.el5_3            installed            241 k

Transaction Summary
====================================================================================================
Install     11 Package(s)         
Update       0 Package(s)         
Remove      11 Package(s)         

Total download size: 5.9 M
Is this ok [y/N]: y

Downloading Packages:
(1/11): php52-ldap-5.2.11-1.ius.el5.x86_64.rpm                               |  41 kB     00:00     
(2/11): php52-odbc-5.2.11-1.ius.el5.x86_64.rpm                               |  59 kB     00:00     
(3/11): php52-imap-5.2.11-1.ius.el5.x86_64.rpm                               |  60 kB     00:00     
(4/11): php52-pdo-5.2.11-1.ius.el5.x86_64.rpm                                |  73 kB     00:00     
(5/11): php52-mysql-5.2.11-1.ius.el5.x86_64.rpm                              |  94 kB     00:00     
(6/11): php52-xml-5.2.11-1.ius.el5.x86_64.rpm                                | 113 kB     00:00     
(7/11): php52-gd-5.2.11-1.ius.el5.x86_64.rpm                                 | 124 kB     00:00     
(8/11): php52-common-5.2.11-1.ius.el5.x86_64.rpm                             | 246 kB     00:00     
(9/11): php52-mbstring-5.2.11-1.ius.el5.x86_64.rpm                           | 1.1 MB     00:00     
(10/11): php52-5.2.11-1.ius.el5.x86_64.rpm                                   | 1.4 MB     00:00     
(11/11): php52-cli-5.2.11-1.ius.el5.x86_64.rpm                               | 2.6 MB     00:00     
----------------------------------------------------------------------------------------------------
Total                                                                49 kB/s | 5.9 MB     02:02     
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 9cd4953f
Importing GPG key 0x9CD4953F "IUS Community Project <coredev@iuscommunity.org>" from /etc/pki/rpm-gpg/IUS-COMMUNITY-GPG-KEY
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : php52-common                                    [ 1/22] 
  Installing     : php52-pdo                                       [ 2/22] 
  Installing     : php52-odbc                                      [ 3/22] 
  Installing     : php52-mysql                                     [ 4/22] 
  Installing     : php52                                           [ 5/22] 
  Installing     : php52-mbstring                                  [ 6/22] 
  Installing     : php52-ldap                                      [ 7/22] 
  Installing     : php52-cli                                       [ 8/22] 
  Installing     : php52-xml                                       [ 9/22] 
  Installing     : php52-imap                                      [10/22] 
  Installing     : php52-gd                                        [11/22] 
  Erasing        : php                                             [12/22] 
  Erasing        : php-gd                                          [13/22] 
  Erasing        : php-xml                                         [14/22] 
  Erasing        : php-cli                                         [15/22] 
  Erasing        : php-common                                      [16/22] 
  Erasing        : php-pdo                                         [17/22] 
  Erasing        : php-mysql                                       [18/22] 
  Erasing        : php-odbc                                        [19/22] 
  Erasing        : php-imap                                        [20/22] 
  Erasing        : php-mbstring                                    [21/22] 
  Erasing        : php-ldap                                        [22/22] 

Removed: php.x86_64 0:5.1.6-23.2.el5_3 php-cli.x86_64 0:5.1.6-23.2.el5_3 php-common.x86_64 0:5.1.6-23.2.el5_3 php-gd.x86_64 0:5.1.6-23.2.el5_3 php-imap.x86_64 0:5.1.6-23.2.el5_3 php-ldap.x86_64 0:5.1.6-23.2.el5_3 php-mbstring.x86_64 0:5.1.6-23.2.el5_3 php-mysql.x86_64 0:5.1.6-23.2.el5_3 php-odbc.x86_64 0:5.1.6-23.2.el5_3 php-pdo.x86_64 0:5.1.6-23.2.el5_3 php-xml.x86_64 0:5.1.6-23.2.el5_3
Installed: php52.x86_64 0:5.2.11-1.ius.el5 php52-cli.x86_64 0:5.2.11-1.ius.el5 php52-common.x86_64 0:5.2.11-1.ius.el5 php52-gd.x86_64 0:5.2.11-1.ius.el5 php52-imap.x86_64 0:5.2.11-1.ius.el5 php52-ldap.x86_64 0:5.2.11-1.ius.el5 php52-mbstring.x86_64 0:5.2.11-1.ius.el5 php52-mysql.x86_64 0:5.2.11-1.ius.el5 php52-odbc.x86_64 0:5.2.11-1.ius.el5 php52-pdo.x86_64 0:5.2.11-1.ius.el5 php52-xml.x86_64 0:5.2.11-1.ius.el5
Finished Transaction
> Leaving Shell


And now, you should have a working install of PHP 5.2 on RHEL5:

[root@el5-i386 ~]# php -v
PHP 5.2.10 (cli) (built: Jul 28 2009 14:54:01) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies


But don't forget to check and restart Apache:

[root@el5-i386 ~]# httpd -t
Syntax OK

[root@el5-i386 ~]# /etc/init.d/httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]


Downgrading from IUS Packages to Stock RHEL Packages

Downgrading is really the same process but backwards. You first want to determine which packages you want/need to remove:

[root@el5-i386 ~]# rpm -qa | grep php52
php52-common-5.2.10-1.2.ius.el5
php52-mbstring-5.2.10-1.2.ius.el5
php52-xml-5.2.10-1.2.ius.el5
php52-cli-5.2.10-1.2.ius.el5
php52-mysql-5.2.10-1.2.ius.el5
php52-ldap-5.2.10-1.2.ius.el5
php52-pdo-5.2.10-1.2.ius.el5
php52-odbc-5.2.10-1.2.ius.el5
php52-5.2.10-1.2.ius.el5
php52-gd-5.2.10-1.2.ius.el5
php52-imap-5.2.10-1.2.ius.el5


You then need to remove, and replace with stock packages:

[root@el5-i386 ~]# yum shell

> remove php52-gd php52-cli php52-odbc php52-mbstring php52-pdo php52 php52-xml php52-common php52-ldap php52-mysql php52-imap

> install php-gd php-cli php-odbc php-mbstring php-pdo php php-xml php-common php-ldap php-mysql php-imap
Setting up Remove Process

> transaction solve

> transaction run



And of course we once again have stock PHP for EL5:

[root@el5-i386 ~]# php -v
PHP 5.1.6 (cli) (built: Feb 26 2009 07:01:10) 
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies


Known Yum Dependency Resolution Issues

The IUS CoreDev Team is aware of an issue with the current version of Yum and how it resolves dependencies when installing packages. For background on this matter please see the upstream bug reports that we have submitted:


We have implemented an optional and temporary workaround by backporting the original patch that we submitted to a yum3 package in the IUS EL 5 repositories. This package is only being made available for the meantime until the changes in upstream Yum are implemented in RHEL. You don't have to replace Yum, however if you choose not to you will experience the dependency resolution issues outlined in the bugs listed above.

Replacing Yum is easy and can be reverted once the changes are ported to RHEL:

root@linux ~]# yum install yum-utils

root@linux ~]# yumdownloader yum yum3

root@linux ~]# rpm -e yum --nodeps

root@linux ~]# rpm -Uvh yum3*.rpm

This will replace yum, with the IUS yum3 package. With this change, you will be able to 'yum install X' package and allow it to properly resolve the dependency with IUS packages (if the base IUS package is installed for that dependency). Note: You want to make sure you yum download 'yum' as well as 'yum3' incase you have issues and need to roll back to stock yum.


Common Examples for Red Hat Enterprise Linux 5

Upgrading Stock MySQL 5.0 to IUS MySQL 5.0 on RHEL/CentOS 5

IUS Provides the latest stable version of the MySQL 5.0 branch. The following outlines how to upgrade from stock MySQL 5.0 on EL5 to the latest stable MySQL 5.0 from upstream (currently 5.0.83):

[root@el5-64 ~]# mysqldump -A > all_databases.sql


[root@el5-64 ~]# /etc/init.d/mysqld stop
Stopping MySQL:  [  OK  ]


[root@el5-i386 ~]# yum shell

> remove mysql mysql-server mysql-devel

> install mysql50 mysql50-server mysql50-devel

> transaction solve

> transaction run

> quit


[root@el5-64 ~]# /etc/init.d/mysqld start
Starting MySQL:  [  OK  ]


[root@el5-64 ~]# mysql -V
mysql  Ver 14.12 Distrib 5.0.83, for redhat-linux-gnu (x86_64) using readline 5.1


Upgrading Stock MySQL 5.0 to IUS MySQL 5.1 on RHEL/CentOS 5

The following outlines how to upgrade from stock MySQL 5.0 on EL5 to the latest stable MySQL 5.1 from upstream (currently 5.1.36). Note that these steps are likely to be the same for future versions of MySQL such as 5.4/6.0 etc:

[root@el5-64 ~]# mysqldump -A > all_databases.sql


[root@el5-64 ~]# /etc/init.d/mysqld stop
Stopping MySQL:  [  OK  ]


[root@el5-64 ~]# yum shell

> remove mysql mysql-server mysql-devel mysqlclient15 mysqlclient15-devel

> install mysql51 mysql51-server mysql51-devel perl-DBD-MySQL

> transaction solve

> transaction run

> quit


[root@el5-64 ~]# /etc/init.d/mysqld start
Starting MySQL:  [  OK  ]

[root@el5-64 ~]# mysql_upgrade -t /var/tmp

[root@el5-64 ~]# mysql -V
mysql  Ver 14.14 Distrib 5.1.36, for redhat-linux-gnu (x86_64) using readline 5.1


Upgrading Stock PHP 5.1 to IUS PHP 5.2 on RHEL/CentOS 5

[root@el5-64 ~]# rpm -qa | grep php
php-mbstring-5.1.6-23.2.el5_3
php-odbc-5.1.6-23.2.el5_3
php-imap-5.1.6-23.2.el5_3
php-pdo-5.1.6-23.2.el5_3
php-common-5.1.6-23.2.el5_3
php-gd-5.1.6-23.2.el5_3
php-ldap-5.1.6-23.2.el5_3
php-cli-5.1.6-23.2.el5_3
php-mysql-5.1.6-23.2.el5_3
php-5.1.6-23.2.el5_3
php-xml-5.1.6-23.2.el5_3

[root@el5-64 ~]# yum shell

> remove php-mbstring php-odbc php-imap php-pdo php-common php-gd php-ldap php-cli php-mysql php php-xml

> install php52-mbstring php52-odbc php52-imap php52-pdo php52-common php52-gd php52-ldap php52-cli php52-mysql php52 php52-xml

> transaction solve

> transaction run

> quit


[root@el5-64 ~]# php -v
PHP 5.2.10 (cli) (built: Jul 28 2009 14:54:01) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

[root@el5-64 ~]# httpd -t
Syntax OK

[root@el5-64 ~]# /etc/init.d/httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]


Upgrading Stock PHP 5.1 to IUS PHP 5.3 on RHEL/CentOS 5

PHP 5.3 requires a newer version of PEAR to function properly, therefore this is a bit different than php52 but very much the same.

[root@el5-64 ~]# rpm -qa | grep php
php-mbstring-5.1.6-23.2.el5_3
php-odbc-5.1.6-23.2.el5_3
php-imap-5.1.6-23.2.el5_3
php-pdo-5.1.6-23.2.el5_3
php-pear-1.4.9-4.el5.1
php-common-5.1.6-23.2.el5_3
php-gd-5.1.6-23.2.el5_3
php-ldap-5.1.6-23.2.el5_3
php-cli-5.1.6-23.2.el5_3
php-mysql-5.1.6-23.2.el5_3
php-5.1.6-23.2.el5_3
php-xml-5.1.6-23.2.el5_3

[root@el5-64 ~]# yum shell

> remove php-mbstring php-odbc php-imap php-pdo php-common php-gd php-ldap php-cli php-mysql php php-xml php-pear

> install php53-mbstring php53-odbc php53-imap php53-pdo php53-common php53-gd php53-ldap php53-cli php53-mysql php53 php53-xml php-pear18

> transaction solve

> transaction run

> quit


[root@el5-64 ~]# php -v
PHP 5.3.0 (cli) (built: Jul 28 2009 14:44:07) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies

[root@el5-64 ~]# httpd -t
Syntax OK

[root@el5-64 ~]# /etc/init.d/httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]

Notice that we installed php-pear18 along with php53.


Upgrading to Python 2.6 on RHEL/CentOS 5

Python is a critical package to the system, and therefore we do not want to upgrade it... rather we want to 'side-by-side' it. We can however remove/upgrade mod_python.

DO NOT ATTEMPT TO REMOVE PYTHON OR PYTHON-SETUPTOOLS

The following gets you python26 + setuptools + mod_python26:

[root@el5-64 ~]# rpm -e mod_python

[root@el5-64 ~]# yum install python26 python26-setuptools mod_python26

[root@el5-64 ~]# python -V
Python 2.4.3

[root@el5-64 ~]# python2.6 -V
Python 2.6

[root@el5-64 ~]# easy_install-2.6 sqlalchemy

[root@el5-64 ~]# ls /usr/lib64/python2.6/site-packages/SQLAlchemy-0.5.5-py2.6.egg/
EGG-INFO  sqlalchemy

[root@el5-64 ~]# python2.6
Python 2.6 (r26:66714, May 21 2009, 17:50:00) 
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlalchemy
>>> 


Installing Packages from IUS Testing

Sometimes you might want to try an update before it is released to stable, or simple want to help us with testing out packages that we are waiting for feedback on. The ius-release package that you installed also sets up the ius-testing repository, however it is not enabled by default.

[root@el5-64 ~]# yum install <package1> <package2> --enablerepo=ius-testing

[root@el5-64 ~]# yum upgrade --enablerepo=ius-testing


Common Examples for Red Hat Enterprise Linux 4

It is possible that you still have a RHEL4 box. Yes, we know... it is sad. But don't worry, we still have a few packages available for you.

Configuring EPEL and IUS on RHEL/CentOS 4

[root@esx02-bjd-el4-64 ~]# wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/4/i386/epel-release-1-1.ius.el4.noarch.rpm

[root@esx02-bjd-el4-64 ~]# wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/4/i386/ius-release-1-2.ius.el4.noarch.rpm

[root@esx02-bjd-el4-64 ~]# rpm -Uvh ius-release*.rpm epel-release*.rpm

[root@esx02-bjd-el4-64 ~]# rpm --import /etc/pki/rpm-gpg/IUS-COMMUNITY-GPG-KEY 

[root@esx02-bjd-el4-64 ~]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL 


Upgrade Stock MySQL 4.1 to IUS MySQL 5.0 on RHEL/CentOS 4

This is quick and dirty, but so is RHEL 4... so deal:

# backup your data

[root@esx02-bjd-el4-64 ~]# mysqldump -A > all_databases.sql



# determine which packages to remove/replace

[root@esx02-bjd-el4-64 ~]# rpm -qa | grep mysql
mysqlclient10-3.23.58-4.RHEL4.1
mysql-server-4.1.22-2.el4
php-mysql-4.3.9-3.26
libdbi-dbd-mysql-0.6.5-10.RHEL4.1
mysql-devel-4.1.22-2.el4
mysql-4.1.22-2.el4



# perform the upgrade

[root@esx02-bjd-el4-64 ~]# /etc/init.d/mysqld stop
Stopping MySQL:                                            [  OK  ]

[root@esx02-bjd-el4-64 ~]# rpm -e mysql mysql-server mysql-devel --nodeps
warning: /var/log/mysqld.log saved as /var/log/mysqld.log.rpmsave
warning: /etc/my.cnf saved as /etc/my.cnf.rpmsave

[root@esx02-bjd-el4-64 ~]# /etc/init.d/mysqld start
Starting MySQL:                                            [  OK  ]

[root@esx02-bjd-el4-64 ~]# mysql_upgrade -t /tmp


# basque in the glory of a successful upgrade

[root@esx02-bjd-el4-64 ~]# mysql -V
mysql  Ver 14.12 Distrib 5.0.85, for redhat-linux-gnu (x86_64) using readline 5.1


Upgrading Stock PHP 4.3 to IUS PHP 5.2 on RHEL/CentOS 4

Again, quick and dirty:

# determine which packages to remove/replace

[root@esx02-bjd-el4-64 ~]# rpm -qa | grep php
php-mbstring-4.3.9-3.26
php-gd-4.3.9-3.26
php-ldap-4.3.9-3.26
php-mysql-4.3.9-3.26
php-pgsql-4.3.9-3.26
php-pear-4.3.9-3.26
php-imap-4.3.9-3.26
php-odbc-4.3.9-3.26
php-4.3.9-3.26


# do the upgrade

[root@esx02-bjd-el4-64 ~]# rpm -e php-mbstring php-gd php-ldap php-mysql php-pgsql php-imap php-odbc php --nodeps
warning: /etc/php.ini saved as /etc/php.ini.rpmsave

[root@esx02-bjd-el4-64 ~]# up2date -u php52-mbstring php52-gd php52-ldap php52-mysql php52-pgsql php52-imap php52-odbc php52 

[root@esx02-bjd-el4-64 ~]# php -v
PHP 5.2.11 (cli) (built: Oct  1 2009 19:19:44) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

[root@esx02-bjd-el4-64 ~]# httpd -t
Syntax OK

[root@esx02-bjd-el4-64 ~]# /etc/init.d/httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]

Doc/ClientUsageGuide (last edited 2010-01-20 01:26:17 by derks)