快速搭建wordpress和phpAdmin
来源:互联网 发布:macbook软件下载 编辑:程序博客网 时间:2024/04/30 09:05
说明:关于LNMP的快速搭建已在上篇博文说明,这里只演示安装wordpress和phpAdmin
1.在mariadb主机上创建两个数据库以及用户授权
(1)创建和授权wordpress数据库
MariaDB [(none)]> create database wpdb;
MariaDB [(none)]> grant all on wpdb.* to wpuser@'192.168.80.%' identified by 'wppass';
MariaDB [(none)]> flush privileges;
(2)创建和授权phpAdmin数据库
MariaDB [(none)]> create database pma;
MariaDB [(none)]> grant all on pma.* to pmauser@'192.168.80.%' identified by 'pmapass';
MariaDB [(none)]> flush privileges;
2.下载wordpress安装包和phpAdmin安装包
(1)编辑worpress配置文件
# mv wp-config-sample.php wp-config.php
# vim wp-config.php
编辑内容如下:
/** WordPress数据库的名称 */
define('DB_NAME', 'wpdb');
/** MySQL数据库用户名 */
define('DB_USER', 'wpuser');
/** MySQL数据库密码 */
define('DB_PASSWORD', 'wppass');
/** MySQL主机 */
define('DB_HOST', '192.168.80.118');
(2)编辑phpAdmin配置文件
# mv config.sample.inc.php config.inc.php
# vim config.inc.php
编辑内容如下:
$cfg['Servers'][$i]['host'] = '192.168.80.118';
3.虚拟主机的配置(一个虚拟主机一个配置文件)
(1)wordpress虚拟主机
# vim wordpress.conf
server {
listen 80;
server_name www.mywp.com;
location / {
root /www/html;
index index.html;
}
location /wordpress/ {
root /www/php;
index index.php;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /www/php/$fastcgi_script_name;
include fastcgi_params;
}
}
(2)phpAdmin虚拟主机
# vim phpAdmin.conf
server {
listen 80;
server_name www.mypma.com;
location / {
root /www/html;
index index.html;
}
location /pma/ {
root /www/php;
index index.php;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /www/php/$fastcgi_script_name;
include fastcgi_params;
}
}
提示:这里可能事先要安装mbstring和php
4.配置本地hosts文件
192.168.80.128 www.mywp.com
192.168.80.128 www.mypma.com
1.在mariadb主机上创建两个数据库以及用户授权
(1)创建和授权wordpress数据库
MariaDB [(none)]> create database wpdb;
MariaDB [(none)]> grant all on wpdb.* to wpuser@'192.168.80.%' identified by 'wppass';
MariaDB [(none)]> flush privileges;
(2)创建和授权phpAdmin数据库
MariaDB [(none)]> create database pma;
MariaDB [(none)]> grant all on pma.* to pmauser@'192.168.80.%' identified by 'pmapass';
MariaDB [(none)]> flush privileges;
2.下载wordpress安装包和phpAdmin安装包
(1)编辑worpress配置文件
# mv wp-config-sample.php wp-config.php
# vim wp-config.php
编辑内容如下:
/** WordPress数据库的名称 */
define('DB_NAME', 'wpdb');
/** MySQL数据库用户名 */
define('DB_USER', 'wpuser');
/** MySQL数据库密码 */
define('DB_PASSWORD', 'wppass');
/** MySQL主机 */
define('DB_HOST', '192.168.80.118');
(2)编辑phpAdmin配置文件
# mv config.sample.inc.php config.inc.php
# vim config.inc.php
编辑内容如下:
$cfg['Servers'][$i]['host'] = '192.168.80.118';
3.虚拟主机的配置(一个虚拟主机一个配置文件)
(1)wordpress虚拟主机
# vim wordpress.conf
server {
listen 80;
server_name www.mywp.com;
location / {
root /www/html;
index index.html;
}
location /wordpress/ {
root /www/php;
index index.php;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /www/php/$fastcgi_script_name;
include fastcgi_params;
}
}
(2)phpAdmin虚拟主机
# vim phpAdmin.conf
server {
listen 80;
server_name www.mypma.com;
location / {
root /www/html;
index index.html;
}
location /pma/ {
root /www/php;
index index.php;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /www/php/$fastcgi_script_name;
include fastcgi_params;
}
}
提示:这里可能事先要安装mbstring和php
4.配置本地hosts文件
192.168.80.128 www.mywp.com
192.168.80.128 www.mypma.com
阅读全文
0 0
- 快速搭建wordpress和phpAdmin
- wordpress环境快速搭建
- LAMP环境下搭建phpadmin页面和discuz论坛
- 搭建phpAdmin数据库管理系统
- Wordpress 快速搭建你的博客站点
- JAE快速、免费搭建WordPress博客
- 使用WordPress快速搭建企业网站
- phpadmin
- PHPadmin
- 利用腾讯云1元机和服务市场wordpress快速搭建个人博客
- wordpress的搭建和配置
- 搭建xampp和wordpress问题解决
- Wordpress本地搭建和安装
- PHPAdmin的安装和配置
- 安装apache和phpadmin小结
- php4+apache+mysql+phpAdmin+Zend环境搭建
- Redhat快速安装LAMP和WordPress
- 使用wordpress快速搭建podcast资源发布平台
- mtcnn训练及出现问题总结
- 缓存中的热点key问题
- TCP/IP详解学习笔记(12)-TCP的超时与重传
- 微软MSDN官方(简体)中文操作系统全下载
- laravel 路由失败
- 快速搭建wordpress和phpAdmin
- c++ 数据结构实训 希尔排序
- vmware + ubuntu + docker+ tensorflow
- TCP/IP详解学习笔记(13)-TCP坚持定时器,TCP保活定时器
- Servlet(一)
- 关于getGenericSuperclass方法和getActualTypeArguments()[0]方法的使用
- Navicat连接oracle数据库报错:ORA-12737 Instant Client Light:unsupported server character set ZHS16GBK
- 剑指offer——第一次只出现一次的字符
- redis 安装