码迷,mamicode.com
首页 > 系统相关 > 详细

Linux环境下docker搭建wordpress应用

时间:2018-05-07 13:25:01      阅读:223      评论:0      收藏:0      [点我收藏+]

标签:最新版   登录   password   a20   mysq   already   cbe   latest   SHA256   

  • 安装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设置页面
      技术分享图片
    • 完成配置之后,登录wordpress
      技术分享图片
    • 设置站点之后,点击发布
      技术分享图片

Linux环境下docker搭建wordpress应用

标签:最新版   登录   password   a20   mysq   already   cbe   latest   SHA256   

原文地址:https://www.cnblogs.com/magicianyin/p/9001967.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!