{"id":119,"date":"2019-11-25T15:59:23","date_gmt":"2019-11-25T10:29:23","guid":{"rendered":"https:\/\/chennaiwebhosting.in\/blog\/?p=119"},"modified":"2019-11-25T16:14:01","modified_gmt":"2019-11-25T10:44:01","slug":"installing-lighttpd-with-php-fpm-and-mysql-on-centos-7","status":"publish","type":"post","link":"https:\/\/chennaiwebhosting.in\/blog\/installing-lighttpd-with-php-fpm-and-mysql-on-centos-7\/","title":{"rendered":"Installing Lighttpd with PHP-FPM and Mysql on CentOS 7"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_80 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/chennaiwebhosting.in\/blog\/installing-lighttpd-with-php-fpm-and-mysql-on-centos-7\/#How_to_install_Lighttpd_with_PHP-FPM_and_Mysql_on_CentOS_73\" >How to install Lighttpd with PHP-FPM and Mysql on CentOS 7.3<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/chennaiwebhosting.in\/blog\/installing-lighttpd-with-php-fpm-and-mysql-on-centos-7\/#1Prerequisites_for_installing\" >1.Prerequisites for installing<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/chennaiwebhosting.in\/blog\/installing-lighttpd-with-php-fpm-and-mysql-on-centos-7\/#2Installing_Mysql\" >2.Installing Mysql<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/chennaiwebhosting.in\/blog\/installing-lighttpd-with-php-fpm-and-mysql-on-centos-7\/#3Installing_Lighttpd\" >3.Installing Lighttpd<\/a><\/li><\/ul><\/nav><\/div>\n<h4 class=\"fittexted_for_content_h4\"><span class=\"ez-toc-section\" id=\"How_to_install_Lighttpd_with_PHP-FPM_and_Mysql_on_CentOS_73\"><\/span><strong>How to install Lighttpd with PHP-FPM and Mysql on CentOS 7.3<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>Lighttpd? Lets see about it : <span class=\"_Tgc\"><b>lighttpd<\/b>\u00a0 a web server for Linux and Windows operating systems, also an alternative to Apache web server. It is also called Lighty. It is designed to be secure, fast, standards-compliant, and flexible while being optimized for speed-critical environments.<\/span><\/p>\n<p><strong>lighttpd<\/strong> supports the FastCGI, SCGI and CGI interfaces to external programs, allowing web applications written in any programming language to be used within the server,particularly popular language, PHP performance has received special attention. Lighttpd\u2019s FastCGI can be configured to support PHP with opcode caches (like APC) properly and efficiently. Additionally, it has received attention from its popularity within the Python, Perl, Ruby and Lua communities. Lighttpd also supports WebDNA, the resilient in-memory database system designed to build database-driven websites. It is a popular web server for the Catalyst and Ruby on Rails web frameworks.<\/p>\n<h4 id=\"prerequisites\" class=\"fittexted_for_content_h4\"><span class=\"ez-toc-section\" id=\"1Prerequisites_for_installing\"><\/span>1.Prerequisites for installing<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li>CentOS 7.<\/li>\n<li>root privileges.<\/li>\n<\/ul>\n<p>Lets see the installing process, by steps.<\/p>\n<h4 id=\"-installing-mariadb-as-mysql-drop-in-replacement\" class=\"fittexted_for_content_h4\"><span class=\"ez-toc-section\" id=\"2Installing_Mysql\"><\/span>2.Installing Mysql<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>For installing and configuring Mysql refer Step No.3 at the below link<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"6d5Rkuo2gV\"><p><a href=\"https:\/\/chennaiwebhosting.in\/blog\/2019\/11\/25\/installing-cacti-monitoring-tool-on-centos-7\/\">Monitoring your Server using Cacti<\/a><\/p><\/blockquote>\n<h4 id=\"-installing-lighttpd\" class=\"fittexted_for_content_h4\"><span class=\"ez-toc-section\" id=\"3Installing_Lighttpd\"><\/span>3.Installing Lighttpd<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>Basically, Lighttpd and PHP-FPM are not available from the official CentOS repositories, so we should enable the EPEL repository<\/p>\n<pre>#yum -y install epel-release<\/pre>\n<p>Now, Importing the EPEL GPG-key and update<\/p>\n<pre># rpm --import \/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-EPEL-7<\/pre>\n<pre># yum update<\/pre>\n<p>Let, install Lighttpd now.<\/p>\n<pre>#yum -y install lighttpd<\/pre>\n<p>Create the system startup links for Lighttpd (so that Lighttpd starts automatically whenever the system boots) and start it<\/p>\n<pre>#systemctl enable \u00a0lighttpd.service\r\n#systemctl start \u00a0lighttpd.service<\/pre>\n<p>In some cases, if Lighttpd fails to start with the following error message.<\/p>\n<p><strong>(network.c.203) socket failed: Address family not supported by protocol<\/strong><\/p>\n<p>Open Lighttpd configuration file and modify accordingly<\/p>\n<pre>#nano \/etc\/lighttpd\/lighttpd.conf<\/pre>\n<p>Here,\u00a0change <span class=\"system\">server.use-ipv6<\/span> from <span class=\"system\">enable<\/span> to <span class=\"system\">disable<\/span>:<\/p>\n<pre>[...]\r\n##\r\n## Use IPv6?\r\n##\r\nserver.use-ipv6 = \"disable\"\r\n[...]\r\n<\/pre>\n<p>Now, try to start Lighttpd again \u2013 it should now work without any problem:<\/p>\n<pre>#systemctl start \u00a0lighttpd.service<\/pre>\n<p>Now direct your browser to <span class=\"system\">http:\/\/server_ip_address\/<\/span>, and you should see the following page:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-644 size-full\" src=\"https:\/\/i2.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2017\/11\/lighttpd.png?resize=1136%2C817\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" srcset=\"https:\/\/i1.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2017\/11\/lighttpd.png?w=1136&amp;ssl=1 1136w, https:\/\/i2.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2017\/11\/lighttpd.png?resize=300%2C216&amp;ssl=1 300w, https:\/\/i2.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2017\/11\/lighttpd.png?resize=768%2C552&amp;ssl=1 768w, https:\/\/i2.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2017\/11\/lighttpd.png?resize=1024%2C736&amp;ssl=1 1024w\" alt=\"Lighttpd with PHP-FPM\" width=\"909\" height=\"653\" data-attachment-id=\"644\" data-permalink=\"https:\/\/www.webhostingchennai.co.in\/blog\/installing-lighttpd-with-php-fpm-and-mysql-on-centos-7\/lighttpd\/\" data-orig-file=\"https:\/\/i1.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2017\/11\/lighttpd.png?fit=1136%2C817&amp;ssl=1\" data-orig-size=\"1136,817\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"lighttpd\" data-image-description=\"\" data-medium-file=\"https:\/\/i2.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2017\/11\/lighttpd.png?fit=300%2C216&amp;ssl=1\" data-large-file=\"https:\/\/i1.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2017\/11\/lighttpd.png?fit=1024%2C736&amp;ssl=1\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Note :\u00a0Lighttpd\u2019s default document root is <span class=\"system\">\/var\/www\/lighttpd\/<\/span> on CentOS 7, and the configuration file is <span class=\"system\">\/etc\/lighttpd\/lighttpd.conf<\/span>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to install Lighttpd with PHP-FPM and Mysql on CentOS 7.3 Lighttpd? Lets see about it : lighttpd\u00a0 a web server for Linux and Windows operating systems, also an alternative to Apache web server. It is also called Lighty. It is designed to be secure, fast, standards-compliant, and flexible while being optimized for speed-critical environments. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":122,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[1],"tags":[40,41,42],"class_list":["post-119","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-home","tag-installing-lighttpd","tag-installing-lighttpd-in-centos","tag-lighttpd-installation"],"_links":{"self":[{"href":"https:\/\/chennaiwebhosting.in\/blog\/wp-json\/wp\/v2\/posts\/119","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chennaiwebhosting.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chennaiwebhosting.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chennaiwebhosting.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chennaiwebhosting.in\/blog\/wp-json\/wp\/v2\/comments?post=119"}],"version-history":[{"count":4,"href":"https:\/\/chennaiwebhosting.in\/blog\/wp-json\/wp\/v2\/posts\/119\/revisions"}],"predecessor-version":[{"id":127,"href":"https:\/\/chennaiwebhosting.in\/blog\/wp-json\/wp\/v2\/posts\/119\/revisions\/127"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/chennaiwebhosting.in\/blog\/wp-json\/wp\/v2\/media\/122"}],"wp:attachment":[{"href":"https:\/\/chennaiwebhosting.in\/blog\/wp-json\/wp\/v2\/media?parent=119"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chennaiwebhosting.in\/blog\/wp-json\/wp\/v2\/categories?post=119"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chennaiwebhosting.in\/blog\/wp-json\/wp\/v2\/tags?post=119"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}