LAMP的fastcgi方式应用phpmyadm和wordpress

2021-05-19 04:27

阅读:407

标签:fastcgi

LAMPfastcgi方式应用phpmyadmwordpress

两台主机

一台A apachephp-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


评论


亲,登录后才可以留言!