CandyCaneããã¼ã«ã«ç°å¢ã«ã¤ã³ã¹ãã¼ã«ãã¦ã¿ã
Redmine - Wikipedia
Redmineã¨ããRuby on Railsã§å®è£
ãããããã¸ã§ã¯ã管çã®ããã®Webã¢ããªã±ã¼ã·ã§ã³ãããããã®CakePHPçãCandyCaneã
ãã£ããåããããããã¸ã§ã¯ãã§ãã¾ãåãããªãã£ãããã«è¦ãããã©ãæè¿æ´æ°ããã£ããããªã®ã§ã試ãã«èªå® ã®Ubuntuãµã¼ãã«ã¤ã³ã¹ãã¼ã«ãã¦ã¿ããLAMPç°å¢ã¯ãã§ã«æ§ç¯æ¸ã¿ã
ç°å¢ã¨ã¤ã³ã¹ãã¼ã«å
è¦ãã¨åããããcandycaneã¯ã³ã¢å梱ã§é å¸ããã¦ãããCakePHPã®ãã¼ã¸ã§ã³ã¯1.2.5ããã®ã¾ã¾ä½¿ã£ãã»ããããã®ãããããªãããåã¯Cakeã®ã³ã¢ã ã"/usr/share"以ä¸ã«è¨ç½®ãã¦ããã®ã§ã1.2ç³»ã®ææ°çã§ãã1.2.10ãå¥ã«ãã¦ã³ãã¼ããã¦ããããå®éã«ä½¿ããµã¼ãã¹ã¨ãã¦ã¤ã³ã¹ãã¼ã«ãããªããã³ã¢ã®ãã¼ã¸ã§ã³ãããããå¤ããå¿ è¦ã¯ãªããã³ã¢å梱ã§é å¸ãã¦ããããã ããä»ã¯å¦ç¿ç¨ã ãããããã§ãã
/usr/share/cakephp$ ls -l åè¨ 8 drwxr-xr-x 5 root root 4096 2011-05-18 08:44 1.2.10 drwxr-xr-x 7 root root 4096 2011-04-05 13:54 1.3.8 /usr/share/cakephp$
ãããã®ãã£ã¬ã¯ããªã«ã¯CakePHPã®ãµã¤ãã§é
å¸ããã¦ããã¢ã¼ã«ã¤ãããã®ã¾ã¾å±éãã¦ããã
CandyCaneã®ã¤ã³ã¹ãã¼ã«å
ã¯ãããªæãã§ã
- App
- /home/username/www/cakephp/candycane
- Webroot
- /home/username/www/public/candycane
ããã¥ã¡ã³ãã«ã¼ãã¯"/home/username/www/public"ãè¨å®ãã¦ããã
OSã¯Ubuntu 10.10ãLAMPç°å¢ã¯"sudo tasksel"ããå°å
¥ãããã®ã§ãphpmyadminã¨ä»ããã¤ãå¿
è¦ã«å¿ãã¦ã¢ã¸ã¥ã¼ã«ãæå¹ã«ãã¦ããã
ãã¦ã³ãã¼ãã»è§£å
リポジトリããææ°çã®tar.gzããã¦ã³ãã¼ãããã
ã¢ã¼ã«ã¤ããå±éããã
~/work$ tar xzvf yandod-candycane-v0.7-14-g1ba868f.tar.gz -C ~/www/cakephp
å±éãã¦ã§ãããã£ã¬ã¯ããªããªãã¼ã ããã
~/work$ cd ~/www/cakephp ~/www/cakephp$ mv yandod-candycane-1ba868f candycane ~/www/cakephp$
Webrootã移åãã¦ã"webroot/index.php"ãç·¨éãã
"webroot"ãã£ã¬ã¯ããªã ããå®éã®ããã¥ã¡ã³ãã«ã¼ã以ä¸ã«ç§»åããã
~/www/cakephp$ cd candycane ~/www/cakephp/candycane$ mv webroot ~/www/public/candycane
"webroot/index.php"ã®ãªãã§ãCakePHPã®ã³ã¢ã¨Appã®å ´æãæå®ãã¦ãããããé ç½®ãå¤ãããç·¨éããå¿ è¦ããããç·¨éãå¿ è¦ãªã®ã¯3ç®æãdefineã§å®ç¾©ãã¦ããå®æ°ã»ROOTã¨APP_DIRã¨CAKE_CORE_INCLUDE_PATHã®3ã¤ã次ã®ããã«æ¸ãæããã
/** * The full path to the directory which holds "app", WITHOUT a trailing DS. * */ if (!defined('ROOT')) { define('ROOT', '/home/username/www/cakephp'); } /** * The actual directory name for the "app". * */ if (!defined('APP_DIR')) { define('APP_DIR', 'candycane'); } /** * The absolute path to the "cake" directory, WITHOUT a trailing DS. * */ if (!defined('CAKE_CORE_INCLUDE_PATH')) { define('CAKE_CORE_INCLUDE_PATH', '/usr/share/cakephp/1.2.10'); }
ä»ã®è¨è¿°ã«å¾ããªããã¹ã©ãã·ã¥(/)ã¯"DS"ã¨ããã»ãããããããããªããåé¡ã¯èµ·ãã¦ããªããã©ãããã§OSã®å·®ç°ãå¸åãã¦ãããã ã£ããã¨ããããããã§ã"http://localhost/candycane/"ã§ã¢ã¯ã»ã¹ã§ããããã«ãªãã
権éãå¤æ´ãã
"http://localhost/candycane/"ã¸ã¢ã¯ã»ã¹ããã¨ã"tmp"ã¨"config"2ã¤ã®ãã£ã¬ã¯ããªã®ãã¼ããã·ã§ã³ã"777"ã«ããããã«æ示ãããã
~/www/cakephp/candycane$ chmod -R o+w tmp config
Apacheã®å®è¡ã¦ã¼ã¶ã¼"www-data"ãã¢ã¯ã»ã¹ã§ããã°ãããã§è¯ãã
ããã§ã¤ã³ã¹ãã¼ã«ãé²ããããããã«ãªãã
å¾ã¯ç»é¢ã®ã¡ãã»ã¼ã¸ã«å¾ã£ã¦é²ãã
CandyCaneã®ããã«ä½¿ãMySQLã®ãã¼ã¿ãã¼ã¹ãç¨æãã¦ãããã¤ã³ã¹ãã¼ã©ã¼ããDBæ¥ç¶æ å ±ãå ¥åããããã«æ±ããããï¼DBåã»ã¦ã¼ã¶ã¼åã»ãã¹ã¯ã¼ãã»ãã¹ãã»ãã¼ãã«ã®æ¥é å¥ï¼ããã®ã¾ã¾é²ãã¦ããã°ã¤ã³ã¹ãã¼ã«ãå®äºãæå¾ã«ã¤ã³ã¹ãã¼ã©ç¨ã®ãã¡ã¤ã«ãåé¤ãããã©ããã確èªããã¡ãã»ã¼ã¸ãåºã¦ãããã©ãå¦ç¿ç¨ã£ã¦ãã¨ãèãããæ®ãã¦ããã¦ãããã©æ¶ãã¦ãã¾ã£ãã