1. Nginx yum install nginx

# # open

Nginx service nginx start or nginx -s reload

2. Install MYSQL yum localinstall http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm

yum install mysql-community-server

/ / open

mysql service mysqld start

// Check the password of the mysql root account

more /var/log/mysqld.log

Mysqlmysql -uroot -p

// Change the password

set password=password(‘Lyhwbt.052336’);

// Change the root user can log in remotely

GRANT  ALL  PRIVILEGES  ON  .  TO  ‘root’@’%’IDENTIFIED  BY  ‘Lyhwbt.052336’  WITH GRANT OPTION;

// Refresh (probably not required)

flush privileges;

3. Installing PHP RPM – Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

/ / check

yum search php71w

// Install PHP and the extension

yum install php71w php71w-fpm php71w-cli php71w-common php71w-devel php71w-gd php71w-pdo php71w-mysql php71w-mbstring php71w-bcmath

// Start the service

service php-fpm start

/ / modify

/etc/nginx/nginx.conf

Make it support PHP see below

/ / restart

Nginxservice nginx restart or nginx -s reload

// Nginx configuration file

user nginx root;

worker_processes 2;

error_log /var/log/nginx/error.log crit;

#error_log logs/error.log notice;

#error_log logs/error.log info;

pid /run/nginx.pid;

events {

 worker_connections 2048;
Copy the code

}

http {

charset utf-8; root /www; index index.php; include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server { listen 80; Server_name 127.0.0.1; # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 location ~ \.php${root/WWW; Fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; include fastcgi.conf; }}Copy the code

}