{"id":2779,"date":"2012-05-11T23:24:06","date_gmt":"2012-05-11T15:24:06","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=2779"},"modified":"2023-04-28T09:49:19","modified_gmt":"2023-04-28T09:49:19","slug":"how-to-install-php-fpm-on-centos-6-2","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/how-to-install-php-fpm-on-centos-6-2\/","title":{"rendered":"How to Install PHP-FPM on CentOS 6.2"},"content":{"rendered":"<p>PHP-FPM (FastCGI Process Manager) is a PHP FastCGI implementation and is an alternative PHP FastCGI implementation with some additional features useful for sites of any size, especially busier sites. PHP-FPM is a set of patches for PHP to work with the FastCGI process manager, turning PHP-FPM into a service rather than loading all of its libraries everytime a PHP request it&#8217;s made. In this post, i will show on how to install PHP-FPM on linux CentOS 6.2 server. Assume that you have configured EPEL and remi repositories on you linux CentOS 6.2 server.<br \/>\n<a href=\"https:\/\/webhostinggeeks.com\/howto\/how-to-install-and-configure-epel-repository-on-centos-6-2\/\">How to Install and Configure EPEL Repository on CentOS 6.2<\/a><br \/>\n<a href=\"https:\/\/webhostinggeeks.com\/howto\/how-to-install-remi-yum-repository-on-centos-6-2-x86-and-x86_64\/\">How to Install Remi yum Repository on CentOS 6.2<\/a><\/p>\n<p>1. How to install PHP and other php extensions :<\/p>\n<pre>\n[root@centos62 ~]# yum --enablerepo=remi install php php-fpm php-common php-pecl-apc php-cli php-pear php-pdo php-mysql php-pgsql php-pecl-mongo php-sqlite php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml\n<\/pre>\n<p>Output :<\/p>\n<pre>\n\n  Installing : libmemcached-1.0.4-1.el6.remi.i686                                              8\/23\n  Installing : php-pecl-memcached-2.0.1-2.el6.remi.i686                                        9\/23\n  Installing : php-mysql-5.4.0-1.el6.remi.i686                                                10\/23\n  Installing : php-gd-5.4.0-1.el6.remi.i686                                                   11\/23\n  Installing : php-pecl-mongo-1.2.10-2.el6.remi.i686                                          12\/23\n  Installing : php-pecl-apc-3.1.10-2.el6.remi.i686                                            13\/23\n  Installing : php-pecl-memcache-3.0.6-3.el6.remi.i686                                        14\/23\n  Installing : php-pecl-sqlite-2.0.0-0.1.svn313074.el6.remi.i686                              15\/23\n  Installing : php-5.4.0-1.el6.remi.i686                                                      16\/23\n  Installing : php-pgsql-5.4.0-1.el6.remi.i686                                                17\/23\n  Installing : php-mcrypt-5.4.0-1.el6.remi.i686                                               18\/23\n  Installing : php-xml-5.4.0-1.el6.remi.i686                                                  19\/23\n  Installing : php-fpm-5.4.0-1.el6.remi.i686                                                  20\/23\n  Installing : php-mbstring-5.4.0-1.el6.remi.i686                                             21\/23\n  Installing : compat-mysql51-5.1.54-1.el6.remi.i686                                          22\/23\n  Cleanup    : mysql-libs-5.1.61-1.el6_2.1.i686                                               23\/23\n\nInstalled:\n  php.i686 0:5.4.0-1.el6.remi                           php-cli.i686 0:5.4.0-1.el6.remi\n  php-common.i686 0:5.4.0-1.el6.remi                    php-fpm.i686 0:5.4.0-1.el6.remi\n  php-gd.i686 0:5.4.0-1.el6.remi                        php-mbstring.i686 0:5.4.0-1.el6.remi\n  php-mcrypt.i686 0:5.4.0-1.el6.remi                    php-mysql.i686 0:5.4.0-1.el6.remi\n  php-pdo.i686 0:5.4.0-1.el6.remi                       php-pear.noarch 1:1.9.4-7.el6.remi\n  php-pecl-apc.i686 0:3.1.10-2.el6.remi                 php-pecl-memcache.i686 0:3.0.6-3.el6.remi\n  php-pecl-memcached.i686 0:2.0.1-2.el6.remi            php-pecl-mongo.i686 0:1.2.10-2.el6.remi\n  php-pecl-sqlite.i686 0:2.0.0-0.1.svn313074.el6.remi   php-pgsql.i686 0:5.4.0-1.el6.remi\n  php-xml.i686 0:5.4.0-1.el6.remi\n\nDependency Installed:\n  compat-mysql51.i686 0:5.1.54-1.el6.remi                   libmemcached.i686 0:1.0.4-1.el6.remi\n  php-pecl-igbinary.i686 0:1.1.2-0.1.git3b8ab7e.el6.remi    t1lib.i686 0:5.1.2-6.el6_2.1\n\nDependency Updated:\n  mysql-libs.i686 0:5.5.22-1.el6.remi\n\nComplete!\n<\/pre>\n<p>2. How to check PHP Version :<\/p>\n<pre>\n[root@centos62 ~]# php -v\nPHP 5.4.0 (cli) (built: Mar  2 2012 17:49:53)\nCopyright (c) 1997-2012 The PHP Group\nZend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies\n<\/pre>\n<p>3. Proceed to configure PHP-FPM to meet your requirement :<\/p>\n<pre>\n[root@centos62 ~]# vi \/etc\/php-fpm.d\/www.conf\n<\/pre>\n<p>4. Start PHP-FPM :<\/p>\n<pre>\n[root@centos62 ~]# service php-fpm start\nStarting php-fpm:                                          [  OK  ]\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>PHP-FPM (FastCGI Process Manager) is a PHP FastCGI implementation and is an alternative PHP FastCGI implementation with some additional features useful for sites of any size, especially busier sites. PHP-FPM&#8230;<\/p>\n","protected":false},"author":6,"featured_media":1262,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[1025],"tags":[1244,1253,1975,1536,1546,1646,1652],"class_list":["post-2779","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php","tag-centos","tag-centos-6-2","tag-install","tag-linux","tag-linux-utilities","tag-php","tag-php-fpm"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/2779","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=2779"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/2779\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media\/1262"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=2779"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=2779"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=2779"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}