ãWebã¢ããªã¨ã³ã¸ãã¢é¤æèªæ¬ãã¨Kodingã§PHPãåå¼·ãã
æ¨æ¥ã¨ã³ããª( http://uzulla.hateblo.jp/entry/2014/03/08/050621 )ãæ¸ããKodingã§ããã詳ããã¯æ¨æ¥ã®ã¨ã³ããªãè¦ã¦ããã ãã¨ãã¦ãä»åº¦çºå£²ããããWebã¢ããªã¨ã³ã¸ãã¢é¤æèªæ¬ããKodingã§åå¼·ããã«ã¯ã©ãããã°ãããæ¸ãã¦ã¿ã¾ãã
çµæã¨ãã¦ãKodingãã¤ããã°ãChromeãFirefoxãPCã«ã¯ãã£ã¦ããã°ãPCã«ä½ãã¤ã³ã¹ãã¼ã«ãããã¨ãªããã©ã¦ã¶ä¸ã¤ã§å¦ç¿ãã§ãã¾ããã
ãã®ã¨ã³ããªã«è¨è¼ããã¦ãããã¨
ã»Kodingã®ã¢ã«ã¦ã³ãåå¾
ã»ç»é¢ã®ç°¡åãªèª¬æ
ã»PHPãã¡ãã£ã¨æ¸ãã¦ã¿ãæ¹æ³
ã»æ¬é¡ãWebã¢ããªã¨ã³ã¸ãã¢é¤æèªæ¬ãã®ãµã³ãã«ã³ã¼ããKodingã§åããæ¹æ³
ã»ã·ã§ã«ï¼Terminalï¼ãã¡ãã£ã¨ã¤ãã£ã¦ã¿ãæ¹æ³
ã»ãããããªã£ãã¨ãã«ã©ããã£ããæåã«ãã©ããã
ã»ç°¡åãªããã¯ã¢ããã®æ¹æ³
ã»ããã¦æ¬ã®å®£ä¼
ãè¨è¼ããã¦ãã¾ãã
Kodingåå¿è
ã®æ¹ãã¡ãã£ã¨Kodingã¤ãã£ã¦ã¿ãã®ã«ãããã§ãããã
æºå
ã¢ã«ã¦ã³ããåå¾ãã¾ã
https://koding.com/R/uzulla
ããã¢ã«ã¦ã³ããåå¾ãã¾ãã
Emailã¨å¥½ããªID(URLã«ä½¿ããã¾ã)ãè¨å®ãã¦Signupãæ¼ãã¾ããGitHubã¢ã«ã¦ã³ãã§ãç»é²ãå¯è½ã§ãã
ããã¨ç»é²ãå®äºãã¦ã以ä¸ã®ãããªç»é¢ã«ãªãã¾ãã
Emailãèªè¨¼ãã
ç»é²ããã¡ã¼ã«ã¢ãã¬ã¹ã«ä»¥ä¸ã®ãããªã¡ã¼ã«ãã¨ã©ãã¾ãã®ã§ãè¨è¼ãããURLãéãã¾ãã
ãã¹ã¯ã¼ã(password)ããã¹ã¯ã¼ã確èªï¼confirm password)ãè¨å®ãã¾ãã
èªåã®ååãå¿
è¦ãªãã°è¨å®ãã¾ããããããã®ååã¯å¾è¿°ã®ã¿ã¤ã ã©ã¤ã³ã«è¡¨ç¤ºããã¾ãã
ããã§Kodingãã¤ããæºåãã§ãã¾ããã
ç»é¢æ§æãå·¦ä¸ã®ã¡ãã¥ã¼ï¼ã¿ãï¼ã«ã¤ãã¦
å·¦ã®ãããã·ã¢ã¤ã³ã³ãããã¿ã¤ã ã©ã¤ã³ãã³ã©ãã¬ã¼ã·ã§ã³ãã·ã§ã«ãã¨ãã£ã¿ã¼ãã¢ããªã«ãªãã¾ãã
åºæ¬çã«ãã·ã§ã«ã¨ã¨ãã£ã¿ãã¤ãã£ã¦éçºãè¡ãã¾ãã
ã¿ã¤ã ã©ã¤ã³ã¯ãã¤ãã¿ã¼ã¿ãããªãã®ã§ããMarkdownå½¢å¼ã§æ稿ã§ãã¾ãã
ã¢ããªã¨ã³ã©ãã¯èªåãä½ãããããã£ã¦ã¾ãã
ã¢ã«ã¦ã³ãç»é²ç´å¾ã¯è£å´ã§èªåã®VMï¼ãµã¼ãã¼ï¼ãä½æããã¦ããã®ã§ããã¾ãåããªãæãããã¨æãã¾ããï¼åãï¼åã°ããTimelineãªã©ãã¿ã¦ãããã¤ã¶ãã¾ãããã
ã¡ãªã¿ã«ãç§ã®ã¢ã«ã¦ã³ãã¯
https://koding.com/uzulla
ã§ãã
ï¼ãã®ã¨ã³ããªã®ã¹ã¯ã·ã§ã«ããã¢ã«ã¦ã³ãã¯ãæåããã調ã¹ãçºã«ã¢ã«ã¦ã³ãåãç´ãã¦ãã£ã¦ããã®ã§å¾ã§æ¶ãã¾ãï¼
ã¨ããããèªåã®ãµã¤ããè¦ã¦ã¿ã
赤ãåè§ã®ã¨ãã£ã¿ã®ã¿ããéãã¦ä¸ããã以ä¸ã®ãããªç»é¢ã«ãªãã¾ãã
ï¼ãããã²ãããªããã°VMãã¾ã ã§ãã¦ããªãå¯è½æ§ãããã¾ããããã¡ãã£ã¨å¾
ã¡ã¾ãããï¼
å·¦å´ãã¤ã³ã®ä¸é¨ã«å°ãããon Username.kd.ioã ã¨ãã表示ãããã¾ããããããã¯ãªãã¯ããã¨ãã©ã¦ã¶ã§ãµã¤ããè¦ãäºãã§ãã¾ãã
æåã¯è¶è²ã®ç»é¢ã表示ãããè±èªã§ãããæ¬å½ã«è¡¨ç¤ºãã¦ããã®ãï¼ç¶ãããªãã¯ãªãã¯ãçãªãã¨ã確èªããã¾ãã
ããã¯ååã¢ã¯ã»ã¹æãã¾ãã¯1æéã«ä¸åº¦è¡¨ç¤ºãããç»é¢ã§ãKodingã®ç¡æãã©ã³ã®å¶éã§ããä¸åº¦ãClick to continue: user_name.kd.ioããã¯ãªãã¯ããã°ãã°ããã¿ãªãã§ãã¿ã¾ãã
ï¼ä»¥å¾user_nameã¯èªåã®IDã«ç½®ãæãã¦ä¸ããï¼
ã¾ããä¸ä¾¿ã§ã¯ããã¾ãããé常ã®å¦ç¿ã ããªãããã¯å¤§ããåé¡ã«ãªããªãã¨æãã®ã§è«¦ãã¾ãããã
ãã¦ãClick to continue ã®URLãæ¼ãã¦å
ã«ãããã¨ããHello Worldãã表示ãããã¨æãã¾ãã
ããã¾ã§ç¢ºèªã§ããã°ãKodingã®ãµã¤ããåãã¦ããäºã確èªåºæ¥ã¾ããã
ä¸å¤®ã®ãPHPããªã©ã¯PHPã§åä½ãã¦ãã¾ãã®ã§ã¿ã¦ã¿ã¾ãããã
PHPãä¿®æ£ãã¦ã¿ã
http://username.kd.io/php.phpãä¿®æ£ãã¦ã¿ã¾ãããã
ä¸åã¨ãã£ã¿ã«ãã©ããå·¦å´ã®ãã¤ã³ã¯ãã¡ã¤ã«ãã©ã¦ã¶ã«ãªã£ã¦ãã¾ãã®ã§ãWebï¼ãã£ã¬ã¯ããªï¼ãããã«ã¯ãªãã¯ãã¦ã²ããããã®ä¸ã®php.phpãããã«ã¯ãªãã¯ãã¦ã²ããã¾ãã
以ä¸ã®ãããªç·¨éç»é¢ã«ãªãã°OKã§ãã
æåã¯åã£ãHTMLã§æ¸ããã¦ãã¾ãããã°ã£ããã¨å ¨é¨æ¶ãã¦ãã¾ãã¾ããããã¡ã¢å¸³ãªã©ã®ãµã¤ãã®ã¨ãã£ã¿ã¨åãã§ããå ¨é¨é¸æãã¦BackSpaceããæå¾ã®è¡ããBackspaceé£æããã¾ãæ¹æ³ã¯åãã¾ããã
Kodingã®ã¨ãã£ã¿ã¯ãã©ã¦ã¶ã®å²ã«ããã§ãã¦ããã®ã§ãCmd+Aï¼Winã ã¨Ctrl+Aï¼ã§å ¨é¸æããããCmd+sï¼Ctrl+s)ã§ä¿ååºæ¥ãããã¾ãã
ã¾ãã軽ãæ§æãã§ãã¯ã¯ãªã¢ã«ã¿ã¤ã ã§èµ°ã£ã¦ããããããç°¡åãªææ³ãã¹ã¯ãå·¦å´ã«èµ¤ãããã³ãã§ã¦ããã¾ãããããï¼
ã§ã¯ãphpinfo()åºåã«æ¸ãæãã¾ã
<?php phpinfo();
ãã®ããã«æ¸ãæãã¦ãä¿åãã¦ãã ããã
ããã·ã§ã¼ãã«ãããã¼ã«ä¸æ
£ãã§ãã¦ã¹ã§ä¿åãããå ´åã«ã¯ãå³ä¸ã®ãä¸ãã®ãããªã¢ã¤ã³ã³ãã¯ãªãã¯ããã¨ãã¡ãã¥ã¼ã表示ããã¾ãã®ã§ä¿åãã¦ãã ããã
ï¼ãã¦ã¹ã§ã¡ãã¥ã¼ãæä½ããæããã©ã¼ã«ã¹ãã¨ãã£ã¿ããã¯ãããã®ã§ãä¸åã¨ãã£ã¿ãã¯ãªãã¯ããªãã¨ããã¯ã¹ãã¼ã¹çãããã¨ãã©ã¦ã¶ã®ããã¯ã«ãªã£ã¦ãã¾ãã¾ãã注æãã¾ãããï¼
ä¿åãå®äºããã¨ãã¨ãã£ã¿ä¸ã®ã¿ãã®php.phpãã¡ã¤ã«åã®æ¨ªã«ãã£ãç½ãããããæ¶ãã¾ãã
ä¿ååï¼
ä¿åå¾ï¼
ãã¦ãå
ã»ã©ã®Helloworldã®ãã¼ã¸ãå度ã²ããããªãã¼ããã¾ãã
表示ãå¤ãã£ã¦phpinfo()åºåã«ãªãã¨æãã¾ããphpinfo()ã¯ç¾å¨ã®PHPã®è¨å®ã確èªããå®çªã®ç»é¢ã§ããã
ã¨ãã¾ãããããæãã§ãã¡ã¤ã«ãä¿®æ£ãããã¨ã§ãphpãã¡ã¤ã«ãä¿®æ£åºæ¥ã¾ãã
ã¨ãã£ã¿å·¦ãã¤ã³ã®ãWebãã®ãã£ã¬ã¯ããªãDocumentrootãã¤ã¾ããã©ã¦ã¶ã§ã¢ã¯ã»ã¹ããã¨ãã®ã/ãã«ãªããããã®ã§ãæåã«ããã¦æããã¡ã¤ã«ãå ¨é¨ãããããã¦ããã¨ã¯å¥½ãã«ãã¡ã¤ã«ã追å ãã¦ããã¾ãã
ããªããåæ©ã®åæ©ã®PHPã®åå¼·ãããã®ã§ããã°ãã¾ãããã¾ã§ã§ååããªã¨æãã¾ãã
ã·ã§ã«ã使ã
ã§ã¯ããWebã¢ããªã¨ã³ã¸ãã¢é¤æèªæ¬ãã§å¿ é ã¨ããã¦ããã ãã¦ããã·ã§ã«ãã¤ãã£ã¦ã¿ã¾ãããã
ä¸é¨ã®ç·ã®ã[>_]ããããªæãã®ã·ã§ã«ã¿ããã²ããã¾ãã以ä¸ã®ãããªç»é¢ã«ãªãã¨æãã¾ãã
ããããªããã«ãã¾ã£ãããªç»é¢ã®ã¾ã¾ããªãã°ãæéãã¡ãã£ã¨ããã¦ãããªãã¼ããã¦ã¿ã¦ãã ããã
以ä¸ã®ããã«ãOpen New sessionãã¨ã§ã¦ããå ´åã«ã¯ãããã¯ãªãã¯ãã¦ãµã¼ãã¼ï¼VMï¼ãèµ·åãã¦ãã ããï¼Kodingã®ç¡æãã©ã³ã§ã¯ãï¼æéæ¾ç½®ããã¨ãµã¼ãã¼ãçµäºãã¾ãï¼
ããã¯ããã©ã¦ã¶ã§ã¢ã¯ã»ã¹ãã¦ã²ãããªãå ´åãåæ§ã§ãã
ã§ã¯ããããã«php ãcliã§èµ·åãã¦ã¿ã¾ããã
$ php -v
ã¨å
¥åãã¦ã¿ã¦ãã ããã以ä¸ã®ãããªçµæã«ãªãã¨æãã¾ãã
注æç¹ã¨ãã¦ãã·ã§ã«ã¯æ¥æ¬èªå ¥åï¼IMEï¼ãæå¹ã ã¨å ¥åã§ãã¾ããããªãï¼åè§è±æ°ã¢ã¼ãï¼ã«ãã¦å ¥åãã¦ãã ããã
ãã¦ãä¸ã®å
é ã®ã$ãã¯ç¿æ
£ã¨ãã¦ã·ã§ã«ã§ãããã¨ã表ãã¦ãã¾ãã
Kodingã ã¨ãuser_name@vm-0:~$  ããªã©ã¨ããã§ã«è¡¨ç¤ºããã¦ãããã¨ãããã¾ããããã®é¨åã$ã¨ãã¦è¡¨ç¾ãã¦å±
ã¾ããã¤ã¾ãå
é ã®$ã¯ç¡è¦ãã¦ããphp -vãã ããå
¥åãã¦ä¸ããã
ãã®åºåãè¦ãã¨ãããã¾ãããPHP 5.4.9ãã¯ãã£ã¦ãã¾ãããPHPã®ææ°çã¯5.5ãªã®ã§ä¸ãããæ°åã¯ããã¾ãããããã¯ä»åçç¥ãã¾ãã
ã·ã§ã«ã®æä½ãçµãã£ãããä¸é¨ã®ãTerminalãã¨ããæã«ã«ã¼ã½ã«ãåãããã¨ç¾ãããããã³ã§éãããã¨ãã§ãã¾ãã
ï¼å¿è«exitã¨ã³ãã³ãã§ãçµäºåºæ¥ã¾ãï¼
åæã«ã·ã§ã«ãè¤æ°ä½¿ãããå ´åã«ã¯ããï¼ããæ¼ãã¨ããä¸æã·ã§ã«ãã²ããã¾ãããããè¤æ°èµ·åãã¦ããå ´åã«ã¯ãã¿ãçã«åãæããäºãå¯è½ã§ãã
ãµã³ãã«ã¢ããªã使ãäºåè¨å®
Kodingã¯ä»æ¥ç¾å¨Ubuntu13.04ãããã©ã«ãã§ã¤ã³ã¹ãã¼ã«ããã¦ãã¾ãããæ¬ã®ãµã³ãã«ã¢ããªã使ãã«ã¯ãããã¤ãã®ããã°ã©ã ãããã¦ããªãã®ã§ä»¥ä¸ã®ããã«ãã¦è¿½å ãã¾ãã
sqlite3 CLIã¨ãphpã®sqliteãµãã¼ããphpã®curlãµãã¼ããå ¥ãã¾ãã
$ sudo apt-get install sqlite3 $ sudo apt-get install php5-sqlite $ sudo apt-get install php5-curl
ãã®ã¨ãã[sudo] password for user_name:ã¨ãè²´æ¹ã®ãã¹ã¯ã¼ããèãããå ´åãããã¾ãã
åé ã§Kodingã«è¨å®ãããã¹ã¯ã¼ããå
¥åãã¦ãã ããã(è¨å®ãã¦ããªããã°ãè¨å®ãã¦ãã¦ãã ããï¼
ãã¾ãããã°ããºã©ãºã©ã¨è¡¨ç¤ºããã¦ããã±ã¼ã¸ã®ã¤ã³ã¹ãã¼ã«ãå®äºãã¾ãã
ããã§å¿
è¦ãªãã®ã¯è¿½å ã§ãã¾ããã
ãµã³ãã«ã¢ããªãå ¥ãã¦ã¿ã
https://github.com/uzulla/Tinitter
ã«ã¢ãããã¼ãããã¦ããæ¸ç±ã®ãµã³ãã«ã¢ããªãããã¦ã¿ã¾ãããã
gitã¯æåããã¯ãã£ã¦ãã¾ãã®ã§ã以ä¸ã®ã³ãã³ãã§cloneãããã¨ãã§ãã¾ãã
$ git clone https://github.com/uzulla/Tinitter.git ~/Tinitter
詳細ã¯æ¸ç±ã https://github.com/uzulla/Tinitter ã®READMEãè¦ã¦ããã ããã°ã¨ãããã¾ããã以ä¸ã®ããã«ãã¦åæè¨å®ããã¾ã
$ cd ~/Tinitter $ cp config.php.sample config.php $ sqlite3 sqlite.db < schema.sqlite3.sql $ curl -sS https://getcomposer.org/installer | php $ php composer.phar install
ãããããã¹ããã
æ©éèµ·åãããã¨ããã§ãããã¾ãã¯UnitTestãã¯ãããã¦ã¿ã¾ããã
$ cd ~/Tinitter/test/ $ ../vendor/bin/phpunit
ãããã以ä¸ã®ããã«ã¨ã©ã¼ã«ãªãã¾ãã
ãããä½ã®ãã¹ãããã£ã¦ãããã¯æ¬ãã³ã¼ããèªãã§ããã ãã¨ãã¦ãåä¸ã®ã¨ã©ã¼ã§ããã°ãPHPã®mbstringã®è¨å®ãããã¦ãã¾ãããphp.iniãä¿®æ£ãã¦mbstring.internal_encodingãå¤æ´ããå¿ è¦ãããã¾ãã
$ php --ini
ã¨å®è¡ãããã¨ã§ãä¿®æ£ãã¹ãphp.iniã®å ´æã¯ç¢ºèªã§ãã¾ãã
/etc/php5/cli/php.iniãç®çã®ãã¡ã¤ã«ã§ããã
ã§ããã£ããã¦ã§ãã¨ãã£ã¿ã§/etc/php.iniã®ä¿®æ£ããããæã§ããã
æ®å¿µãªäºã«/etc以ä¸ã®root権éãå¿
è¦ãªãã¡ã¤ã«ã¯ãã©ã¦ã¶ã®ã¨ãã£ã¿ã§ã¯æ¨©éçã«ä¿®æ£ã§ãã¾ããã
sudo vi ãªã©ã§ç·¨éãã§ãã¾ãããviã¯ä½¿ãæ¹ããããããã®ã§ãä»åã¯ä»¥ä¸ã®ã³ãã³ããé ã«å®è¡ãã¦ããã ããã°è¨å®ãã§ãã¾ãã
$ echo '' | sudo tee -a /etc/php5/cli/php.ini $ echo 'date.timezone = Asia/Tokyo' | sudo tee -a /etc/php5/cli/php.ini $ echo 'mbstring.internal_encoding = UTF-8' | sudo tee -a /etc/php5/cli/php.ini
ï¼ããã«å¤±æããå ´åãå¾è¿°ã®re-initializeããããã¨ã§æ»ãäºãã§ãã¾ããã¾ãããã®å ´åapt-getãªã©ã®æé ã¯æåããè¡ã£ã¦ä¸ããï¼
é©åã«è¨å®ãå®äºããå¾ã«ãå
ã»ã©ã®ãã¹ããããä¸åº¦å®è¡ããã°ã以ä¸ã®ãããªåºåã§OKã¨è¡¨ç¤ºãããã¯ãã§ãã
èµ·åãã¦ã¿ã
ã§ã¯ãå®éã«èµ·åãã¦ã¿ã¾ããã
cd ~/Tinitter/htdocs/ $ php -S 0:8080
以ä¸ã®ããã«ãªã£ããããhttp://user_name.kd.io:8080/ãããã©ã¦ã¶ã§ã²ããã¾ããã
ã©ãã§ãï¼èµ·ååºæ¥ã¾ããã§ããããï¼
æ稿ãã¡ããã¨ãããããã£ã¦ã¿ã¦ãã ããã
ãµã³ãã«ã¢ããªãä¿®æ£ãã¦ã¿ã
å¿è«ä»åè¨ç½®ãããµã³ãã«ã³ã¼ãã¯ã¦ã§ãã¨ãã£ã¿ã§ä¿®æ£ãã§ãã¾ãã
ä»åã¯ãã¡ã¤ã«ãã©ã¦ã¶ã§ã¯ãTinitterãã¨ãããã£ã¬ã¯ããªã®ä¸ã«ããã¾ãã®ã§ãTinitter/templates/frame.twigã®bodyã¿ã°ç´å¾ãªã©ã«
<h1>Yeah! Happy PHP!!!</h1>
ãªã©ã¨è¿½è¨ãã¦ã¿ã¾ãããã
ä¿®æ£ããããªãã¼ããã¦ã¿ã¾ããããå¤æ´ãåæ ããã¦ããã¨æãã¾ããã©ãã§ããããï¼
ãã¨ã¯åæ§ã®èª¿åã§ä¿®æ£ãã¦ããã°è¯ãã§ããï¼
ãªãããããããªã£ãããããç´ãããå ´å (20140309追è¨ï¼
ã·ã§ã«æä½ãééããããã¦ã©ãã«ããããããªã£ã¦ãã¾ã£ããç´ããªããªã£ã¦ãã¾ã£ãå ´åã§ããµã¼ãã¼ã®è¨å®ãã³ã³ãã³ããåæåããäºãã§ãã¾ãã
å
¨é¨æ¨ã¦ãã®ã§ããã°ãã¾ãã¾ããããå¿
è¦ãªãã¡ã¤ã«ã«ã¤ãã¦ã¯å¾è¿°ã®ããã¯ã¢ãããããå¾ã«ããã¾ãããã
ã·ã¹ãã ããããããªã£ãå ´å
apt-getã§ç¡é§ãªç©ãããã¦æåããããããªã£ã¦ãã¾ã£ãå ´åãã/etc以ä¸ã®è¨å®ãã¡ã¤ã«ãããã£ã¦å£ãã¦ãã¾ã£ãå ´åãªã©ããã¼ã ãã£ã¬ã¯ããªãã¤ã¾ãã/home/user_nameã以å¤ããã©ãããå ´åã¯ãre-initializeãããã¾ãã
ã¨ãã£ã¿ãªã©ã§ã¿ãããã¼ã ãã£ã¬ã¯ããªãã¤ã¾ã/home/user_name以ä¸ã®ãã¡ã¤ã«ã¯æ¶ããªãçã§ããã念ã®ããã«ããã¯ã¢ããããã¨è¯ãã§ãããã
ç»é¢å³ä¸ã®èªåã®IDãããããæã®ãå³ã®ä¸åãç¢å°ãã¯ãªãã¯ããEmvironmentãã²ããã¾ãã
ãvirtual machineãé
ç®ã®ãvm-0ãï¼0ã®æã¯æ°åããããäºãããã¾ãï¼ãå³ã¯ãªãã¯ããã¨ããããã¢ããã表示ããããre-initialize VMãã¨ãããã®ãããã¾ãã®ã§ããããã¯ãªãã¯ããã¨ãµã¼ãã¼ã®ãã¼ã ãã£ã¬ã¯ããªä»¥å¤ãåæåããäºãã§ãã¾ãã
æ¼ããå¾ãå®äºã¾ã§ã¯ãã°ããæéããããã¾ãã
ãã°ããå¾
ã£ã¦ããï¼10åãããï¼ãã©ã¦ã¶ããªãã¼ããã¦ã¨ãã£ã¿ãã·ã§ã«ãã²ããã¦ã¿ã¾ããããå®äºããããå度ã·ã§ã«ãã²ãããããã«ãªãã¾ãã
以ä¸ã®ãããªè¡¨ç¤ºã§ããã°ãå¦çã¯ã¾ã ããã£ã¦ãã¾ããã
/home/user_nameãå«ãã¦ãå ¨é¨ãåæåãããå ´å
vmãä¸åº¦åé¤ããäºã§ãã¼ã ãã£ã¬ã¯ããªãå«ãã¦åæåã§ãã¾ãã
å
¨é¨ã®ã³ã³ãã³ããæ¶ãã¾ãã®ã§ãå¿
è¦ã§ããã°å¾è¿°ã®ããã¯ã¢ããããã¦ãã ããã
å³ä¸ã®èªåã®IDãããããã¨ããã®å³ã®ä¸åãç¢å°ãã¯ãªãã¯ããEmvironmentãã²ããã¾ãã
vmãå³ã¯ãªãã¯ãã¦ãDeleteãé¸æãã¾ãã
確èªç»é¢ãã§ã¾ãã®ã§ãæ¸ãã¦ããæ示éãã«ãvm-0ãçã¨å
¥åãã¦ãã ãã
åé¤ã§ããããvirtual machineã®ãï¼ããã¿ã³ãããã¦ä½æãã¾ãã
ï¼vmãDeleteããã¯ããªã®ã«ãvmãæ¶ããªãã£ãããä¸åº¦ãã©ã¦ã¶ããªãã¼ããã¾ãããï¼
ã¡ãªã¿ã«ç»é¢ä¸ã§ã¯ããã«ä½æå®äºããé°å²æ°ã«ãªãã¾ãããå é¨ã§ã¯å¦çãçµãã£ã¦ããªãäºãããã¾ãããã°ããå¾ ã£ã¦ããï¼10åãããï¼ãã©ã¦ã¶ããªãã¼ããã¦ã¨ãã£ã¿ãã·ã§ã«ãã²ããã¦ã¿ã¾ãããã*2
ãã¨ãã°ä»¥ä¸ã®ãããªè¡¨ç¤ºã§ããã°åä½æã¯ã¾ã ããã£ã¦ãã¾ããã
ãã ãã¾ã çµãã£ã¦ããªãããã«è¦ãã¦ããã·ã§ã«ï¼Terminalï¼ãã²ããã¦ã
ãã®ããã«åæ¥ç¶ãã¾ããï¼ã¨ãããã¦ããæã§åæ¥ç¶ã試è¡ããã¨ããããªãã¤ãªãã£ãããããã¨ãããã¾ãã
ã¾ããã·ã§ã«ï¼Terminalï¼ãã¤ãªãã£ã¦ããã¨ãã£ã¿ã¯ã²ãããªãäºãããã¾ã*3ã
ä¸åº¦ãã°ã¢ã¦ããã¦ãã©ã¦ã¶ãéãã¦ãã°ã¤ã³ããã¨ãªããäºãããã¾ãã
ããã§ãç´ããªãå ´åãã¨ãã£ã¿ã®å·¦ä¸ã®ãã¡ã¤ã«ãã©ã¦ã¶ä¸é¨ã®ãâ¦ãããããå³ã¯ãªãã¯ãã¦ã§ã¦ãããunmountããé¸æãã¦ãä¸åº¦ãã°ã¢ã¦ããã°ã¤ã³ããã¨ãªãã£ãããã¾ãã
ï¼ãã以ä¸ã®ãããªè¡¨ç¤ºã§ãªãã赤ã表示ã®ã¨ãã¯ãæåãã¯ãªãã¯ãã¦å試è¡ã§ãªãããããã³ã®éãããã¿ã³ãæ¼ãï¼
ãã®ããã大åãã°ã£ã½ãã§ããâ¦ï¼ä¸ã®ããããã¦ãã¦ã£ã½ãæ
å ±ãããã¤ãã¯ç´ãããã¾ãã¯å¥ã®æåã«ãªãããã§ãâ¦ï¼
ãã¡ã¤ã«ã®ããã¯ã¢ããã¨ã¢ãããã¼ã
åæåããå ´åã¯å¿
è¦ãªãã¡ã¤ã«ã¯ä¿åãã¦ããå¿
è¦ãããã¾ãã
ã¾ããåæåããªãã«ãããã¾ãã«ããã¯ã¢ããã¯åãã¹ãã§ãã*4
ãã¡ã¤ã«ãã¾ã¨ãã¦ãã¦ã³ãã¼ãããæ¹æ³ã¨ãã¦ã
ãã£ã¬ã¯ããªãªã©ãå³ã¯ãªãã¯ãã¦ãZIPã«å§ç¸®ããäºãåºæ¥ã¾ãã
å®è¡ããã¨ã
ãã®ãããªãã¡ã¤ã«ãã§ãã¾ãã®ã§ãããããWebãã®ãªãã«ãã©ãã°ã¢ã³ããããããã¾ãã
Webã®ä¸ã«ãã©ãã°ã¢ã³ãããããããããå³ã¯ãªãã¯ã§URLã調ã¹ãäºãã§ãã¾ãã
ä»åã®ãã¡ã¤ã«åã ã¨
http://user_name.kd.io/Tinitter.zip
ã¨ããURLã§ãã¦ã³ãã¼ãã§ããããã«ãªãã¾ãã
ï¼ã©ãããªããããããå³ã¯ãªãã¯ã§ãã¦ã³ãã¼ããããã§ããã©ãã§ããªãã£ã½ãã§ããâ¦ãï¼
ãã¦ã³ãã¼ããããã¡ã¤ã«ãã¢ãããã¼ãããã«ã¯ããã£ã¬ã¯ããªãå³ã¯ãªãã¯ãã¦Upload Fileãããã¶ã¨ããDrop files here!ãã¨è¡¨ç¤ºãããã®ã§ãããã«ãã¡ã¤ã«ãã¨ã¯ã¹ããã¼ã©ã¼ãFinderãããã©ãã°ã¢ã³ãããããããã¨ã¢ãããã¼ããã§ãã¾ã*5ã
ZIPãã¡ã¤ã«ã§ããã°ããã®å¾å³ã¯ãªãã¯ãã¦ãExtractããå®è¡ããã¨è§£åããäºãã§ãã¾ãã
ããã§ZIPã§ããã¯ã¢ãããããã¡ã¤ã«ãæ»ãäºãã§ãã¾ããã
ã¾ãã説æããããããã®ã§ä»åã¯çç¥ãã¾ãããVMã«SSHãFTPã§æ¥ç¶ãã¦ããã¡ã¤ã«ãã¢ãããã¼ãããã¦ã³ãã¼ãããäºãå¯è½ã§ãã
ã¾ã¨ã
é§ã足ã§ããããKodingã§PHP Builtin serverã«ã¦ãµã³ãã«ã¢ããªãèµ·åããæ¹æ³ãç´¹ä»ãã¾ããã
Kodingã¯é常ã«çãããã®ã§ããï¼ãªãã¼ãããã°ç´ãäºãå¤ãã§ããããã°ãå¤ãâ¦ï¼ããµã¼ãã¼ãã¨ãã£ã¿ãSSHã¯ã©ã¤ã¢ã³ã*6ããã©ã¦ã¶ã®ä¸ã«å
¨é¨ããã¾ã£ã¦ãããæ¬å½ã«ãã©ã¦ã¶ã ãã§éçºã¨ç°¡åãªå
¬éãè¡ãäºãã§ãã¾ãã
PHPã®ã³ã¼ããæ¸ãåå¼·ã ãã§ããã°ã¾ãã¯äºè¶³ããããªæãã¾ãã
ã¾ãããã ãã§æ°¸é ã«ãã£ã¦ãããããã¨ããããã¨å¾®å¦ãªæãããã¾ããï¼èª²éããã°ããããã§ã¯ããã¾ããï¼ãã¾ãã¯èªåã®PCã«ã½ããã¦ã§ã¢ãã¤ã³ã¹ãã¼ã«ã§ããªãï¼æãã¨ããããåãããªãã¨ãï¼ãããªæ¹ã«ãã¨ã£ããããã§ããã°è¯ããªããã¨ããæãã§ãã
åå¿è ã®äººã«ãåããã°ã¨æ¯è¼çç´°ããæ¬ã¨ã³ããªãæ¸ãã¾ããããããã¤ã¾ã¥ããæãããã°ã³ã¡ã³ããããã ããã°å¹¸ãã§ãã
ä»åã¯PHPã®ã¨ããã ãã説æãã¾ããããRubyã®ç« ãããããåé¡ç¡ãã§ããã¯ãã§ãã
æå¾ã«ããã£ã±ãããªããã°ãããªã宣ä¼
ããããç§ãä¸é¨æ å½ããæ¸ç±ãåºã¾ãï¼è³ã¿ã³ã§ãããããã¾ããï¼
çºå£²ãè¨å¿µãã¦ãæ± è¢ã®ã¸ã¥ã³ã¯å æ¸åºã«ã¦ã¤ãã³ããè¡ãã¾ãã
http://www.junkudo.co.jp/mj/store/event_detail.php?fair_id=4314
ããWebã¢ããªã¨ã³ã¸ãã¢é¤æèªæ¬ã(æè¡è©è«ç¤¾)åè¡è¨å¿µâ¨Webã¢ããªã¨ã³ã¸ãã¢ãåºæ¥ãã¾ã§ã
ã¸ã¥ã³ã¯å æ¸åº æ± è¢æ¬åºâ¨éå¬æ¥æï¼2014å¹´03æ20æ¥ï¼æ¨ï¼19:30 ï½
ã¾ã 空ãã¯ãããããããã£ã¨å®£ä¼ãããï¼ã¨ãããã¬ãã·ã£ã¼ãæãã¦ããã¾ãã
ç§ã¯ã¨ãããããã®ããã¼ããã¹ã¼å¤§å
çãã®ãã¼ã¯ã§ãããã¾ããããã£ã¨äººæ¥ã¦ãè¯ãã®ã§ã¯ï¼ã¨æã£ã¦ããã¾ãã
ãé»è©±äºç´ã¨ãããã¼ãã«ããããããã®ã§ã¯ï¼ãã¨ãã話ãããã¾ãããé»è©±äºç´ããç¥ãåãããã
ï¼ä¸è¨URLã®é»è©±çªå·ã«é»è©±ãæããï¼
ã¸ã¥ã³ã¯å ã®åºå¡ãããããããã
å人ãã¤ãã³ãã®åå ç³ãè¾¼ã¿ãªãã§ããã©ã
åºå¡ãããæ¥æã¨ã¤ãã³ãåã¯ãªãã§ããã
å人ã3/20ã®ãªããã¦ã§ãã®ãã¤ã§ãã
åºå¡ãããã¡ãã£ã¨å¾ ã£ã¦ä¸ããã
ï¼ã¡ãã£ã¨å¾ ã¤ï¼
åºå¡ãããWebã¢ããªã¨ã³ã¸ãã¢ãåºæ¥ãã¾ã§ã§ããï¼ã
å人ãããã§ãããã§ãã
åºå¡ãããã§ã¯ãååã¨é»è©±çªå·ããã以ä¸ç¥
ãã®ãããªãããã³ã«ã«ãªã£ã¦ãããããã®ã§ããæ°è»½ã«ã©ãã§ããããã
ã§ã¯ã
*1:Composerå®è¡æã«ã¨ã©ã¼ãã§ãããã§ããã°ããªã«ãã©ã¤ãã©ãªã足ãã¦ããªãå¯è½æ§ãããã¾ã
*2:VMåä½æã¯ãªãã ããã ã§ããªãæéããããã®ã§ï¼30åã¯ããããªãã¨ãããã¾ããâ¦ï¼
*3:ç¹ã«ç¾å¨ã®vmãvm-4ãªã©ãªã£ã¦ããã®ã«ãã¨ãã£ã¿ã¯vm-3ãªã©ã«ã¤ãªããã¨ãã¦ããã£ã½ãæãªã©
*4:ç§ã¯æ©é(?)ä¸åVMã®ãã¡ã¤ã«ã·ã¹ãã ãå£ããäºãããã¾ã
*5:ãã©ã¦ã¶ã«ãã£ã¦ã¯å¯¾å¿ãã¦ãã¾ãããChromeãFirefoxã®ææ°çãã¤ããã¾ããã
*6:sshã¨ãããã·ã§ã«ã ãã©ãããã®ä½ç½®ã«ãããçãªæå³ã§