In the earlier post, we learned about how to install PHP installation procedure in Windows, Mac and Linux systems with apache server. In this post, I am going to explain how to install Nginx (Engine X),MySql, PHP (LEMP) server on Ubuntu. Nginx server will suitable for high availability and capable of thousands of requests simultaneously and present days usage of this server is increased as per server statistics. (http://trends.builtwith.com/Web-Server/nginx).

How to install Linux, Nginx, MySql, PHP (LEMP) on Ubuntu by Anil Kumar Panigrahi
Installation of Nginx:
Commands:
Installation of MySql:
Commands:
MySql system tables installation:
MySql installation secure
In the next steps sytem prompt for ‘root’ password then provide the root password.
Installation of PHP:
Command:
Configuration for PHP
Open a file using below command
Search for cgi.fix_pathinfo=1 replace it with cgi.fix_pathinfo=0
Default port 9000, to change open the file /etc/php5/fpm/pool.d/www.conf
Once change the port then restart PHP
Change the default virtual host file then open the file /etc/nginx/sites-available/default
location ~ .php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
From this step we have done the installation.
To effect the above steps then restart the Nginx
Write the simple PHP file
echo phpinfo();
?>
Run the PHP file it will display the web server details.
PHP default port : 9000
MySql default port : 3306