Install PHP on Centos 6.3

How to install PHP on Centos 6.3

Before install PHP on CentOS 6.3 , you should install rpmforge package on this.

http://ithelpblog.com/os/linux/redhat/centos-redhat/install-rpmforge-on-centos-6-3/

Step 1: Install PHP package on Centos 6.3

[root@Centos6 ~]# yum install php
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirrors.vonline.vn
* extras: mirrors.vonline.vn
* rpmforge: mirror-fpt-telecom.fpt.net
* updates: mirrors.vonline.vn
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package php.i686 0:5.3.3-14.el6_3 will be installed
–> Processing Dependency: php-common = 5.3.3-14.el6_3 for package: php-5.3.3-14.el6_3.i686
–> Processing Dependency: php-cli = 5.3.3-14.el6_3 for package: php-5.3.3-14.el6_3.i686
–> Running transaction check
—> Package php-cli.i686 0:5.3.3-14.el6_3 will be installed
—> Package php-common.i686 0:5.3.3-14.el6_3 will be installed
–> Finished Dependency ResolutionDependencies Resolved=====================================================================================================================================================================================================
Package Arch Version Repository Size
=====================================================================================================================================================================================================
Installing:
php i686 5.3.3-14.el6_3 updates 1.1 M
Installing for dependencies:
php-cli i686 5.3.3-14.el6_3 updates 2.2 M
php-common i686 5.3.3-14.el6_3 updates 523 kTransaction Summary
=====================================================================================================================================================================================================
Install 3 Package(s)

Total download size: 3.8 M
Installed size: 12 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): php-5.3.3-14.el6_3.i686.rpm | 1.1 MB 00:07
(2/3): php-cli-5.3.3-14.el6_3.i686.rpm | 2.2 MB 00:14
(3/3): php-common-5.3.3-14.el6_3.i686.rpm | 523 kB 00:02
—————————————————————————————————————————————————————————————————–
Total 161 kB/s | 3.8 MB 00:24
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : php-common-5.3.3-14.el6_3.i686 1/3
Installing : php-cli-5.3.3-14.el6_3.i686 2/3
Installing : php-5.3.3-14.el6_3.i686 3/3
Verifying : php-5.3.3-14.el6_3.i686 1/3
Verifying : php-cli-5.3.3-14.el6_3.i686 2/3
Verifying : php-common-5.3.3-14.el6_3.i686 3/3

Installed:
php.i686 0:5.3.3-14.el6_3

Dependency Installed:
php-cli.i686 0:5.3.3-14.el6_3 php-common.i686 0:5.3.3-14.el6_3

Complete!

Step 2: Check PHP version on our system

[root@Centos6 ~]# php -v
PHP 5.3.3 (cli) (built: Jul 3 2012 16:40:30)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
[root@Centos6 ~]#

So PHP packages are installed.

That’s all. Thanks for using IThelpblog.com

Leave a reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>