Results 1 to 4 of 4
  1. #1

    nginx and php installation on Debian tutorial

    http://blog.benweblife.fr/index.php/...ebian/?lang=en

    (This tutorial is not written by me and I'm not providing support on it. I'm sharing it with WHBT)

    Hello !

    You'll find here a tutorial on howto install Php with Nginx on Debian, in a few lines!
    Installation

    Debian packages was made by me :
    Warning, packages are only for the testing or squeeze version of Debian and for 64bit, the 32bit packages will be available on Saturday.

    cd /usr/src/
    wget http://labs.benweblife.fr/debian/tes....2-1_amd64.deb
    dpkg -i php5-fpm_5.3.2-1_amd64.deb

    If an error message appear concerning the depending of php5-common package, two possibility:

    apt-get/aptitude install php5-common

    or

    wget http://labs.benweblife.fr/debian/tes....2-1_amd64.deb
    dpkg -i php5-common_5.3.2-1_amd64.deb

    So, easy, doesn't it?
    Configuration

    Configurations files are in this directory: /etc/php5/fpm/

    One of them is php5-fpm.conf:

    ; Choose how the process manager will control the number of child processes: dynamic create process "on-demand" or static create all process in one time
    pm = dynamic
    ; the maximum number of child processes to be created, Equivalent to the Apache MaxClients directive.
    pm.max_children = 50
    ; The number of child processes created on startup. ideally : min_spare_servers + (max_spare_servers - min_spare_servers) / 2
    pm.start_servers = 8
    ; minimum number of idle server processes
    pm.min_spare_servers = 5
    ; maximum number of idle server processes
    pm.max_spare_servers = 35
    ; number of requests each child process should execute before respawning. (0 = endless)
    pm.max_requests = 0

    That's all for FPM, now its Nginx part :

    Copy these lines in your configuration site file

    location ~ \.php$ {

    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;

    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param SERVER_NAME $http_host;
    fastcgi_ignore_client_abort on;
    }

    And that is, its ready!

    Don't forget to restart all services, and to create a "phpinfo()" file :

    /etc/init.d/nginx reload
    /etc/init.d/php5-fpm restart
    echo "<?php phpinfo() ?>" > /var/www/phpinfo.php

    Others

    I recommend installation of this module :

    apt-get/aptitude install php5-suhosin php5-mysql php-pear php5-dev
    pecl install htscanner-alpha
    echo "extension=htscanner.so" > /etc/php5/conf.d/htscanner.ini

    The htscanner extension scan .htaccess file for the php directive.

    Don't install the APC (Alternative Php Cache), it will crash php.

    Enjoy ! It rocks !

  2. #2
    Join Date
    Mar 2010
    Location
    /global/asia/vn
    Posts
    435
    Can you write full tutorial to install: Nginx + Php fpm + mysql + xcache?
    If yes, please write carefully step by step. Thanks!

  3. #3
    Great. make it a full fledged one.

  4. #4
    Join Date
    Jun 2010
    Posts
    592
    Quote Originally Posted by minhmeo View Post
    Can you write full tutorial to install: Nginx + Php fpm + mysql + xcache?
    If yes, please write carefully step by step. Thanks!
    Nginx + Php + mysql + eAccelerator:
    http://www.rockia.com/2010/05/how-to...untu-or-centos

Similar Threads

  1. PHP Caching : APC Installation and Configuration Tutorial
    By agnivo007 in forum VPS Tutorials
    Replies: 12
    Last Post: 04-18-2011, 07:40 AM
  2. nginx installation
    By alienmare in forum Systems Management Requests
    Replies: 5
    Last Post: 07-15-2009, 05:45 PM
  3. Debian linux Web Hosting Setup Tutorial Help.
    By SaintSamuel in forum Hosting Security and Technology
    Replies: 0
    Last Post: 10-15-2005, 04:21 PM
  4. nameserver tutorial and/or installation
    By webephex in forum Employment / Job Offers
    Replies: 2
    Last Post: 03-10-2004, 11:24 PM
  5. Debian Server-Setup Tutorial
    By hausmasta in forum Hosting Security and Technology
    Replies: 3
    Last Post: 12-01-2003, 07:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •