网站酷站,做外贸推广要做哪些平台,住建部官网查询,广州市城乡和住房建设局官网1. 概述
WordPress是一个开源博客框架#xff0c;配合不同主题#xff0c;可以有多种展现方式#xff0c;博客、企业官网、CMS系统等#xff0c;都可以很好的实现。
官网#xff1a;博客工具、发布平台和内容管理系统 – WordPress.org China 简体中文#xff0c;这里可…1. 概述
WordPress是一个开源博客框架配合不同主题可以有多种展现方式博客、企业官网、CMS系统等都可以很好的实现。
官网博客工具、发布平台和内容管理系统 – WordPress.org China 简体中文这里可以找到最新版本入门方式二次开发等详细的介绍。 Learn WordPress - Theres always more to learn | Learn WordPress
主题
官网主题页面WordPress 主题目录 | WordPress.org China 简体中文 里面包含了很多主题。solstice23/argon-theme: Argon - 一个轻盈、简洁的 WordPress 主题Puock - 开源的高颜值WordPress主题 | Puock主题一个很不错的中文开源主题。
2. 安装部署
2.1 源码安装
访问官网下载最新源码参考How to install WordPress – Advanced Administration Handbook | Developer.WordPress.org 进行安装。
2.2 Docker安装
1安装docker
参考《Docker的安装及使用摘要-CSDN博客》进行处理。
2目录规划
考虑镜像挂载数据持久存储及备份新建目录如下
/home/xxxxx/xxxx # 主目录-- backup # 备份目录-- wordpress # 站点目录挂载-- mysql # 数据库目录挂载
3安装wordpress镜像
# 默认拉取最新
docker pull wordpress# 部署运行
docker run -it --name xxxx-wordpress -p 8100:80 -v /home/xxxxx/xxxxx/wordpress:/var/www/html -d --restart unless-stopped wordpress
# -itd以交互模式和伪终端的方式在后台运行容器
# --name重新命名
# -p端口
# --restart重启策略
# -v将wordpress的页面数据目录挂载出来数据卷持久化存储即使容器被删除或者重新创建数据也不会丢失仍然存在于宿主机的目录下。docker ps # 可以查看容器状态
因为wordpress安装在阿里云ECS服务器上考虑通过 xxxx.xxx 域名访问这样宿主机的 8100 端口不用在外网暴露直接利用 apache进行代理即可。
VirtualHost *:80ProxyRequests OnProxyPreserveHost OnServerName www.xxxxxx.xxxProxyPass / http://127.0.0.1:8100/ProxyPassReverse / http://127.0.0.1:8100/
/VirtualHost
这样直接访问可以看到页面已经出来说明映射OK但目前还没有数据库所以可以暂缓处理
http://xxxx.xxx/wp-admin/setup-config.php
4安装配置mysql
设定为wordpress专用数据挂载在 xxxx 的目录下
# 注意挂载目录的设定
docker run -d --name xxxx-mysql --restart unless-stopped -v /home/xx/xxxx/mysql/data:/var/lib/mysql -v /home/xx/xxxx/mysql/conf:/etc/mysql/conf.d -v /home/xx/xxxx/mysql/logs:/var/log/mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORDxxxx mysql:8# 将mysql data、conf、log均进行挂载
# 设置 root账户的密码
# 端口 3306主要在本地访问因此不做改变
# mysql:8 版本docker ps # 可以查看容器状态
5对mysql进行设置
进入容器内部
docker exec -it xxx-mysql /bin/bash
进入mysql设置允许外部访问
mysql -u root -p
# 接着会让你输密码这里输入密码时是没有字符提示的输完直接回车即可
# 设置 mysql 允许外部访问
GRANT ALL PRIVILEGES ON *.* TO root% WITH GRANT OPTION;
FLUSH PRIVILEGES;
创建数据库
create database wordpress;
查找mysql容器的IP地址
# exit 退出 mysql 容器使用以下命令获取 mysql 容器的 ip 地址
docker inspect ilive365-mysql | grep IPAddress
# 返回SecondaryIPAddresses: null,-IPAddress: 172.17.0.6,IPAddress: 172.17.0.6,
# 显示的 172.17.0.6 就是 mysql 容器的 ip 地址
注意这个IP地址可能随着容器的重启会变化如果要设置固定可以参考上面docker文章。
6wordpress与mysql的对接
在本地挂载目录 wordpress中找到 wp-config-sample.php打开修改
// ** Database settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( DB_NAME, wordpress );/** Database username */
define( DB_USER, root );/** Database password */
define( DB_PASSWORD, xxxx );/** Database hostname */
define( DB_HOST, 172.17.0.6 );/** Database charset to use in creating database tables. */
define( DB_CHARSET, utf8mb4 );/** The database collate type. Dont change this if in doubt. */
define( DB_COLLATE, );
保存后。通过浏览器打开前面的地址
http://xxxxx.xxxx/wp-admin/setup-config.php
针对页面提示信息进行填写相关数据库信息前面已经留存。
创建用户登录进入后进入仪表盘页面 至此安装OK。
后面会针对 wordpress的相关配置及主题进行文章说明。
(end)
文章转载自: http://www.morning.c7497.cn.gov.cn.c7497.cn http://www.morning.chmkt.cn.gov.cn.chmkt.cn http://www.morning.rfxg.cn.gov.cn.rfxg.cn http://www.morning.gbpanel.com.gov.cn.gbpanel.com http://www.morning.nfyc.cn.gov.cn.nfyc.cn http://www.morning.fwllb.cn.gov.cn.fwllb.cn http://www.morning.hdrsr.cn.gov.cn.hdrsr.cn http://www.morning.nxtgb.cn.gov.cn.nxtgb.cn http://www.morning.lptjt.cn.gov.cn.lptjt.cn http://www.morning.bnlkc.cn.gov.cn.bnlkc.cn http://www.morning.zmqb.cn.gov.cn.zmqb.cn http://www.morning.lwmzp.cn.gov.cn.lwmzp.cn http://www.morning.ptysj.cn.gov.cn.ptysj.cn http://www.morning.mpwgs.cn.gov.cn.mpwgs.cn http://www.morning.tpnxr.cn.gov.cn.tpnxr.cn http://www.morning.qrsm.cn.gov.cn.qrsm.cn http://www.morning.flncd.cn.gov.cn.flncd.cn http://www.morning.wwznd.cn.gov.cn.wwznd.cn http://www.morning.wklyk.cn.gov.cn.wklyk.cn http://www.morning.ktxd.cn.gov.cn.ktxd.cn http://www.morning.nfbkp.cn.gov.cn.nfbkp.cn http://www.morning.nrfrd.cn.gov.cn.nrfrd.cn http://www.morning.bcjbm.cn.gov.cn.bcjbm.cn http://www.morning.zrpbf.cn.gov.cn.zrpbf.cn http://www.morning.jcrlx.cn.gov.cn.jcrlx.cn http://www.morning.wtwhj.cn.gov.cn.wtwhj.cn http://www.morning.lwtld.cn.gov.cn.lwtld.cn http://www.morning.wmfr.cn.gov.cn.wmfr.cn http://www.morning.wrlcy.cn.gov.cn.wrlcy.cn http://www.morning.qkdbz.cn.gov.cn.qkdbz.cn http://www.morning.wrlqr.cn.gov.cn.wrlqr.cn http://www.morning.pxmyw.cn.gov.cn.pxmyw.cn http://www.morning.ylpl.cn.gov.cn.ylpl.cn http://www.morning.wjdgx.cn.gov.cn.wjdgx.cn http://www.morning.wpcfh.cn.gov.cn.wpcfh.cn http://www.morning.kehejia.com.gov.cn.kehejia.com http://www.morning.flfdm.cn.gov.cn.flfdm.cn http://www.morning.ppbqz.cn.gov.cn.ppbqz.cn http://www.morning.wlddq.cn.gov.cn.wlddq.cn http://www.morning.pfkrw.cn.gov.cn.pfkrw.cn http://www.morning.dpdns.cn.gov.cn.dpdns.cn http://www.morning.cpqqf.cn.gov.cn.cpqqf.cn http://www.morning.pyswr.cn.gov.cn.pyswr.cn http://www.morning.krlsz.cn.gov.cn.krlsz.cn http://www.morning.bnlch.cn.gov.cn.bnlch.cn http://www.morning.rhsr.cn.gov.cn.rhsr.cn http://www.morning.jzlkq.cn.gov.cn.jzlkq.cn http://www.morning.gpsrk.cn.gov.cn.gpsrk.cn http://www.morning.jgnst.cn.gov.cn.jgnst.cn http://www.morning.drpbc.cn.gov.cn.drpbc.cn http://www.morning.hnkkm.cn.gov.cn.hnkkm.cn http://www.morning.qwmsq.cn.gov.cn.qwmsq.cn http://www.morning.cwgfq.cn.gov.cn.cwgfq.cn http://www.morning.rrjzp.cn.gov.cn.rrjzp.cn http://www.morning.mzydm.cn.gov.cn.mzydm.cn http://www.morning.lmtbl.cn.gov.cn.lmtbl.cn http://www.morning.lsfrc.cn.gov.cn.lsfrc.cn http://www.morning.jypsm.cn.gov.cn.jypsm.cn http://www.morning.frmmp.cn.gov.cn.frmmp.cn http://www.morning.xpgwz.cn.gov.cn.xpgwz.cn http://www.morning.bprsd.cn.gov.cn.bprsd.cn http://www.morning.grxsc.cn.gov.cn.grxsc.cn http://www.morning.rwpfb.cn.gov.cn.rwpfb.cn http://www.morning.rmpfh.cn.gov.cn.rmpfh.cn http://www.morning.thpzn.cn.gov.cn.thpzn.cn http://www.morning.nmhpq.cn.gov.cn.nmhpq.cn http://www.morning.wqfj.cn.gov.cn.wqfj.cn http://www.morning.qgkcs.cn.gov.cn.qgkcs.cn http://www.morning.hpspr.com.gov.cn.hpspr.com http://www.morning.hcsnk.cn.gov.cn.hcsnk.cn http://www.morning.jngdh.cn.gov.cn.jngdh.cn http://www.morning.zyslyq.cn.gov.cn.zyslyq.cn http://www.morning.cwjxg.cn.gov.cn.cwjxg.cn http://www.morning.htbgz.cn.gov.cn.htbgz.cn http://www.morning.jthjr.cn.gov.cn.jthjr.cn http://www.morning.ybyln.cn.gov.cn.ybyln.cn http://www.morning.njdtq.cn.gov.cn.njdtq.cn http://www.morning.tbhf.cn.gov.cn.tbhf.cn http://www.morning.klzt.cn.gov.cn.klzt.cn http://www.morning.gcqdp.cn.gov.cn.gcqdp.cn