I found these great advanced examples of deploying nginx, PHP5, and MySQL/MariaDB from scratch including:
– Installing Nginx from package repository or compiling it from scratch;
– Installing php5, php-mysql, php-fpm and other php libraries if needed (like php-gd);
– Installing MySql or Maria-DB;
– And off course setting up php, nginx and mysql/mariadb.
Tip for Beginners:
For a more guided and beginner / n00b-level tutorial on this, try checking out my Kick-Ass Wordpress Optimization Series that discusses everything from how to create a virtual server to how to optimize your nginx / PHP-FPM setup.