1. Install PHP 5
We must pass PHP-FPM to get PHP5 to work properly, install the command:
Apt-get Install PHP5-FPM
PHP-FPM is a daemon process.
2. Install MySQL 5 database
To install the MySQL Run command:
Apt-get Install Mysql-server mysql-client
During the installation, you will be asked to set up a Root account password and enter it two consecutive times:
New password for the MySQL "root" User: <– Enter your password
Repeat password for the MySQL "root" User: <– input again
3 Installing Nginx
Before installing Nginx, if you have installed Apache2 first remove the Nginx in the installation:
Service Apache2 Stop
Update-rc.d-f apache2 Remove
Apt-get Remove Apache2
Apt-get Install Nginx
To start the Nginx service:
Service Nginx Start
Try the installation successfully, enter localhost or IP address in the browser , if Welcome to nginx! appears, the installation is successful:
Welcome to nginx!
3-1 Configuring Nginx
In Ubuntu 14.04, the default root directory is /usr/share/nginx/html.
Nginx configuration file vim /etc/nginx/nginx.conf
默认虚拟主机设置文件 vim /etc/nginx/sites-available/default
(Purely self-remembering notes)
Ubuntu Installation Php+mysql+nginx