Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CloudGarageでWordPressをWebサーバ+DBサーバの構成にしてみた

Makoto Henmi
September 07, 2017

 CloudGarageでWordPressをWebサーバ+DBサーバの構成にしてみた

2017/09/02(土) CloudGarage Release Tour in Okayamaでの発表。
CloudGarage上でWordPressをWebサーバ+DBサーバの構成にしてみたお話。

Makoto Henmi

September 07, 2017
Tweet

More Decks by Makoto Henmi

Other Decks in Technology

Transcript

  1. CloudGarageͰWordPressΛ
    WebαʔόʴDBαʔόͷߏ੒ʹͯ͠Έͨ
    2017/09/02(౔)ɹCloudGarage Release Tour in Okayama
    ҳݟ ੣(@mako_wis)

    View full-size slide

  2. ࣗݾ঺հ
    w ҳݟ੣ ΁ΜΈ·͜ͱ

    w 5XJUUFS!NBLP@XJT
    w גࣜձࣾΫϨΦϑʔΨ
    w ϑϩϯταʔόʔαΠυΤϯδχ
    ΞɾՐݩ؅ཧ੹೚ऀ

    View full-size slide

  3. Իָؔ܎ͷ࢓ࣄͯ͠·͢

    View full-size slide

  4. Իָؔ܎ͷ
    ʢձࣾͰϓϩάϥϚʔͷʣ
    ࢓ࣄͯ͠·͢

    View full-size slide

  5. ࠓճ΍Γ͍ͨ͜ͱ※ΠϝʔδͰ͢
    DBαʔό WEBαʔό
    WordPressαΠτ

    View full-size slide

  6. ·ͣ͸Webαʔό

    View full-size slide

  7. ΞϓϦέʔγϣϯͷ
    ςϯϓϨʔτΛ࢖͍·͢

    View full-size slide

  8. Webαʔό
    • ΞϓϦέʔγϣϯςϯϓϨʔτ
    • WordPress
    • ઀ଓڐՄϙʔτ
    • HTTP, HTTPS, (SSH)

    View full-size slide

  9. Ұ୴ɺ͜͜·Ͱ

    View full-size slide

  10. ࣍͸ DBαʔό

    View full-size slide

  11. ΞϓϦέʔγϣϯͷ
    ςϯϓϨʔτ͕ͳ͍ͷͰ
    ࣗ෼Ͱཱͯ·͢

    View full-size slide

  12. ʢMySQLͱPostgresSQLͷ
    ΞϓϦέʔγϣϯͷ
    ςϯϓϨʔτཉ͍͠ɻόʔδϣ
    ϯબͼ͍ͨɻʣ

    View full-size slide

  13. DBαʔό
    • OSΠϝʔδ
    • CentOS7.3_64bit
    • ઀ଓڐՄϙʔτ
    • (SSH)

    View full-size slide

  14. MySQLΛΠϯετʔϧ

    View full-size slide

  15. खॱ͸লུ͠·͢

    View full-size slide

  16. MySQLͷॳظઃఆ·Ͱ
    ऴΘΒͤΔ

    View full-size slide

  17. WordPressͷͨΊͷ
    ઃఆΛ͢Δ

    View full-size slide

  18. DBαʔόʔଆʹWordPress༻
    ͷσʔλϕʔεΛ࡞੒
    ※͔͜͜Β͠͹Β͘DBαʔόʔଆͷ࡞ۀͰ͢

    View full-size slide

  19. σʔλϕʔε࡞੒
    mysql> CREATE DATABASE ʻDB_NAMEʼ;
    ※ʹ͸೚ҙͷ໊લΛೖΕ͍ͯͩ͘͞

    View full-size slide

  20. ઀ଓϢʔβʔ࡞੒
    ※͜ͷ··ͩͱDBαʔόʔ಺෦͔Β͔͠ܨ͕Βͳ͍
    ͷͰઃఆΛม͑·͢
    mysql> GRANT ALL PRIVILEGES ON ʻ
    DB_NAMEʼ.* to ʻDB_USERʼ@localhost
    identified by 'ʻDB_PASSWORDʼ';

    View full-size slide

  21. WebαʔόଆͷϓϥΠϖʔτIPΛ֬ೝ

    View full-size slide

  22. ઀ଓϢʔβʔ࡞੒
    localhostΛWebαʔόʔଆͷIPʹมߋ
    mysql> GRANT ALL PRIVILEGES ON ʻDB_NAME
    ʼ.* to ʻDB_USERʼ@192.168.0.9 identified
    by ‘ʻDB_PASSWORDʼ';
    ※ʻDB_USERʼʻDB_PASSWORDʼʹ͸೚ҙͷ஋ΛೖΕ͍ͯͩ͘͞

    View full-size slide

  23. มߋΛ൓өͯ͠ऴྃ
    mysql> FLUSH PRIVILEGES;
    mysql> EXIT

    View full-size slide

  24. DBଆͷઃఆऴΘΓ

    View full-size slide

  25. WebαʔόʔଆͰWordPress
    ͷઃఆΛߦ͏
    ※͔͜͜Β͠͹Β͘Webαʔόʔଆͷ࡞ۀͰ͢

    View full-size slide

  26. ্͔Βॱʹखॱ௨Γ΍Γ·͢

    View full-size slide

  27. ͜͜͸ͦͷ··

    View full-size slide

  28. ͜͜͸গ͠ઃఆΛม͑·͢

    View full-size slide

  29. DBαʔόଆͰઃఆͨ͠஋ΛͦΕͧΕઃఆ
    ʻDB_USERʼʻDB_PASSWORDʼ

    View full-size slide

  30. DBαʔόͷઃఆΛ֬ೝͯ͠मਖ਼͢Δ

    View full-size slide

  31. DBαʔόଆͷϓϥΠϖʔτIPΛ֬ೝ

    View full-size slide

  32. localhostΛ192.168.0.8ʹมߋ

    View full-size slide

  33. खॱʹैͬͯηοτΞοϓͯ͠׬ྃ

    View full-size slide

  34. ·ͱΊͱॴײ
    • WebαʔόͱDBαʔόͷߏ੒Λ࡞੒
    • αʔόؒͷϩʔΧϧωοτʔϫʔΫͷઃఆ͕σϑΥϧ
    τͰ͞ΕͯΔͷͰָ
    • ղ์͢ΔϙʔτΛ؅ཧը໘Ͱ؆୯ʹมߋͰ͖ΔͷͰָ
    • σʔλϕʔεͷΞϓϦέʔγϣϯςϯϓϨʔτཉ͍͠

    View full-size slide