CakePHP2ã使ãããã«MAMPãæ´æ°ãã
CakePHP2ç³»ããããã使ã£ã¦ã¿ããã¨æã£ããããªããèªåã®ç°å¢ã§ãã¾ãåãã¾ãããã©ãã調ã¹ã¦ã¿ãã¨phpã®ãã¼ã¸ã§ã³ãä½ãããã®ãåå ã¿ãããªã®ã§ãMAMPãã¢ãããã¼ãããäºã«ãã¾ããã
èªåã®Macã¯ãã¾ã ã«Leopardã§ãææ°ã®MAMP2ç³»ã¯æ¢ã«ãµãã¼ããã¦ããã¦ã¾ããããªã®ã§1ç³»ã®ææ°ã§ãã1.9.6ã«ã¢ãããã¼ããã¾ãããããMAMPã¯2ç³»ãªã®ã§ãå¾ã§å½¹ã«ç«ã¤äºã¯ç¡ãããã ãã©ãããããã®ã¯æ¸ãã¦ããããã®ã§ä¸å¿ã¡ã¢ãã¦ããã¾ãã
æ´æ°æé
http://documentation.mamp.info/en/mamp/installation/updating-mamp
- Rename the current program folder MAMP to MAMP_OLD
- Load the installation image of MAMP from http://mamp.info and open it
- Drag the MAMP folder from the installation image to your "Applications" folder
- Copy the directories "htdocs" and "db" from your MAMP_OLD folder into the MAMP folder. It contains your personal HTML files and database contents. Overwrite the folders in the new MAMP folder
- Check whether all data has been transferred correctly
- The MAMP_OLD folder can now be deleted. You may however keep it, so you can fall back to your original setup
å ¬å¼ã§ã¯ãããªæé ã«ãªã£ã¦ãã¾ããMySQLã®ä¸èº«ã¨ãã¯èªåã§ãã¾ãäºãã£ã¦ããããã¯ããªãæ§åãèªåã®å ´åãVirtual Hostã ã£ããèªå·±è¨¼æã®SSLã ã£ãããããã®ã§ãããã¡ãã£ã¨æéããããã¾ãã
$ cd /Applications $ mv MAMP MAMP_OLD #MAMP 1.9.6ã/Applications/MAMPã«è¨ç½® $ cd MAMP $ rm -fR db/ $ cp ../MAMP_OLD/db .
ã¾ãã¯å ¬å¼ã®æé ã©ããMySQLã®ãã¼ã¿ãã¼ã¹ã§ããã¦ã¼ã¶ã¼ãã¼ã¿ã®ç§»è¡ã¾ã§ããã¾ãããªããVirtual Hostãä½ã£ã¦ããããhtdocsã¯ä½¿ã£ã¦ã¾ããã§ããã
Virtual Hostã¨SSL
$ cp ../MAMP_OLD/conf/apache/myhttpd.conf conf/apache/ $ cp -R ../MAMP_OLD/conf/apache/ssl_crt conf/apache/ $ cp -R ../MAMP_OLD/conf/apache/ssl_key conf/apache/
httpd.confãssl.confã¯æãã¤ãããèªåãæ¸ããè¨å®ã¯myhttpd.confã«ã¾ã¨ãã¾ãããããã¨SSLç¨ã®ãã¡ã¤ã«ãã³ãã¼ãã¾ãã
Include /Applications/MAMP/conf/apache/myhttpd.conf
httpd.confã®æå¾ã§èªåã®confãèªã¿è¾¼ãããã«includeãæ¸ãã¾ãã
ç¸å¯¾ãã¹ã¯ãã¡ã ã£ã
Include myhttpd.conf
$ /Applications/MAMP/bin/apache2/bin/apachectl configtest httpd: could not open document config file /Applications/MAMP/Library/myhttpd.conf
myhttpd.confã¨httpd.confã¯åããã£ã¬ã¯ããªã«ããã®ã§ãç¸å¯¾ãã¹ã§ãè¯ãããããªããã¨æã£ããã©ããªãããã¡ã§ãããã¾ãã絶対ãã¹ã§å°ãäºããªãã®ã§ã絶対ãã¹ã§æ¸ãã¾ãã
sslç¨ã®è¨å®
$ vim /Applications/MAMP/bin/startApache.sh
# /bin/sh
/Applications/MAMP/Library/bin/apachectl startssl
MAMPã§SSL使ãã«ã¯ãstartApache.shãç·¨éããå¿
è¦ãããã¾ãããããå¤ãMAMPããæ°ããMAMPã«ãèªåã§ç§»è¡ããªãã¨ãããªããã¡ã¤ã«ã§ããã¨ãã£ã¦ãstart
ãstartssl
ã«ãªãã ããªã®ã§ãæ®éã«æ¸ãè¶³ãã¾ãã
<IfDefine SSL> LoadModule ssl_module modules/mod_ssl.so </IfDefine>
ã¡ãªã¿ã«ãã®å¤æ´ã¯ãhttpd.confã®ãã®IfDefine SSL
ãçã«ãªãããã«ãã¦ãã¾ãã
MySQLã®ãã¼ã¿ãã¡ã¤ã«ã®ã¢ããã°ã¬ã¼ã
MAMP.appãèµ·åããã¨ãMySQLã®ãã¼ã¿ãã¡ã¤ã«ãã¢ããã°ã¬ã¼ãããããã«ã¡ãã»ã¼ã¸ãåºã¾ãããã¾ãMySQLã¯5.0ãã5.5ã«ãªã£ãã®ã§ããããããå¾ã¾ãããããã¯ã¢ããããã¦ããã¢ããã°ã¬ã¼ããå§ããããã«æ¸ãã¦ããã¾ããä»åã¯ç¹ã«åé¡ãªãã¢ããã°ã¬ã¼ãã§ããããã ãã©ãã©ããã§æ¢ã¾ã£ããããããããããããã¾ãéçºç°å¢ã ãããææªæ¶ãã¦ãè¯ããã©ãã¢ããã°ã¬ã¼ããã¼ã«ã®ã¨ãã«ãæ¸ãã¦ãããã©ãããã¯ã¢ãããã¦ããã®ã¢ããã°ã¬ã¼ããæ¨å¥¨ããã¦ã¾ãããªã®ã§MAMP_OLDãã£ã¬ã¯ããªãåé¤ããåã«ãã£ãã»ããè¯ãã§ãã
ãã®ä»
MAMP 1.9.6ã§ã¯php5.3ç³»ã¨5.2ç³»ãåãæ¿ãã¦ä½¿ããããã§ãããªã®ã§MAMP.appã§ã©ã¡ãã使ããåãæ¿ããåºæ¥ã¾ãããã¨ãã£ãã·ã¥ãAPC, eAccelerator, XCacheããé¸ã¹ã¾ãã
ãã¨ãããªãåã«mongodbã使ãããããããã©ãæµç³ã«ç´°ããã¨ãè¦ãã¦ãªãã®ã§ãã¾ã使ãã¨ãã«æ¹ãã¦å°å ¥ããããªã¼ã