Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
8時間耐久 PHP構築の教室
Search
Yusuke Ando
July 10, 2012
Programming
7
10k
8時間耐久 PHP構築の教室
ビルドの方法を学んでソースからPHPを構築します。さまざまな設定や拡張を試して見ながら最終的にはnginxとphp-fpmでWordPressを動かしてみましょう。
Yusuke Ando
July 10, 2012
Tweet
Share
More Decks by Yusuke Ando
See All by Yusuke Ando
CakePHP3でアプリ開発
yandod
1
330
Shimokita.Unity パーティクルでエフェクト
yandod
0
750
CakePHP3の明るい未来
yandod
1
200
Testing your app with Selenium on Travis CI
yandod
8
3.1k
Testing your app with Selenium on Travis CI
yandod
0
130
Inputで入力を扱う
yandod
0
660
Detonatorで爆発させる勉強会をした報告
yandod
0
2.4k
Mecanimでアニメーション - Shimokita.Unity
yandod
0
720
パリの街をUnityで駆ける
yandod
1
3.4k
Other Decks in Programming
See All in Programming
Content Security Policy入門 セキュリティ設定と 違反レポートのはじめ方 / Introduction to Content Security Policy Getting Started with Security Configuration and Violation Reporting
uskey512
1
430
外部システム連携先が10を超えるシステムでのアーキテクチャ設計・実装事例
kiwasaki
1
230
hotwire_or_react
harunatsujita
8
4.1k
Macとオーディオ再生 2024/11/02
yusukeito
0
160
破壊せよ!データ破壊駆動で考えるドメインモデリング / data-destroy-driven
minodriven
16
4.1k
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
0
150
推し活の ハイトラフィックに立ち向かう Railsとアーキテクチャ - Kaigi on Rails 2024
falcon8823
6
2.2k
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
110
Outline View in SwiftUI
1024jp
1
120
VR HMDとしてのVision Pro+ゲーム開発について
yasei_no_otoko
0
100
Honoの来た道とこれから
yusukebe
19
3k
Kubernetes for Data Engineers: Building Scalable, Reliable Data Pipelines
sucitw
1
200
Featured
See All Featured
What's new in Ruby 2.0
geeforr
342
31k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Imperfection Machines: The Place of Print at Facebook
scottboms
264
13k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
504
140k
YesSQL, Process and Tooling at Scale
rocio
167
14k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
The Cult of Friendly URLs
andyhume
78
6k
Into the Great Unknown - MozCon
thekraken
31
1.5k
Transcript
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP 1)1ߏஙͷڭࣨ ࣌ؒٱ ࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP
࣌ؒٱ1)1ߏஙͷڭࣨYusuke Ando (@yando) ςΩετ
࣌ؒٱ1)1ߏஙͷڭࣨYusuke Ando (@yando) http://tech.a-listers.jp/
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ຊͷରऀ 1)1Λ͍ͬͯΔ ڥߏங͕ۤख ਅͬനʹͳΔͱݻ·Δ ࣮ߦҕһ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP 1)1ͷߏஙʹ ؔ͢ΔΠϩϋΛ పఈతʹֶͼ·͢
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ຊͷϝχϡʔ 1)1ͷಈ͘Έ ϏϧυͷΠϩϋ ઃఆͱ֦ு ࠷దԽͷಓ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP 1)1ͷಈ͘Έ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP 1)1ͷϖʔδ͕ಈ࣌͘ w8FCαʔό "QBDIF ɹ63-ΛݩʹϦιʔεΛಛఆ w1)1 ɹࢦఆ͞Εͨ1)1εΫϦϓτΛղੳ w1)1֦ுϞδϡʔϧ $ݴޠ
ɹ1)1͔ΒඞཁʹԠͯ͡ݺͼग़͞ΕΔ ݴޠͱͯ̎͠൪ͷΈ͕1)1
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP )5.-Λදࣔ͢ΔྲྀΕ 8FCαʔό ެ։σΟϨΫτϦ ϑΝΠϧΛ୳ͯ͠ฦ͢ͷΈ IUUQEDPOG ެ։σΟϨΫτϦ ͲͷσΟϨΫτϦΛެ։͢ Δ͔͕ઃఆ͞Ε͍ͯΔ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP 1)1͕ಈ࡞͢ΔྲྀΕ 8FCαʔό 1)1 εΫϦϓτ ෳͷϓϩάϥϜ͕࿈ܞ 1)1 ֦ுϞδϡʔϧ ࣗͰॻ͘ͷେ͜Ε
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP 1)1͕ಈ͘ڥ ༷ʑͳϓϩάϥϜ͕ڠௐͯ͠ ಈ࡞͢Δڥ ༷ʑͳ͕ࣝඞཁ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ࣗಈΠϯετʔϧ # yum install php # apt-get install
php # port install php5 Կ͕ى͖͔ͨཧղ͍ͯ͠Δʁ ༁͔Βͣίϐϖͯ͠ͳ͍ʁ τϥϒϧͷݪҼ͕Θ͔Δʁ ઃఆͷํ๏ʁ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ࠜݯతͳ ࣝ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ࣗྗͰͷ ߏஙͱઃఆ Λֶ΅͏
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ҙ ӡ༻ڥΛ͔Βߏங͢Δͷ ࣌Ε ͚মਕͷखಈߏங͔͑ͬ ͯखؒʹͳΔ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ิ ࠓճ7JSUVBM#PYʹ $FOU04ͷΠϝʔδΛೖΕ ͍ͯ·͢ CentOs 6.0 base x86_64
http://virtualboxes.org/images/centos/
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP 7.ઃఆϝϞ w%7%ϝσΟΞΛআڈ wωοτϫʔΫΛϒϦοδଓʹ wΩʔϘʔυΛ`VT`ʹม͓͑ͯ͘ FUDTZTDPOpHLFZCPBSE wෳਓͳΒ.BDΞυϨεͷมߋ͕ඞཁ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ϏϧυͷΠϩϋ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP Ϗϧυͱʁ wιʔε͔ΒόΠφϦΛ࡞Δ $ݴޠ wίϯύΠϧͱݺͿ wͦͷڥ༻ͷόΠφϦΛ࡞Δ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ࣗಈΠϯετʔϧ wόΠφϦύοέʔδ wಛఆͷڥ༻ͷόΠφϦΛ w04$16͕ҧ͏ͱඇޓ w3FE)VUͷSQN͕͖͔͚ͬʹେྲྀߦ w8JOEPXT.BDͳͲͰ୯७ w୭͔͕Ͳ͔͜ͰϏϧυͨ͠ͷ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP HDD w(/6$PNQJMFS$PMMFDUJPO w$ݴޠɺ$ ͳͲΛίϯύΠϧͰ͖Δ w3JDIBSE4UBMMNBO wҎ্ݱͷॏཁιϑτΤΞ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP HDDೖͬͯΔʁ # which gcc /usr/bin/which: no gcc in
.... /usr/bin/gcc wೖͬͯͳ͍ wೖͬͯΔ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP HDDͷಋೖ wHDDόΠφϦύοέʔδͰೖΕΔ wHDDʹόʔδϣϯ͕͋Δ wHDD͕ݹͯ͘ϏϧυࣦഊͳΜͯࣄ # yum install gcc
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP HDD͕͋Ε wHDDίϚϯυͰ$ݴޠΛίϯύΠϧՄೳ wग़དྷͨόΠφϦ࣮ߦͰ͖Δʂ $ gcc hello.c -o hello
#include <stdio.h> int main(void) { printf("Hello World"); return 0; }
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ࿅शHDDͰIFMMPXPSME w·ͬ͞Βͳ$FOU04 wΩʔϘʔυઃఆɾΞΧϯτઃఆ wSFCPPU wXIJDIHDD wZVNJOTUBMMHDD wIFMMPXPSMEͷιʔεΛίϯύΠϧ wग़དྷͨόΠφϦΛ࣮ߦ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ͜ΕͰ1)1͍͚Δʁ w1)1ͷιʔεେྔͷ$ͷιʔε wڥʹ߹Θͤͯมߋ͢Δ෦ͱ͔ wίϯύΠϧ͢Δॱ൪ଘࡏ पลͷπʔϧແ͍ͱ1)1ͷΑ͏ͳ େ͖ͳιϑτΣΞಋೖͰ͖ͳ͍
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ఆ൪ͳπʔϧ܈ wBVUPDPOG ɹڥʹ߹ΘͤͯϏϧυઃఆΛߦ͏ wNBLF BVUPNBLF ɹॱ൪ͷߟྀґଘؔͷղܾͳͲෳ ࡶͳϏϧυλεΫΛ࣮ߦ͢Δ wTTIE
PQFOTTMTFSWFS ɹTTIͰೖͬͯ࡞ۀͰ͖Δͱָ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP TTIEಋೖ wZVNJOTUBMMPQFOTTMTFSWFS wFUDTTITTIE@DPOpHʹه wۙ߈ܸ͕ଟ͍ͷͰ伴ೝূ͕ཧ wTTIEͷՔಇϙʔτ՝ wJQUBCMFT'͠ͳ͍ͱೖΕͳ͍ अѱ PermitRootLogin
no
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP BVUPDPOGNBLF wBVUPDPOG ɹ$FOU04Ͱೖͬͯͨ wNBLF ɹೖͬͯͳ͍ͷͰಋೖ͢Δ # yum install
make
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP 1)1ͷUBSCBMM $ curl -L -O http://jp2.php.net/get/php-5.4.4.tar.gz/ from/this/mirror $
mv mirror php.tar.gz $ tar zxf php.tar.gz
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP 1)1ͷιʔε $ find ./ -type f | grep
"\.c" | wc 905 905 27290 wେྔͷ$ͷιʔε܈ wେ·͔ͳϨΠΞτΛ͓ͬͯ͘ͱτ ϥϒϧղܾʹཱͭ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP 1)1ͷιʔε 1)1෦ͷ؊;FOE&OHJOF ֦ுΤϯδϯͷػೳͰ࡞ΒΕΔ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP 1)1ͷιʔε
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ͋ͷؔ$Ͱॻ͔Ε͍ͯΔ ͳʹΒո͍͠هड़
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ͦ͏͍͏ࣄ͔ $ php -r "var_dump(date('Y-m-d',mktime(0,0,0,12,24,70)));" string(10) "1970-12-24" $
php -r "var_dump(date('Y-m-d',mktime(0,0,0,12,24,69)));" string(10) "2069-12-24"
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP 1)1ͷϏϧυͷྲྀΕ wDPOpHVSF ɹϏϧυʹඞཁͳϥΠϒϥϦͷ֬ೝ wNBLF ɹόΠφϦΛ࡞Δ wNBLFJOTUBMM ɹग़དྷ্͕ͬͨόΠφϦΛίϐʔ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP DPOpHVSFͯ͠Έͨ MJCYNM͕ແ͍Β͍͠
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP MJCYNM 0, # yum install libxml2
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP DPOpHVSFͯ͠Έ͕ͨʁ MJCYNM͕ແ͍Β͍͠ MJCYNMEFWFMೖΕΑ͏
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP DPOpHVSFޭ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP NBLF ͕͔͔࣌ؒΔ ʢϑΝϯճΔʣ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ޙ όΠφϦ͕ग़དྷͨʂ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP NBLFJOTUBMMͷલʹ wNBLFJOTUBMMΛ͢ΔͱγεςϜʹೖ wγεςϜͷڍಈ͕มΘΔ wϏϧυ·Ͱͷ࡞ۀSPPUෆཁ wίϚϯυϥΠϯΛͬͯಈ࡞֬ೝ 1)1ʹݶͬͨͰ͋Γ·ͤΜ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ಈ࡞֬ೝ ͳΜ͔ಈ͖ͦ͏ʁ $ ./sapi/cli/php -v PHP 5.4.4 (cli)
(built: Jul 8 2012 04:15:27) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies $ ./sapi/cli/php -r 'echo "Hello Wolrd\n";' Hello Wolrd
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ΑΖ͍͠ ҰԠΠϯετʔϧྃ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ͐Α .Z42-͕ແ͍ NCTUSJOH͕ແ͍ HE͕ແ͍ FUD 8PSE1SFTTͱ͔ ಈ͔ͳ͍
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ಈ͔͚ͩ͢ͳΒ $ php -S 192.168.225.15:8000 PHP 5.4.4 Development
Server started at Sun Jul 8 04:50:57 2012 Listening on 192.168.225.15:8000 Document root is /home/yando/docs Press Ctrl-C to quit. [Sun Jul 8 04:51:00 2012] 192.168.225.5:57229 [200]: /index.php 1)1͔Βͷ৽ػೳ 1)1͚ͩͰ։ൃαʔόʹͳΔ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ͜͜·Ͱͷ·ͱΊ wπʔϧΛἧ͑ͯ wιʔε͔ΒϏϧυͯ͠Πϯετʔϧ wΉߏΛಘΔʹ͞Βʹઃఆ͕ඞཁ ݱͷຊਓʹ͜Ε͚ͩͰෆे
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ࿅शQIQΛNBLF wDVSM-0\VSMGSPNQIQOFU^ wNWNJSSPSQIQUBSH[ wUBS[YGQIQUBSH[ wZVNJOTUBMMNBLF wDEQIQ wDPOpHVSF wNBLF
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ઃఆͱ֦ு
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ઃఆͱ֦ுͷඞཁੑ wNCTUSJOH͕͍͍ͨ w.Z42-͕͍͍ͨ wHE͕͍͍ͨ w˓˓͕͍͍ͨ ઃఆʹΑΓ্هΛՄೳʹ͢Δͷ͕ 1)1֦ு
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP 1)1֦ு 1)1ࣗମηοτΞοϓͰ͖ͨ .Z42-NCTUSJOH ֦ு
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP DPOpHVSFΦϓγϣϯ wDPOpHVSFͷࡍʹΦϓγϣϯΛ͚Δ ͱϏϧυ͞ΕΔόΠφϦɺ֦ு͕มΘΔ wDPOpHVSFޙ࠶ɺϏϧυΛߦ͏ wϏϧυޙม͑ΒΕͳ͍ઃఆ ͲͷΦϓγϣϯͰϏϧυ͞Ε͔ͨʁ ͕ͱͯॏཁ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP Φϓγϣϯͷௐํ wDPOpHVSFIFMQ w1)1ͷϚχϡΞϧΛݟΔ ͷͨ͘͘͢͝͞Μ छ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP NCTUSJOH wจࣈίʔυͷมͳͲʹ͏ wຊͰࣄ্࣮ɺඞਢͷ֦ு ༗ޮʹ͢Δͷ؆୯ $ configure --enable-mbstring $
make # make install
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ೖͬͨʂ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ͏Ұͭͷํ๏ wڞ༗ϥΠϒϥϦ w֦ு෦͕ผͷόΠφϦʹͳΔ w༗ޮʹ͢ΔʹQIQJOJͷมߋඞཁ Ұݟ໘ʹݟ͑Δ $ configure --enable-mbstring=shared
$ make # make install extension=mbstring.so
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ੩తϦϯΫͱಈతϦϯΫ PHP PHP mbstring mbstring ੩తϦϯΫ ಈతϦϯΫ ੩తϦϯΫ1)1ຊମͷόΠφϦʹ
֦ு͕Έࠐ·ΕΔ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ӡ༻্ͷҧ͍ w੩తϦϯΫόΠφϦ͕େ͖͘ͳΔ wಈతϦϯΫ͔ᷮʹΦʔόϔου w֦ுͷߋ৽͕͋ͬͨ߹ ɹ੩తϦϯΫશίϯύΠϧ ɹಈతϦϯΫϥΠϒϥϦͷΈࠩସՄೳ ಈతϦϯΫͷํ͕ॊೈੑ͕ߴ͍
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP NZTRM1%
[email protected]
w.Z42-ʹଓ͢Δػೳ w1)1Ҏલཁ.Z42- ࠷ۙϏϧυ͕؆୯ʹ $ configure --with-mysql --with-pdo-mysql
$ make # make install
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP (% w1)1͔Βը૾ͷॲཧΛߦ͏֦ு wϦαΠζมͳͲʹΘΕΔ ༨༟༨༟ $ configure --enable-gd $
make # make install
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP QOHI MJCQOHEFWFM͕ඞཁ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ೖΓ·ͨ͠ # yum install libpng-devel $ configure --enable-gd
$ make # make install
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP શ෦·ͱΊΔͱ DPOpHVSFΦϓγϣϯ͕͘ͳΔͷ ͕ੈͷৗ $ ./configure --enable-mbstring=shared \ --with-mysql=shared
\ --with-pdo-mysql=shared \ --with-gd=shared aίϚϯυϥΠϯͰվߦ͠ ͍ͨ࣌ʹ͏
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ΦϓγϣϯΔ ࣗͷ1)1͕ͲͷΑ͏ͳΦϓ γϣϯͰίϯύΠϧ͞Ε͔ͨ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP QIQJOJ w1)1ͷڍಈΛܾΊΔॏཁͳઃఆ w֦ுϞδϡʔϧͷಡΈࠐΈ wτϥϒϧγϡʔτʹ͔ܽͤͳ͍ wઃఆͷߏஔΠϯετʔϧ࣍ୈ ʮQIQJOJΛ֬ೝ͍ͯͩ͘͠͞ʯ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP QIQJOJͷॴ wXJUIDPOpHpMFQBUI ɹ௨ৗVTSMPDBMMJCQIQJOJ wXJUIDPOpHpMFTDBOEJS ɹෳʹׂͯ͠ಡΈࠐΉ wQOQJOGP ͔Β֬ೝͰ͖Δ ݾͷQIQJOJΛ୳͢
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP QIQJOJͷத
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP QIQJOJͷॻ͖ํ wઃఆ໊ w ηϛίϩϯ Ҏ߱ίϝϯτ wϩάͷग़ྗɺදࣔઃఆɺจࣈίʔυɺ λΠϜκʔϯɺ֦ுϞδϡʔϧͳͲ͞· ͟·ͳઃఆ߲
ෆదͳQIQJOJةݥ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ಛʹॏཁͳ߲ wEJTQMBZ@FSSPST wEBUFUJNF[POF wVQMPBE@NBY@pMFTJ[F wBMMPX@VSM@GPQFO wFYUFOTJPO wNFNPSZ@MJNJU ӡ༻ʹԠ༷ͯ͡ʑͳઃఆ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ࿅श࣮༻తͳϏϧυ wNBLF wNBLFJOTUBMM wQIQJOJEFWFMPQNFOUΛίϐʔ $ ./configure --enable-mbstring=shared \
--with-mysql=shared \ --with-pdo-mysql=shared \ --with-gd=shared
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ࠷దԽͷಓ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP 1)1ΛόϦόϦ͏ w"QBDIF࿈ܞ w"1$ wOHJOY ࣮ࡍʹαʔϏεΛ҆ఆՔಇͤ͞Δҝʹ ඞཁͳཁૉ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP NPE@QIQ w"QBDIF͔Β1)1Λಈ࡞ͤ͞Δ w1)1ͷιʔεͱ"QBDIF͕ඞཁ ग़དྷ্͕ͬͨNPE@QIQBQBDIF͔Β ༗ޮʹ͢Δ # yum install
httpd httpd-devel $ configure --with-apxs2 $ make # make install
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP IUUQEDPOG w"QBDIFͷઃఆϑΝΠϧʹԼهΛه "QBDIFΛ࠶ىಈ͢Ε LoadModule php5_module /usr/lib64/httpd/ modules/libphp5.so <FilesMatch
\.php$> SetHandler application/x-httpd-php </FilesMatch>
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ಈ͍ͨ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP "1$ w1)1εΫϦϓτͷղੳ݁ՌΛอଘ wղੳൈ͖Ͱ;FOE&OHJOF͕Քಇ w8PSE1SFTTͳΒഒ͘Β͍͘ wεΫϦϓτ͕ଟ͍ෳࡶͳίʔυʹޮ͘ w,FZ7BMVF4UPSFͱͯ͑͠Δ # pecl
install apc
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP http://vipinkrsahu.blogspot.jp/2010/06/apc-vs-memcache- in-joomla-and-magento.html
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP QIQGQN wεʔύʔߴͳOHJOYͰՔಇͤ͞Δ w࣮1)1ʹ΄ͱΜͲޮՌ͕ͳ͍ w4"1*ͷҰछ OHJOYը૾$44ʹޮ͘ $ configure --enable-fpm
$ make # make install
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP 4"1* $-*"QBDIFQIQGQNͳͲ͕ ͋Δ 1)1͕֎෦͔ΒݺΕΔ૭ޱ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP BQBDIF NPE@QIQ BQBDIF ެ։σΟϨΫτϦ 1)1͕ෆཁͳ࣌QIQͷό ΠφϦࠐΈͷBQBDIF͕ಈ࡞ NPE@QIQ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP OHJOY QIQGQN OHJOY ެ։σΟϨΫτϦ ϑΝΠϧΛ୳ͯ͠ฦ͢ͷΈ QIQGQN QIQ 1)1ʹઐ೦
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP OHJOYͷಋೖ FUDZVNSFQPTEOHJOYSFQPʹՃ [nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/6/x86_64/ gpgcheck=0 enabled=1
# yum install nginx
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP FUDOHJOYDPOGEEFGBVMUDPOG location ~ \.php$ { root html; fastcgi_pass
127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; include fastcgi_params; } # cp -f /usr/local/etc/php-fpm.conf.default /usr/local/ etc/php-fpm.conf # cp -f sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm # chmod 755 /etc/init.d/php-fpm # mkdir /var/log/php-fpm # chown -R nginx:nginx /var/log/php-fpm
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ৭ʑઃఆ wFUDOHJOYDPOGEEFGBVMUDPOG wGBTUDHJQBSBN wVTSMPDBMFUDQIQGQNDPOG wQJEVTFSHSPVQ # service nginx
start # service php-fpm start
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ࿅श8PSE1SFTTΛಋೖ wZVNJOTUBMMNZTRMTFSWFS wTFSWJDFNZTRMETUBSU wVTSTIBSFOHJOYIUNMͷԼ͕ެ։ wFUDOHJOYDPOGEEFGBVMUDPOGͷ JOEFYʹJOEFYQIQΛ͢
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP ·ͱΊ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP Ϗϧυجຊ wશͯͷͷϏϧυ͕ඞཁ wZVNͳͲศརͳͷͰ͏͖ wZVNͰෆ͕͋Δ߹ʁ ɹɹࣗͰιʔε͔ΒϏϧυ͢Δ ɹɹ֦ு͚ͩϏϧυͯ͠ೖΕସ͑Δ 1)1ʹݶͬͨͰͳ͍ࣝ
࣌ؒٱ1)1ߏஙͷڭࣨ:VTVLF"OEP !ZBOEP 1)1ͷߏங w࠷ͰYPSY w৽͍͠ͷૣ͍ w"1$ઈରೖΕΔ͖ wOHJOYঢ়گ࣍ୈ