The script was made to be run on CentOS 6.* to install
PHP-FPM FastCGI environment + memcached daemon + Nginx Web server

1. Unpack the entire archive into
/usr/local/src/arc
(if you choose any other location, change base source directory in
nginx-phpfpm-memcached-install.sh
to whatever meets your needs)

2. Run 
nginx-phpfpm-memcached-install.sh
and wait until completion. It may take 15-30 minutes to build all 
the software, depending on your server efficiency

What this script does:
1. Builds FPM version of PHP 5.3.* and installs XCache opcode cache
2. Builds memcached daemon binary and libmemcached library to communicate
with it; also installs PHP memcached PECL extension
3. Builds Nginx and copies a basic configuration suitable for most
PHP-driven files
4. Creates /local/www/localhost as Web root for the default site and places
an index.php invoking phpinfo() there

The script adds the following services and marks them to run upon startup:
php53-fpm
nginx

Script also adds memcahed to autostart (see /etc/rc.d/rc.local) and adds
path to PHP binaries to /etc/profile

Note that script installs software in the following manner:

/usr/local/package-version
and makes a symlink of the kind
/usr/local/package -> /usr/local/package-version

E.g., in case of PHP:
/usr/local/php-5.3.10-fpm
and
/usr/local/php -> /usr/local/php-5.3.10-fpm

This allows you to compile several separate versions and easily assign
any of them as default one.

Note: you are strictly advised to browse and correct
/etc/rc.d/rc.local
  - to specify the amount of memory used by memcached
/usr/local/php/lib/php.ini
  - to tune your PHP installation to your needs
/usr/local/php/etc/php53-fpm.conf
  - to tune your PHP-FPM FastCGI server
/usr/local/nginx/conf/nginx.conf
  - to tune your Nginx installation
  
Make sure you insert proper domain name into nginx.conf. After you do that,
run these commands

service php53-fpm start
service nginx start

and open the mentioned domain in browser. If everything (including domain's
DNS) are set up correctly, you'll see phpinfo() output.

The script isn't that terribly clever or flexible. Additional functionality
might be added if sufficient amount of requests are received.

Bring your comments/suggestions to
mailto:konstantin@boyandin.com
or send via
http://vpseer.com/contact

Thanks.