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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值