zoukankan      html  css  js  c++  java
  • 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
  • 相关阅读:
    python中的字符数字之间的转换函数
    java中的this和super的作用和异同和C++中调用父类的构造函数
    夺命雷公狗---Smarty NO:19 html_options函数
    夺命雷公狗---Smarty NO:18 html_checkboxes
    夺命雷公狗---Smarty NO:17 html_table函数
    夺命雷公狗---Smarty NO:16 html_image函数
    夺命雷公狗---Smarty NO:15 fetch函数
    夺命雷公狗---Smarty NO:14 debug调试
    夺命雷公狗---Smarty NO:13 系统自定义函数(plugins)
    夺命雷公狗---Smarty NO:12 section函数
  • 原文地址:https://www.cnblogs.com/magicianyin/p/9001967.html
Copyright © 2011-2022 走看看