How to Install PHP 5.3 on CentOS 5.9

phpThis post focus on how to install PHP 5.3 on CentOS 5.9. PHP: Hypertext Preprocessor is a widely used, free and open-source server-side scripting language that was especially designed for web development to produce dynamic web pages and can be embedded into HTML. PHP applications are commonly found with the filename extensions .php, .php4, or .php5. Follow this steps to install php 5.3.

Syntax :

[root@centos59 ~]# yum install php53*

or

[root@centos59 ~]# yum install php53* -y

Example :

[root@centos59 ~]# yum install php53*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.nus.edu.sg
 * extras: mirror.nus.edu.sg
 * updates: mirror.nus.edu.sg
Setting up Install Process
Resolving Dependencies
--> Running transaction check
..
..
..
Dependencies Resolved

====================================================================================================
 Package                      Arch              Version                     Repository         Size
====================================================================================================
Installing:
 php53                        i386              5.3.3-13.el5_8              base              1.3 M
 php53-bcmath                 i386              5.3.3-13.el5_8              base               43 k
 php53-cli                    i386              5.3.3-13.el5_8              base              2.5 M
 php53-common                 i386              5.3.3-13.el5_8              base              605 k
 php53-dba                    i386              5.3.3-13.el5_8              base               40 k
 php53-devel                  i386              5.3.3-13.el5_8              base              592 k
 php53-gd                     i386              5.3.3-13.el5_8              base              109 k
 php53-imap                   i386              5.3.3-13.el5_8              base               51 k
 php53-intl                   i386              5.3.3-13.el5_8              base               74 k
 php53-ldap                   i386              5.3.3-13.el5_8              base               36 k
 php53-mbstring               i386              5.3.3-13.el5_8              base              1.2 M
 php53-mysql                  i386              5.3.3-13.el5_8              base               88 k
 php53-odbc                   i386              5.3.3-13.el5_8              base               52 k
 php53-pdo                    i386              5.3.3-13.el5_8              base               67 k
 php53-pgsql                  i386              5.3.3-13.el5_8              base               73 k
 php53-process                i386              5.3.3-13.el5_8              base               38 k
 php53-pspell                 i386              5.3.3-13.el5_8              base               26 k
 php53-snmp                   i386              5.3.3-13.el5_8              base               29 k
 php53-soap                   i386              5.3.3-13.el5_8              base              147 k
 php53-xml                    i386              5.3.3-13.el5_8              base              113 k
 php53-xmlrpc                 i386              5.3.3-13.el5_8              base               53 k

Transaction Summary
====================================================================================================
Install      21 Package(s)
Upgrade       0 Package(s)

Total download size: 7.1 M
Is this ok [y/N]: y
Downloading Packages:
(1/21): php53-pspell-5.3.3-13.el5_8.i386.rpm                                 |  26 kB     00:00
(2/21): php53-snmp-5.3.3-13.el5_8.i386.rpm                                   |  29 kB     00:00
(3/21): php53-ldap-5.3.3-13.el5_8.i386.rpm                                   |  36 kB     00:00
(4/21): php53-process-5.3.3-13.el5_8.i386.rpm                                |  38 kB     00:00
(5/21): php53-dba-5.3.3-13.el5_8.i386.rpm                                    |  40 kB     00:00
(6/21): php53-bcmath-5.3.3-13.el5_8.i386.rpm                                 |  43 kB     00:00
(7/21): php53-imap-5.3.3-13.el5_8.i386.rpm                                   |  51 kB     00:00
(8/21): php53-odbc-5.3.3-13.el5_8.i386.rpm                                   |  52 kB     00:00
(9/21): php53-xmlrpc-5.3.3-13.el5_8.i386.rpm                                 |  53 kB     00:00
(10/21): php53-pdo-5.3.3-13.el5_8.i386.rpm                                   |  67 kB     00:00
(11/21): php53-pgsql-5.3.3-13.el5_8.i386.rpm                                 |  73 kB     00:00
(12/21): php53-intl-5.3.3-13.el5_8.i386.rpm                                  |  74 kB     00:00
(13/21): php53-mysql-5.3.3-13.el5_8.i386.rpm                                 |  88 kB     00:00
(14/21): php53-gd-5.3.3-13.el5_8.i386.rpm                                    | 109 kB     00:00
(15/21): php53-xml-5.3.3-13.el5_8.i386.rpm                                   | 113 kB     00:00
(16/21): php53-soap-5.3.3-13.el5_8.i386.rpm                                  | 147 kB     00:01
(17/21): php53-devel-5.3.3-13.el5_8.i386.rpm                                 | 592 kB     00:04
(18/21): php53-common-5.3.3-13.el5_8.i386.rpm                                | 605 kB     00:05
(19/21): php53-mbstring-5.3.3-13.el5_8.i386.rpm                              | 1.2 MB     00:10
(20/21): php53-5.3.3-13.el5_8.i386.rpm                                       | 1.3 MB     00:11
(21/21): php53-cli-5.3.3-13.el5_8.i386.rpm                                   | 2.5 MB     00:23
----------------------------------------------------------------------------------------------------
Total                                                               107 kB/s | 7.1 MB     01:07
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : php53-common                                                                1/21
  Installing     : php53-pdo                                                                   2/21
  Installing     : php53-cli                                                                   3/21
  Installing     : php53                                                                       4/21
  Installing     : php53-ldap                                                                  5/21
  Installing     : php53-mysql                                                                 6/21
  Installing     : php53-process                                                               7/21
  Installing     : php53-soap                                                                  8/21
  Installing     : php53-intl                                                                  9/21
  Installing     : php53-pgsql                                                                10/21
  Installing     : php53-devel                                                                11/21
  Installing     : php53-xmlrpc                                                               12/21
  Installing     : php53-imap                                                                 13/21
  Installing     : php53-gd                                                                   14/21
  Installing     : php53-dba                                                                  15/21
  Installing     : php53-pspell                                                               16/21
  Installing     : php53-bcmath                                                               17/21
  Installing     : php53-xml                                                                  18/21
  Installing     : php53-snmp                                                                 19/21
  Installing     : php53-odbc                                                                 20/21
  Installing     : php53-mbstring                                                             21/21

Installed:
  php53.i386 0:5.3.3-13.el5_8                       php53-bcmath.i386 0:5.3.3-13.el5_8
  php53-cli.i386 0:5.3.3-13.el5_8                   php53-common.i386 0:5.3.3-13.el5_8
  php53-dba.i386 0:5.3.3-13.el5_8                   php53-devel.i386 0:5.3.3-13.el5_8
  php53-gd.i386 0:5.3.3-13.el5_8                    php53-imap.i386 0:5.3.3-13.el5_8
  php53-intl.i386 0:5.3.3-13.el5_8                  php53-ldap.i386 0:5.3.3-13.el5_8
  php53-mbstring.i386 0:5.3.3-13.el5_8              php53-mysql.i386 0:5.3.3-13.el5_8
  php53-odbc.i386 0:5.3.3-13.el5_8                  php53-pdo.i386 0:5.3.3-13.el5_8
  php53-pgsql.i386 0:5.3.3-13.el5_8                 php53-process.i386 0:5.3.3-13.el5_8
  php53-pspell.i386 0:5.3.3-13.el5_8                php53-snmp.i386 0:5.3.3-13.el5_8
  php53-soap.i386 0:5.3.3-13.el5_8                  php53-xml.i386 0:5.3.3-13.el5_8
  php53-xmlrpc.i386 0:5.3.3-13.el5_8

Complete!

How to check php version :

[root@centos59 ~]# php -v
PHP 5.3.3 (cli) (built: Jun 27 2012 12:25:37)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

How to check installed php packages :

[root@centos59 ~]# rpm -qa | grep php*
php53-5.3.3-13.el5_8
php53-soap-5.3.3-13.el5_8
php53-xmlrpc-5.3.3-13.el5_8
php53-pspell-5.3.3-13.el5_8
php53-odbc-5.3.3-13.el5_8
php53-common-5.3.3-13.el5_8
php53-cli-5.3.3-13.el5_8
php53-ldap-5.3.3-13.el5_8
php53-process-5.3.3-13.el5_8
php53-intl-5.3.3-13.el5_8
php53-devel-5.3.3-13.el5_8
php53-imap-5.3.3-13.el5_8
php53-dba-5.3.3-13.el5_8
php53-bcmath-5.3.3-13.el5_8
php53-snmp-5.3.3-13.el5_8
php53-mbstring-5.3.3-13.el5_8
php53-pdo-5.3.3-13.el5_8
php53-mysql-5.3.3-13.el5_8
php53-pgsql-5.3.3-13.el5_8
php53-gd-5.3.3-13.el5_8
php53-xml-5.3.3-13.el5_8

How to Reset the Directory Manager Password on RHEL 7 / CentOS 7
How to Reset the Directory Manager Password on RHEL 7 / CentOS 7

It is best practice to remember passwords, but because too many passwords, sometimes we forget. We are not encouraged to write the password on any paper or share the password...

How to Find Big Files Size on Linux RHEL/CentOS
How to Find Big Files Size on Linux RHEL/CentOS

As the linux administrator, sometimes we have to identify which files are most take much space in the linux server resulting in low free space. Low disk space can also...

Why Linux users should worry about malware and what they can do about it
Why Linux users should worry about malware and what they can do about it

Don’t drop your guard just because you’re running Linux. Preventing the spread of malware and/or dealing with the consequences of infection are a fact of life when using computers. If...

How to Reset Forgotten Root Password on Linux RHEL 7/CentOS 7
How to Reset Forgotten Root Password on Linux RHEL 7/CentOS 7

This article will explain the steps to reset a lost root password or to reset forgotten root password on Linux RHEL 7 or CentOS 7. Basically, the steps will adding...

How to Update CentOS or Upgrade CentOS to the Latest Version
How to Update CentOS or Upgrade CentOS to the Latest Version

Recently, the latest version of CentOS 7.3 was released. All users of CentOS 7.0, 7.1 and 7.2 can upgrade their system to the most recent. This quick guide will explain...

How to Change your WordPress Username, Nickname and Display Name in MySQL
How to Change your WordPress Username, Nickname and Display Name in MySQL

After you create an account log in WordPress, you may want to change your WordPress username, as appropriate or due to security reason. However, you can not do this from...

How to Enable SSH Root Login on Ubuntu 16.04
How to Enable SSH Root Login on Ubuntu 16.04

As what we wrote in the previous article on how to allow SSH root on Ubuntu 14.04, after installing a fresh new copy of Ubuntu 16.04 LTS, we find that...

How to Change UUID of Linux Partition on CentOS 7
How to Change UUID of Linux Partition on CentOS 7

UUID (Universally Unique IDentifier) should be unique and it is used to identify storage devices on a linux system. If you cloned a virtual machine from vCenter, the metadata containing...

Leave a Reply

Your email address will not be published. Required fields are marked *