好物优选点击查看详情 京东购买

暂无内容

Linux环境下docker搭建wordpress应用

  • 安装wordpress
    这里安装的是最新版本的wordpress
magicianyin@ubuntu:~$ sudo docker pull wordpress:latest latest: Pulling from library/wordpress f2aa67a397c4: Pull complete c533bdb78a46: Pull complete 65a7293804ac: Pull complete 35a9c1f94aea: Pull complete 651774c607cc: Pull complete 7c01fbe5ed3d: Pull complete 9ff29ed84bfc: Pull complete 647feb0f6355: Pull complete 0b9d1c540863: Pull complete 3416ab5471ed: Pull complete 246c5fc29b1a: Pull complete 547f032430ec: Pull complete 5e139e5ea13c: Pull complete a94f7c8b762e: Pull complete 34e9c8ec80d7: Pull complete 1e3ee2260fe8: Pull complete 04287c0c64aa: Pull complete ef94d58d88a0: Pull complete 5368638c2501: Pull complete 5ef154e9a628: Pull complete Digest: sha256:bd2ee79c6b461aaef56c7dc589d5a8ec9059fa2d01005cbe097e47d943973ca2 Status: Downloaded newer image for wordpress:latest
  • 安装mysql
    这里安装的是mysql5.7的版本,然后也可以安装最新的版本
magicianyin@ubuntu:~$ sudo docker pull mysql:5.7 5.7: Pulling from library/mysql f2aa67a397c4: Already exists 1accf44cb7e0: Already exists 2d830ea9fa68: Already exists 740584693b89: Already exists 4d620357ec48: Already exists ac3b7158d73d: Already exists a48d784ee503: Already exists bf1194add2f3: Pull complete 0e5c74178a02: Pull complete e9201d309436: Pull complete bf1ac4524e8e: Pull complete Digest: sha256:f030e84582d939d313fe2ef469b5c65ffd0f7dff3b4b98e6ec9ae2dccd83dcdf Status: Downloaded newer image for mysql:5.7 a84b2b2199a11a4fdfbde13b71f5174c07606ba99d455d4bcbd4b6e7c4661d16
  • 启动MySQL
magicianyin@ubuntu:~$ sudo docker run --name mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:5.7
  • 配置wordpress
    这里指向的8080的端口
magicianyin@ubuntu:~$ sudo docker run --name wordpress --link mysql:mysql -p 8080:80 -d wordpress 04aad536623d230af9ee8a1a6c6493171a3b3f27c15a200ddd6db16f9f9b774a
  • 启动worpress
    • 在地址栏中输入xx.xx.xx.xx:8080(这里是自己服务器的地址),打开wordpress-admin设置页面
      ALT
    • 完成配置之后,登录wordpress
      ALT
    • 设置站点之后,点击发布
      ALT

转载于:https://www.cnblogs.com/magicianyin/p/9001967.html

原文链接:https://blog.csdn.net/weixin_34226706/article/details/94292395?ops_request_misc=&request_id=240a025250a34f2fb94e001f9213a178&biz_id=&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~koosearch~default-13-94292395-null-null.268%5Ev1%5Econtrol&utm_term=docker%E3%80%81wordpress%E3%80%81wordpress%E5%BB%BA%E7%AB%99%E3%80%81wordpress%E4%B8%BB%E9%A2%98%E3%80%81%E5%AE%B9%E5%99%A8%E9%95%9C%E5%83%8F%E3%80%81

© 版权声明
THE END
喜欢就支持一下吧
点赞7 分享