标签:fastcgi
两台主机
一台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
本文出自 “13162732” 博客,请务必保留此出处http://13172732.blog.51cto.com/13162732/1975463
LAMP的fastcgi方式应用phpmyadm和wordpress
标签:fastcgi
原文地址:http://13172732.blog.51cto.com/13162732/1975463