標籤:wordpress windows
需求:
CentOS 7 lamp(php-fpm)
(1)三者分離於三台主機
(2)一個虛擬機器主機用於提供phpMyAdmin;另一個虛擬機器主機用於提供wordpress;
(3)xcache
實驗準備:
# setenforce 0# systemctl stop iptables # systemctl stop firwalld修改檔案: Linux: /etc/hosts windows:\Windows\System32\drivers\etc\hosts新增內容: 10.0.0.61 10.0.0.61
實驗環境
三者分離於三台主機
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
編輯設定檔:
# vim /etc/php-fpm.d/www.conf listen = 127.0.0.1:9000 listen.allowed_clients = 127.0.0.1 修改為 listen = 10.0.0.62:9000 //本地的ip地址,監聽在哪個連接埠 listen.allowed_clients = 10.0.0.61 //允許哪個地址的訪問
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‘
建立虛擬機器主機
LAMP- CentOS 7平台三機FastCGI模型