Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
[日本語]How to use Amazon RDS with AMIMOTO AMI Wor...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Amimoto - Flexible Cloud WordPress Hosting
March 25, 2016
How-to & DIY
2.7k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
[日本語]How to use Amazon RDS with AMIMOTO AMI WordPress
AMIMOTOでRDSを利用する方法
Amimoto - Flexible Cloud WordPress Hosting
March 25, 2016
More Decks by Amimoto - Flexible Cloud WordPress Hosting
See All by Amimoto - Flexible Cloud WordPress Hosting
[日本語] AMIMOTO-AMI Lineup
amimoto
0
190
EdgeCase - A speaker series by J2 Design
amimoto
0
380
Progress the system operation drastically with Cloud Automator — AMIMOTO side—
amimoto
0
210
[東京]Cloud_Automatorで攻めのシステム運用 AMIMOTO スタック編
amimoto
0
920
AMIMOTO Design Pattern + Server-less Architecture
amimoto
0
530
WooCommerce with Elasticsearch
amimoto
1
500
[日本語] WooCommerce with Elasticsearch
amimoto
0
270
Amazon CloudFront with AWS Certificate Manager
amimoto
0
240
WordPress with CloudFront + AMAZON RDS + S3
amimoto
1
740
Other Decks in How-to & DIY
See All in How-to & DIY
2026.6.27 お誕生日会で配布された透明シェルを交換する際の注意点について
mongonta0716
0
270
多摩.dev で草を食べる話をしたら カンファレンスに登壇していた / from-eating-weeds-to-a-conference
aokiplayer
1
880
移動は善 / 20260124-NGK2026S
girigiribauer
1
240
ことみんの登壇資料の作り方〜登壇はいいぞ〜
kotomin_m
6
1.1k
Linuxが動く自作SBCを作る話.pdf
daimiya
1
1k
蓮ノ三連華は如何にしてBGPにたどり着いたのか
subroh0508
0
130
JAWS-UG鹿児島2.0 reboot - JAWS-UG/AWS Communitiesのご紹介
awsjcpm
0
140
お前も同人作家にならないか? 技術系同人誌制作入門
arkw
3
170
RustでもVJしたい!
taiseiue
0
110
チームパフォーマンスを高めるための2種類のセルフマネジメント / Two Types of Self-Management for Improving Team Performance
iwashi86
4
1.2k
ときメモは 運営が30年かけて “実プレイ”していた
mzryuka
1
180
蓮ノ空女学院スクールアイドルクラブはなぜ強いのか
subroh0508
0
190
Featured
See All Featured
Are puppies a ranking factor?
jonoalderson
2
4.1k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
750
Designing Powerful Visuals for Engaging Learning
tmiket
1
620
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
470
Documentation Writing (for coders)
carmenintech
77
5.6k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
460
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
The SEO identity crisis: Don't let AI make you average
varn
0
620
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
640
Being A Developer After 40
akosma
PRO
92
590k
Leo the Paperboy
mayatellez
10
2.4k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
Transcript
@Amimoto_Ami amimoto-ami.com AMIMOTO (HHVM) + AMAZON RDS
AMAZON RDS ͱ
εέʔϥϒϧ ར༻Մೳͳ6ͭͷDB Τϯδϯ ϦϨʔγϣφϧσʔλϕʔε ༰қͳઃఆͱӡ༻
ϝϦοτ •εέʔϧՄೳͳ CPUɼIOPSɼετϨʔδ •ࣗಈ·ͨҙͷόοΫΞοϓ͕ εφοϓγϣοτ͔ΒՄೳ • ϚϧνΞϕΠϥϏϦςΟκʔϯͷσϓϩΠ • ϓϥΠϚϦͷোൃੜ࣌ʹ ଈ࠲ʹηΧϯμϦΓସ͑Մೳ
σϝϦοτ • DB ͷγΣϧΞΫηε͕Ͱ͖ͳ͍ • Ϣʔβݖݶʹ੍͕͋Δ • MySQL ͰͷϨϓϦέʔγϣϯ͕ແޮ •
ि4࣌ؒͷϝϯςφϯεΟϯυදࣔ • ࢭΊΒΕͳ͍ RDS Πϯελϯε
RDS DBΛ Ҡߦ͠Α͏
RDS ͷͳ͍ΞʔΩςΫνϟ
RDS ͷ͋ΔΞʔΩςΫνϟ
AWS ίϯιʔϧ ϩάΠϯ
MySQL Λ Amazon RDS ʹ࡞
σʔλϕʔεΤϯδϯͷબ
σʔλϕʔεΤϯδϯͷબ
σʔλϕʔεͷ֤छઃఆ
σʔλϕʔεͷৄࡉઃఆ
σʔλϕʔεͷ࡞
࡞͞Εͨ σʔλϕʔε
SSH ͰΠϯελϯεϩάΠϯ
EC2 Λ RDS ଓ͠·͢ 1. SSH Ͱαʔόଓ͠·͢: $ ssh
-i /Users/USERNAME/Desktop/example.pem ec2-user@instance_ip or domain 2. ࣍ͷίϚϯυΛ࣮ߦͯ͠ MySQL ଓ͍ͯͩ͘͠͞: $ mysql -h {endpoint} -P 3306 -u {mymasteruser} -p
{endpoint} AWS Management Console ͷ RDS ใͰ֬ೝͰ͖·͢ {mymasteruser} ͱ
ύεϫʔυ RDS ࡞࣌ʹࢦఆͨ͠ͷΛೖྗ͍ͯͩ͘͠͞
σʔλϕʔεͷϚΠάϨʔγϣϯ wp-cli Ͱ MySQL ͔ΒσʔλΛΤΫεϙʔτ͠·͢: $ wp --path=/path/to/wordpress db
export /path/to/wordpress WordPress ͷΠϯετʔϧσΟϨΫτϦΛࢦఆ͍ͯͩ͘͠͞ɻ AMIMOTO AMI Ͱ௨ৗ /var/www/vhosts/{instance_id} ͱͳ͍ͬͯ·͢ɻ
σʔλϕʔεͷϚΠάϨʔγϣϯ ΤΫεϙʔτͨ͠σʔλΛ RDS Πϯϙʔτ͠·͢: $ mysql -h {endpoint} -P
3306 -u {mymasteruser} -p {databasename} < dump.sql {endpoint} AWS Management Console ͷ RDS ใͰ֬ೝͰ͖·͢ɻ {mymasteruser} ͱ {databasename} RDS ࡞࣌ʹࢦఆͨ͠ͷΛೖྗ͍ͯͩ͘͠͞
wp-config.php ͷฤू // ** MySQL settings - You can get
this info from your web host ** // $db_data = false; if ( file_exists('/opt/aws/cloud_formation.json') ) { $db_data = json_decode(file_get_contents('/opt/aws/ cloud_formation.json'), true); if ( isset($db_data['rds']) ) { $db_data = $db_data['rds']; $db_data['host'] = $db_data['endpoint'] . ':' . $db_data['port']; } } if ( !$db_data ) { $db_data = array( 'database' => 'RDS_DATABASE_NAME_HERE', 'username' => 'RDS_USER_NAME_HERE', 'password' => 'RDS_PASSWORD_HERE', 'host' => 'RDS_ENDPOINT_HERE', ); }
wp-config.php ͷฤू RDS_DATABASE_NAME_HERE: σʔϕʔεͷৄࡉઃఆͰઃఆࡁΈͷσʔλϕʔε໊ RDS_USER_NAME_HERE: σʔλϕʔεͷ֤छઃఆͰઃఆࡁΈͷϢʔβ໊ RDS_PASSWORD_HERE: σʔλϕʔεͷ֤छઃఆͰઃఆࡁΈͷύεϫʔυ RDS_ENDPOINT_HERE: RDS
ͷΤϯυϙΠϯτ wp-config.php ্ͷઃఆΛೖΕͨ͋ͱ WordPress ʹଓͰ͖Δ͔͔͘Μ͍ͯͩ͘͠͞ɻ
AMIMOTO AMI ͷ MySQL ΛࢭΊΔ MySQL Λ RDS Ҡಈͤ͞Δͱ AMIMOTO
AMI ͷ MySQL ϓϩηε͕ෆཁʹͳΓ·͢ɻ ઃఆϑΝΠϧΛฤूͯ͠ MySQL ϓϩηεΛऴ͍ྃͤͯͩ͘͞͞ɻ AMIMOTO AMI ͰϛυϧΣΞͷઃఆ /opt/local/amimoto.json ʹ͋Δ chef-solo Λ͍ͬͯ·͢ɻ
AMIMOTO AMI ͷ MySQL ΛࢭΊΔ MySQL Λ RDS Ҡಈͤ͞Δͱ AMIMOTO
AMI ͷ MySQL ϓϩηε͕ෆཁʹͳΓ·͢ɻ ઃఆϑΝΠϧΛฤूͯ͠ MySQL ϓϩηεΛऴ͍ྃͤͯͩ͘͞͞ɻ AMIMOTO AMI ͰϛυϧΣΞͷઃఆ /opt/local/amimoto.json ʹ͋Δ chef-solo Λ͍ͬͯ·͢ɻ MySQL Λఀࢭͤ͞ΔʹϑΝΠϧΛ࣍ͷΑ͏ʹॻ͖͍͑ͯͩ͘͞: { "nginx" : { "config" : { "user" : "nginx", "group" : "nginx" } }, "php" : { "config" : { "user" : "nginx", "group" : "nginx" } }, "mysql" : { "enabled" : false }, "phpfpm" : { "enabled" : true }, "run_list" : [ "recipe[amimoto]" ] }
AMIMOTO AMI ͷ MySQL ΛࢭΊΔ AMIMOTO AMI HHVM ൛ͷ߹ҎԼͷΑ͏ʹมߋ͍ͯͩ͘͠͞: {
"nginx" : { "config" : { "user" : "nginx", "group" : "nginx" } }, "php" : { "config" : { "user" : "nginx", "group" : "nginx" } }, "mysql" : { "enabled" : false }, "hhvm" : { "enabled" : true }, "run_list" : [ "recipe[amimoto]" ] }
AMIMOTO AMI ͷ MySQL ΛࢭΊΔ ࠷ޙʹ࣍ͷίϚϯυΛ࣮ߦ͍ͯͩ͘͠͞: $ sudo /opt/local/proviosion
$ mysql stop service
ja.amimoto-ami.com/slack ࣭͓͝ड͚͍ͨ͠·͢:
@Amimoto_Ami amimoto-ami.com THANK YOU! AMIMOTO (HHVM) + AMAZON RDS