Apache 㨠SVN 飿ºã®çºã«
http://d.hatena.ne.jp/seiunsky/20080212/1202832078ã®ç¶ã
mod_dav_svn ã¢ã¸ã¥ã¼ã«ãã¤ã³ã¹ãã¼ã«ãããã
Mac ã®å ´åã port ã§ã¤ã³ã¹ãã¼ã«ããã®ãçéã®ããã ã
Macintosh% sudo port install subversion +mod_dav_svn Password: ---> Building sqlite3 with target all Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_sqlite3/work/sqlite-3.5.6" && gnumake all " returned error 1 Command output: sh: line 0: cd: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_sqlite3/work/sqlite-3.5.6: No such file or directory Error: The following dependencies failed to build: apache2 apr-util sqlite3 pcre neon Error: Status 1 encountered during processing.
ã¨ã©ã¼ãã§ããã¨ãããããããã subversion 㯠port çµç±ã§ã¤ã³ã¹ãã¼ã«ãã¦ããããã§ã¯ç¡ãã£ã模æ§ã
確èªããã¨ãããsubversion ã¯ç¡ãã
Macintosh% sudo port installed The following ports are currently installed: apr @1.2.12_0+darwin_9 (active) clearsilver @0.10.5_0 (active) db44 @4.4.20_1 (active) expat @2.0.1_0 (active) gauche @0.8.12_0 (active) gawk @3.1.6_0 (active) gdbm @1.8.3_1 (active) gettext @0.17_3 (active) libiconv @1.12_0 (active) ncurses @5.6_0 (active) ncursesw @5.6_1 (active) openssl @0.9.8g_0 (active) perl5.8 @5.8.8_1 (active) py25-hashlib @2.5.1_0 (active) python25 @2.5.1_4+darwin_9 (active) readline @5.2.007_0+darwin_9 (active) slib @3a3_0 (active) wget @1.10.2_0 (active) zlib @1.2.3_1 (active)
ãããã§èª¿ã¹ãã¨ã¿ããªå½ç¶ã®ããã« port ããå
¥ãã¦ãããã©ãããã¯ã©ãããããããã ã
ä»ã¤ã³ã¹ãã¼ã«ããã¦ãã subversion ã¨éè¤ãããã©ãã¨ããããã¤ã³ã¹ãã¼ã«ã試ã¿ãã
Macintosh% sudo port clean subversion ---> Cleaning subversion Macintosh% sudo port install subversion ---> Building sqlite3 with target all Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_sqlite3/work/sqlite-3.5.6" && gnumake all " returned error 1 Command output: sh: line 0: cd: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_sqlite3/work/sqlite-3.5.6: No such file or directory Error: The following dependencies failed to build: apr-util sqlite3 neon Error: Status 1 encountered during processing.
ã ãã½ãè²ã
è¶³ããªãã¨è¨ã£ã¦ããããç¹ã« sqlite3 ã§ããã¦ããï¼
sqlite3 ãã¤ã³ã¹ãã¼ã«ãã¦ã¿ãã
Macintosh% sudo port install sqlite3 ---> Building sqlite3 with target all Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_sqlite3/work/sqlite-3.5.6" && gnumake all " returned error 1 Command output: sh: line 0: cd: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_sqlite3/work/sqlite-3.5.6: No such file or directory Error: Status 1 encountered during processing.
sqlite3 ãåå¨ããªãã¨è¨ã£ã¦ããï¼ããåãèªåã§ãã¡ã¤ã«ã¨ãã«ãã£ã¦ãããããã¼ã®ããã»ã»ã»ã
試ãã«ãã¯ãªã¼ã³ãã¦ãããã©ã¤ãã¦ã¿ããã
Macintosh% sudo port clean sqlite3 ---> Cleaning sqlite3
ã¯ãªã¼ã³ããã®ã§å度å®è¡ã
Macintosh% sudo port install sqlite3 ---> Fetching sqlite3 ---> Attempting to fetch sqlite-3.5.6.tar.gz from http://www.sqlite.org/ ---> Verifying checksum(s) for sqlite3 ---> Extracting sqlite3 ---> Applying patches to sqlite3 ---> Configuring sqlite3 ---> Building sqlite3 with target all ---> Staging sqlite3 into destroot ---> Installing sqlite3 3.5.6_0 ---> Activating sqlite3 3.5.6_0 ---> Cleaning sqlite3
ããã¤ã³ã¹ãã¼ã«ã§ããã£ã½ãã確èªãã¦ã¿ãã
Macintosh% sudo port installed The following ports are currently installed: apr @1.2.12_0+darwin_9 (active) clearsilver @0.10.5_0 (active) db44 @4.4.20_1 (active) expat @2.0.1_0 (active) gauche @0.8.12_0 (active) gawk @3.1.6_0 (active) gdbm @1.8.3_1 (active) gettext @0.17_3 (active) libiconv @1.12_0 (active) ncurses @5.6_0 (active) ncursesw @5.6_1 (active) openssl @0.9.8g_0 (active) perl5.8 @5.8.8_1 (active) py25-hashlib @2.5.1_0 (active) python25 @2.5.1_4+darwin_9 (active) readline @5.2.007_0+darwin_9 (active) slib @3a3_0 (active) sqlite3 @3.5.6_0 (active) wget @1.10.2_0 (active) zlib @1.2.3_1 (active)
ã©ãããã¤ã³ã¹ãã¼ã«ã§ããããã ãããä¸åº¦ subversion ã試ãã¦ã¿ãã
æ¢åã® svn ã¨ã®çµ¡ã¿ãæ°ã«ãªãããããã¯ç½®ãã¦ããã¦ãæ¬é¡ã® mod_dav_svn ã®ã¤ã³ã¹ãã¼ã«ã
å®ã¯ããã®æã« subversion ãã¤ã³ã¹ãã¼ã«ãããã®å¾ subversion +mod_dav_svn ãã¤ã³ã¹ãã¼ã«ããã¨ããæé ãè¡ã£ãã®ã ããããã 㨠subversion ãï¼éã«ã¤ã³ã¹ãã¼ã«ãããäºæ
ã«ãªããããããªã®ã§ãä¸åº¦ subversion ã port -u uninstall subversion @1.4.6_0ï¼ãã¼ã¸ã§ã³ãæå®ããå¿
è¦ããããããï¼ã¨ãã¦ã subversion ãæ¶ããç¶æ
ã§å度試ããã
Macintosh% sudo port install subversion +mod_dav_svn ---> Installing subversion 1.4.6_0+mod_dav_svn ---> Activating subversion 1.4.6_0+mod_dav_svn ---> Cleaning subversion
ã¾ããä¸è¨ã§ä¸åº¦ mod_dav_svn ãã¤ã³ã¹ãã¼ã«ãã¦å¤±æããã¨æ¸ãããããã®ã¨ãã« apache2 ããé¢é£ãããã¼ã«ã®ã¤ã³ã¹ãã¼ã«ãè¡ãããã
Macintosh% sudo port installed The following ports are currently installed: apache2 @2.2.8_0+darwin_9 (active) apr @1.2.12_0+darwin_9 (active) apr-util @1.2.12_0 (active) clearsilver @0.10.5_0 (active) db44 @4.4.20_1 (active) expat @2.0.1_0 (active) gauche @0.8.12_0 (active) gawk @3.1.6_0 (active) gdbm @1.8.3_1 (active) gettext @0.17_3 (active) libiconv @1.12_0 (active) ncurses @5.6_0 (active) ncursesw @5.6_1 (active) neon @0.26.4_0 (active) openssl @0.9.8g_0 (active) pcre @7.6_0 (active) perl5.8 @5.8.8_1 (active) py25-hashlib @2.5.1_0 (active) python25 @2.5.1_4+darwin_9 (active) readline @5.2.007_0+darwin_9 (active) slib @3a3_0 (active) sqlite3 @3.5.6_0 (active) subversion @1.4.6_0+mod_dav_svn (active) wget @1.10.2_0 (active) zlib @1.2.3_1 (active)
ã§ãåé¡ãªã®ã¯ svn ã apache2 ãç¾å¨ä½¿ã£ã¦ãããã®ããæ°ããæ¹ã¸åãæ¿ããªãã¨è¡ããªãã¨ãããã¨ã ããã
ãã¼ããMac ã®ãããè¾ºã®æµåã£ã¦ã©ããªãã ï¼
å人çã«ã¯å
ã
å
¥ã£ã¦ãããã®ã¯æ£è¦ã®ææ®µã§åé¤ãã¦ã MacPorts ã§å
¥ãããã®ã ããã¤ã³ã¹ãã¼ã«ããã¦ããç¶æ³ã«ãããã®ã ããã©ã
ã²ã¨ã¾ããã¤ã³ã¹ãã¼ã«ããã subversion ã«ãã¹ãéã£ã¦ããªãäºã¨ãã¼ã¸ã§ã³ã確èªãã¦ã¿ãã
Macintosh% svn --version --quiet 1.4.4 Macintosh% /opt/local/bin/svn --version --quiet 1.4.6
ãã¯ããã¹ã®éã£ã¦ããæ¹ã¯å
ã
ã¤ã³ã¹ãã¼ã«ããã¦ããæ¹ã ã
ä¸å¿ãMacPorts ã§ã¤ã³ã¹ãã¼ã«ããããã¼ã«ã¯ /opt/local/ é
ä¸ã«ãã£ã¦ããã¹ã¯ãã¡ããåªå
ããããã«è¨å®ãã¦ããã¯ããªã®ã§ãå¤å大ä¸å¤«ã ã¨æããã ãã»ã»ã»ã
ç°å¢ã®ç§»æ¤
apache 㯠/opt/local/apache2 é
ä¸ã«å®è¡ãã¡ã¤ã«ã conf ãã¡ã¤ã«ãåºã¾ã£ã¦ããã®ã§ã以å使ãã conf ããã¡ãã¸ã³ãã¼ããã
ããããinstall ããã°ããã® apache2 ã«ã¯ mod_fastcgi ãå
¥ã£ã¦ããªãã£ãã®ã§ããããã¤ã³ã¹ãã¼ã«ããï¼mod_python ãå
¥ãã¦ãã¾ãæããããã ãã©ããªãã使ããã¼ã¸ã§ã³ã 2.4 ç³»ã ã£ãã®ã§å¤ã«ããã£ããå«ãªã®ã§è¾ãã¦ãããï¼ã
sudo port install mod_fastcgi
ã¤ã³ã¹ãã¼ã«ãããã¨ã modules é
ä¸ã«åæã«ã¤ã³ã¹ãã¼ã«ãããã®ã§ãä»ã®ã¢ã¸ã¥ã¼ã«ã¨åããããªãã¹ã§è¿½è¨ãã¦ãããã°OKã
ãã¨ã¯ dav_svn ã®è¨å®ãããã°è¯ãã¨æãã®ã ãã©ãæéãå³ãããªã£ã¦ããã®ã§ã¾ããããã
â»ä¸å¿è¨å®ã¯ãããã®ã®ã http çµç±ã§ã¢ã¯ã»ã¹ãã㨠Could not open the requested SVN filesystemã¨æã£ããã§ããã®ã§æ¸ãã¦ããã
ã¨ããã¨ã©ã¼ãåºã¦ããããªãã¸ããªèªä½ã svn 1.4.6 ç¨ã«ã¢ããã°ã¬ã¼ãããå¿
è¦ããããããããªã*1ã
ãªãã¸ããªã®ãã¹ã¯ä»¥ä¸ã®ããã«ãªã£ã¦ãããã¨ãæ³å®ã㦠svn ç¨ã® apache ã® conf ãè¨è¼ããã
/var/svn/project
ãã® project é
ä¸ã« svn ç¨ã®ãã¡ã¤ã«ãå
¥ã£ã¦ããã¨ãã¦ãã ããã
httpd-trac.conf ã«ä»¥ä¸ã追è¨ããã
### svn ### <Location /svn> DAV svn SVNParentPath /var/svn # SVNPath /var/svn/project AuthType Basic AuthName "svn authoriztion" AuthUserFile /www/trac/conf/.htpasswd Require valid-user </Location>
SVNParentPath /var/svn ã¨ãããã¨ã§è¤æ°ããã¸ã§ã¯ãåãï¼ãªãã¸ããªè¤æ°åãï¼ã®è¨å®ã«ã§ããã
URLã¯ä»¥ä¸ã®ããã«ãªãã
http://localhost/svn/project/
SVNPath ã§æå®ããã¨ã http://localhost/svn/ ã®ä¸ã¯ãããªã trunk çã svn ä¸ã®ãã£ã¬ã¯ããªæ§æã«ãªãã
ããã§ãã¹ã¦ç°å¢ãæ´ã£ãã¯ãã
é·ãã£ããããã¡ãã¨ç°å¢ãæ§ç¯ã§ãã¦ã¨ã¦ãæ¸
ã
ããã
ä¸å¹´åã« Linux ã«æ§ç¯ãããã¨ãã¦ããã®ãæãåºãã¨ãä½ãæé·ãã¦ããªãããã§çµ¶æãã¾ããï¼(^o^)ï¼¼
*1:file:///ã§ã¢ã¯ã»ã¹ããåã«ã¯å¤§ä¸å¤«ãªãã ãã»ã»ã»