This 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
1 Comment
hi, i have centos 8 and i wanted to install php 53 on it but my yum doesn’t have those packages in its repo list
how can i fix it.
regards
sadiq