LAMPoffastcgiapplyphpmyadm andwordpress
Two hosts
OneA apacheand php-fpm
OneB mariadb server
1. A Install the required packages and start the service
yum install httpd php-fpm php-mysql
systemctl start httpd
systemctl start php-fpm
B: yum install mariadb-server
systemctl start mariadb
Run the security script: mysql_secure_installation
2 A: vim /etc/httpd/conf.d/fcgi.conf
DirectoryIndex index.php
ProxyRequests Off
ProxyPassMatch ^/(.*\ .php)$fcgi://127.0.0.1:9000/var/www/html/$1
systemctl reload httpd
3 B database creation user And authorize
mysql -uroot -pcentos
> create database blogdb;
> grant all wpdb.* to wpuser@’192.168.136. %’identified b y’centos’;
> flush privileges;
Deploywordpress
tar xvf wordpress-4.8.1-zh_CN.tar.gz
cp -r wordpress /var/www/html /blog
cd /var/www/html/blog
cp wp-config-sample.php wp-config.php
vim wp-config. php
define(‘DB_NAME’,’wpdb’);
define(‘DB_USER’,’wpuser’);
define(‘DB_PASSWORD’, ‘centos’);
define(‘DB_HOST’, ‘192.168.37.107’);
4 Test php connection: http://192.168.136.170/index.php
Test wordpress http://192.168.136.170/blog
< span style="font-family:'宋体';">