Changeset 5178bbf6


Ignore:
Timestamp:
03/29/2014 10:19:25 AM (10 years ago)
Author:
Pierre Labastie <pieere@…>
Branches:
10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 7.10, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gnome, kde5-13430, kde5-14269, kde5-14686, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, systemd-11177, systemd-13485, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
Children:
5096ebd
Parents:
0f5aa11
Message:

Use the fastCGI process manager for PHP. Fixes ticket #4844

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@12909 af4574ff-66df-0310-9fd7-8a98e5e911e0

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • general/prog/php.xml

    r0f5aa11 r5178bbf6  
    180180./configure --prefix=/usr                \
    181181            --sysconfdir=/etc            \
     182            --localstatedir=/var         \
     183            --datadir=/usr/share/php     \
    182184            --mandir=/usr/share/man      \
    183             --with-apxs2                 \
     185            --enable-fpm                 \
     186            --with-fpm-user=apache       \
     187            --with-fpm-group=apache      \
    184188            --with-config-file-path=/etc \
    185189            --with-zlib                  \
     
    205209<screen role="root"><userinput>make install                                         &amp;&amp;
    206210install -v -m644 php.ini-production /etc/php.ini     &amp;&amp;
     211mv -v /etc/php-fpm.conf{.default,}                   &amp;&amp;
    207212
    208213install -v -m755 -d /usr/share/doc/php-&php-version; &amp;&amp;
     
    243248      <application>Bison</application> as a valid version.</para>
    244249     
    245       <para><parameter>--with-apxs2</parameter>: This parameter
    246       builds the Apache HTTPD 2.0 module.</para>
     250      <para><parameter>--with-datadir=/usr/share/php</parameter>: This works
     251      around a bug in the build machinery, which installs some data to a
     252      wrong location.</para>
     253
     254      <para><parameter>--enable-fpm</parameter>: This parameter allows
     255      building the fastCGI Process Manager.</para>
    247256
    248257      <para><parameter>--with-config-file-path=/etc</parameter>: This parameter
     
    282291      installed.</para>
    283292
     293      <para><option>--with-apxs2</option>: Instead of building the fastCGI process
     294      manager, it is possible to build an <application>apache</application> module.
     295      This has some performance penalty for heavy loaded servers, but may be easier
     296      to set up. This switch is incompatible with the
     297      <parameter>--enable-fpm</parameter> and <parameter>--with-fpm-...</parameter>
     298      switches.</para>
     299
    284300  </sect2>
    285301
     
    290306      <title>Config Files</title>
    291307
    292       <para><filename>/etc/php.ini</filename> and
    293       <filename>/etc/pear.conf</filename></para>
     308      <para><filename>/etc/php.ini</filename>,
     309      <filename>/etc/pear.conf</filename> and
     310      <filename>/etc/php-fpm.conf</filename></para>
    294311
    295312      <indexterm zone="php php-config">
     
    299316      <indexterm zone="php php-config">
    300317        <primary sortas="e-etc-pear.conf">/etc/pear.conf</primary>
     318      </indexterm>
     319
     320      <indexterm zone="php php-config">
     321        <primary sortas="e-etc-php-fpm.conf">/etc/php-fpm.conf</primary>
    301322      </indexterm>
    302323
     
    325346    /etc/php.ini</userinput></screen>
    326347
    327       <para>To enable PHP support in the <application>Apache</application>
    328       web server, a new LoadModule (which should be handled automatically by the
    329       <command>make install</command> command) and AddType directives
    330       must be added to the <filename>httpd.conf</filename> file:</para>
    331 
    332 <screen><literal>LoadModule php5_module lib/apache/libphp5.so
    333 AddType application/x-httpd-php .php</literal></screen>
    334 
    335       <para>Additionally, it can be useful to add an entry for
     348      <para>To enable fastCGI support in the <application>Apache</application>
     349      web server, two LoadModule directives must be added to the
     350      <filename>httpd.conf</filename> file. They are commented out, so just issue the
     351      following command as <systemitem class="username">root</systemitem> user:</para>
     352
     353<screen role="root"><userinput>sed -i -e '/proxy_module/s/^#//'      \
     354       -e '/proxy_fgci_module/s/^#//' \
     355       /etc/httpd/httpd.conf</userinput></screen>
     356
     357      <para>Those modules accept various <command>ProxyPass</command>
     358      directives. One possibility is (as the
     359      <systemitem class="username">root</systemitem> user):</para>
     360
     361<screen role="root"><userinput>echo \
     362ProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:9000/srv/www/$1 >> \
     363/etc/httpd/httpd.conf</userinput></screen>
     364
     365      <para>Additionally, it may be useful to add an entry for
    336366      <filename>index.php</filename> to the DirectoryIndex directive of the
    337367      <filename>httpd.conf</filename> file. Lastly, adding a line to setup the
     
    348378    </sect3>
    349379
     380    <sect3  id="php-init">
     381      <title>Boot Script</title>
     382
     383      <para>
     384        To automatically start the <command>php-fpm</command> daemon when the
     385        system is rebooted, install the
     386        <filename>/etc/rc.d/init.d/php</filename> bootscript from the
     387        <xref linkend="bootscripts"/> package as the
     388        <systemitem class="username">root</systemitem> user:
     389      </para>
     390
     391      <indexterm zone="php php-init">
     392        <primary sortas="f-php">php</primary>
     393      </indexterm>
     394
     395<screen role="root"><userinput>make install-php</userinput></screen>
     396    </sect3>
     397
    350398  </sect2>
    351399
     
    360408      <seglistitem>
    361409        <seg>pear, peardev, pecl, phar (symlink), phar.phar,
    362         php, php-cgi, php-config, and phpize</seg>
    363         <seg>libphp5.so Apache module and
    364         two under /usr/lib/php/extensions/no-debug-zts-20121212/</seg>
    365         <seg>/usr/include/php, /usr/lib/php and
     410        php, php-cgi, php-config, php-fpm, and phpize</seg>
     411        <seg>dba.so and opcache.so in
     412       /usr/lib/php/extensions/no-debug-non-zts-20121212/</seg>
     413        <seg>/usr/include/php, /usr/lib/php, /usr/share/php and
    366414        /usr/share/doc/php-&php-version;</seg>
    367415      </seglistitem>
     
    395443      </varlistentry>
    396444
     445      <varlistentry id="php-fpm">
     446        <term><command>php-fpm</command></term>
     447        <listitem>
     448          <para>is the fastCGI process manager for PHP.</para>
     449          <indexterm zone="php php-fpm">
     450            <primary sortas="b-php-fpm">php-fpm</primary>
     451          </indexterm>
     452        </listitem>
     453      </varlistentry>
     454
    397455    </variablelist>
    398456
  • introduction/welcome/changelog.xml

    r0f5aa11 r5178bbf6  
    4949      <itemizedlist>
    5050        <listitem>
     51          <para>[pierre] - Use the fastCGI process manager for PHP. Fixes
     52          <ulink url="&blfs-ticket-root;4844">#4844</ulink>.</para>
     53        </listitem>
     54        <listitem>
    5155          <para>[fernando] - LibreOffice-4.2.2 additional dependencies. Thanks
    5256          Wayne B. Fixes
Note: See TracChangeset for help on using the changeset viewer.