LAMP的fastcgi方式应用phpmyadm和wordpress
两台主机
一台A apache和php-fpm
一台B mariadb server
1.A安装所需要的包并启动服务
yum install httpd php-fpm php-mysql
systemctl start httpd
systemctl start php-fpm
B: yum install mariadb-server
systemctl start mariadb
运行安全脚本: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数据库创建用户并授权
mysql -uroot -pcentos
> create database blogdb;
> grant all wpdb.* to wpuser@'192.168.136.%'identified by 'centos';
> flush privileges;
部署wordpress
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 测试php的连接:http://192.168.136.170/index.php
测试wordpress http://192.168.136.170/blog
本文转自 honeyorange 51CTO博客,原文链接:http://blog.51cto.com/13172732/1975463