Requirements:
Centos 7 lamp (PHP-FPM)
(1) The three are separated from the three hosts.
(2) one virtual host is used to provide phpMyAdmin; the other virtual host is used to provide WordPress;
(3) xcache
Lab preparation:
# Setenforce 0 # systemctl stop iptables # systemctl stop firwalld Modify file: Linux:/etc/hosts windows: \ windows \ system32 \ drivers \ etc \ hosts add content: 10.0.0.0.61 10.0.0.61
Lab Environment
The three are separated from three hosts.
host1: 10.0.0.61 httpdhost2: 10.0.0.62 php-fpmhost3: 10.0.0.63 mariadb
Host1
# yum install httpd -y
Host2
# yum install php-fpm php-mysql php-mbstring -y
Edit the configuration file:
# Vim/etc/php-fpm.d/www. conf Listen = 127.0.0.1: 9000 listen. allowed_clients = 127.0.0.1 changed to listen = 10.0.0.62: 9000 // local IP address, which port is listening to listen. allowed_clients = 10.0.0.61 // address to which access is allowed
systemctl start php-fpm
Host3
# yum install mariadb-server -y# systemctl start mariadbmysql> create user [email protected]‘10.0.0.%‘;mysql> grant all on *.* to [email protected]‘10.0.0.%‘ identified by ‘123456‘mysql> create user ‘wordpress‘@‘10.0.0.62‘;mysql> create database wordpress;mysql> grant all on wordpress.* to ‘wordpress‘@‘10.0.0.62‘ identified by ‘wordpress‘
Create a VM
Lamp-centos 7 platform three-host FastCGI Model