技术流ken

运维拯救世界

docker部署LAMP架构并部署上线wordpress博客系统–技术流ken

 

 

第一步:直接在镜像仓库拉取LAMP镜像

[root@ken-node3 ken]# docker pull tutum/lamp

 

第二步:查看已经获取到的镜像

[root@ken-node3 ken]# docker image ls
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
tutum/lamp          latest              3d49e175ec00        3 years ago         427MB

 

第三步:启动容器

[root@ken-node3 ken]# docker run -p 80:80 -p 3306:3306 -v /ken:/var/www/html -v /ken1:/var/lib/mysql -d tutum/lamp

命令解读:

端口映射本机80端口到容易80端口,确保本机的80端口未被占用

端口映射本机3306端口到容易3306端口,确保本机的3306端口未被占用

目录映射本机的/ken目录到容器的网站根目录,以实现数据持久化及方便管理

目录映射本机的/ken1目录到容器的数据库文件目录,以实现数据持久化及方便管理

后台运行该容器

 

第四步:准备wordpress安装包到/ken目录下,并进行数据库和用户名的编辑

[root@ken-node3 ken]# ls
wordpress  wordpress-3.3.1-zh_CN.zip
[root@ken-node3 ken]# cp wordpress/* . -a
[root@ken-node3 ken]# ls
index.php    wordpress-3.3.1-zh_CN.zip  wp-blog-header.php    wp-cron.php        wp-login.php     wp-settings.php
license.txt  wp-activate.php            wp-comments-post.php  wp-includes        wp-mail.php      wp-signup.php
readme.html  wp-admin                   wp-config-sample.php  wp-links-opml.php  wp-pass.php      wp-trackback.php
wordpress    wp-app.php                 wp-content            wp-load.php        wp-register.php  xmlrpc.php

[root@ken-node3 ken]# cp wp-config-sample.php wp-config.php 

[root@ken-node3 ken]# vim wp-config.php

 

 

第五步:进入容易创建相应的数据库及用户

 

[root@ken-node3 ken]# docker exec -it 9dbad46eb3f2 bash
root@9dbad46eb3f2:/# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.47-0ubuntu0.14.04.1 (Ubuntu)

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> create database ken;
Query OK, 1 row affected (0.00 sec)

mysql> grant all on *.* to ken@'localhost' identified by '123';
Query OK, 0 rows affected (0.00 sec)

mysql> grant all on *.* to ken@'%' identified by '123';
Query OK, 0 rows affected (0.01 sec)


mysql> exit
Bye

 

 

第六步:浏览器进行访问

 

 

72 thoughts on “docker部署LAMP架构并部署上线wordpress博客系统–技术流ken

  1. Thanks on your marvelous posting! I seriously enjoyed reading
    it, you happen to be a great author. I will ensure that I bookmark your blog and will come back sometime soon. I
    want to encourage you continue your great posts, have a nice holiday weekend!

  2. An outstanding share! I have just forwarded this onto a
    coworker who has been doing a little research
    on this. And he in fact bought me dinner because I found it for
    him… lol. So allow me to reword this…. Thank YOU for the meal!!
    But yeah, thanks for spending some time to discuss this issue
    here on your web site.

  3. We are a group of volunteers and opening a new scheme in our
    community. Your website provided us with valuable information to work on. You have done a
    formidable job and our whole community will be thankful to you.

  4. 日本な人気と信頼スーパーブランドコピー専門店
    —————- —————– —————- —————
    ■経営する商品:バッグ、財布、腕時計 その他小物。
    —————- —————– —————- —————
    ■経営するブランド:ルイヴィトン、シャネル、グッチ、
    コーチ、ロレックス、プラダ、 ディオール、
    ブルガリ、オメガ、カルティエ。
    —————- —————– —————- —————
    ■実物写真、付属品を完備しております。
    ■迅速、確実にお客様の手元にお届け致します。
    ■低価格を提供すると共に、品質を絶対保証しております。
    ■商品の交換と返品ができます。
    —————- —————– —————- —————
    ◆富な品揃えで最新作も随時入荷致しておりますので、ごゆっくりご覧ください。
    ルイヴィトンバッグ https://www.cocoejp.com/ProductList.aspx?TypeId=025762105181392

  5. Hello there! I could have sworn I’ve been to this website before but after browsing through some of the
    post I realized it’s new to me. Anyhow,
    I’m definitely delighted I found it and I’ll be book-marking and checking back frequently!

  6. It’s perfect time to make some plans for the long run and
    it’s time to be happy. I’ve learn this put
    up and if I could I desire to recommend you some attention-grabbing things or tips.
    Maybe you can write subsequent articles regarding this article.
    I wish to read even more issues about it!

  7. ブランド激安市場大特価
    当店には、ルイヴィトン、シャネル、グッチ、コーチ、ロレックス、プラダ、 ディオール、ブルガリ財布 その他小物等、
    買う多いです、恵みの多いです、
    一回注文5件以上、贈呈ルイヴィトンキーケース1個
    注文は期待しています。。。
    各種海外有名ブランド品を豊富に取り揃え、しかもお客様を第一と考えて、驚きの低価格で提供しております
    ■スタイルが多い、品質がよい、価格が低い!
    ■ 送料無料(日本全国) ご注文を期待しています!
    ■信用第一、良い品質、低価格は
    ■当社の商品は絶対の自信が御座います。
    激安、安心、安全にお届けします.品数豊富な商
    商品数も大幅に増え、品質も大自信です100%品質保証!
    満足保障!リピーター率100%!

  8. Our patented formula is free of abrasive salts and is low in VOC (Volatile Organic Compounds) making it safer on your glass and friendlier on your environment.
    An easier ride to space is not the only potential benefit. Here on Earth, hypergravity could be used to train athletes, providing an environment in which exercises could be conducted with more benefit in shorter time. People who suffer from muscle atrophy might be exposed to it, to stress their muscles more effectively.
    12″ Clear Glass Bubble Round Shape Bowl.
    https://cannabisgreenbook.org/baseball-bat-rolling-machine-for-sale.html
    https://cannabisgreenbook.org/what-are-pipe-screens-used-for.html
    https://cannabisgreenbook.org/vuber-vape-pen-instructions.html
    First of all, forget any worries you may have about running into undercover law enforcement. It’s not like you’re going to encounter a copper disguised as a degenerate and have to go all 23 skidoo on his ass. Those guys aren’t out to bust random people trying to find a little bit of weed. (Except for the racist ones .) But at the same time, don’t wander around a park asking random people for weed. The following are broad but discreet strategies you can employ, depending on where you are. Like many different types of indoor grow lights, the manufacturer matters a lot. Because there’s so much competition in the space and every manufacturer wants their piece of the pie, stick to established brands that have a history of respectability and authority in the space. Stay away from unknown knockoffs.

tinyurl.com进行回复 取消回复

电子邮件地址不会被公开。