How to Install PHP with MySQL Support on CentOS 6.3

Share this Article :

In this post, i will show the quick step to install PHP packages on linux CentOS 6.3 server. 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. PHP does not included in CentOS 6.3 with minimum type of installation. To get MySQL support in PHP5, you have to install php-mysql module together with php packages itself. Run this command to install phph-mysql. It will help you to install php-mysql dependencies,php-pdo. php-pdo is required to successfully run php-mysql module :

Also Read :   How to Download VMware vSphere Command-Line Interface (vSphere CLI)

You have to install it manually if you really need it.

Simply execute the following command :

[[email protected] ~]# yum install php php-mysql -y

Examples :

[[email protected] ~]# yum install php php-mysql -y
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * base:
 * extras:
 * updates:
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
---> Package php-mysql.i686 0:5.3.3-14.el6_3 will be installed
--> Processing Dependency: php-pdo for package: php-mysql-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
---> Package php-pdo.i686 0:5.3.3-14.el6_3 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

 Package                 Arch              Version                       Repository            Size
 php                     i686              5.3.3-14.el6_3                updates              1.1 M
 php-mysql               i686              5.3.3-14.el6_3                updates               77 k
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 k
 php-pdo                 i686              5.3.3-14.el6_3                updates               72 k

Transaction Summary
Install       5 Package(s)

Total download size: 4.0 M
Installed size: 13 M
Downloading Packages:
Setting up and reading Presto delta metadata
updates/prestodelta                                                          |  62 kB     00:00
Processing delta metadata
Package(s) data still to download: 4.0 M
(1/5): php-5.3.3-14.el6_3.i686.rpm                                           | 1.1 MB     00:09
(2/5): php-cli-5.3.3-14.el6_3.i686.rpm                                       | 2.2 MB     00:22
(3/5): php-common-5.3.3-14.el6_3.i686.rpm                                    | 523 kB     00:04
(4/5): php-mysql-5.3.3-14.el6_3.i686.rpm                                     |  77 kB     00:00
(5/5): php-pdo-5.3.3-14.el6_3.i686.rpm                                       |  72 kB     00:00
Total                                                               105 kB/s | 4.0 MB     00:38
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : php-common-5.3.3-14.el6_3.i686                                                   1/5
  Installing : php-pdo-5.3.3-14.el6_3.i686                                                      2/5
  Installing : php-cli-5.3.3-14.el6_3.i686                                                      3/5
  Installing : php-5.3.3-14.el6_3.i686                                                          4/5
  Installing : php-mysql-5.3.3-14.el6_3.i686                                                    5/5
  Verifying  : php-pdo-5.3.3-14.el6_3.i686                                                      1/5
  Verifying  : php-mysql-5.3.3-14.el6_3.i686                                                    2/5
  Verifying  : php-5.3.3-14.el6_3.i686                                                          3/5
  Verifying  : php-cli-5.3.3-14.el6_3.i686                                                      4/5
  Verifying  : php-common-5.3.3-14.el6_3.i686                                                   5/5

  php.i686 0:5.3.3-14.el6_3                     php-mysql.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   php-pdo.i686 0:5.3.3-14.el6_3


Leave a Reply