Subversionç°å¢ãCentOSã§æ§ç¯
CentOSのインストールããããã¯ã¼ã¯è¨å®ãåºæ¥ãæã§ããããããSubversionã®è¨å®ã§ãã
â»è¨å®ã«ãããããã¡ãã®ãµã¤ããåèã«ããã¦é ãã¾ãããã¨ãããç¼ãã¾ãã®å 容ã«ãªãã¾ãããèªåãªãã«ã¤ã¾ã¥ããæãããã®ã§ã¨ã«ããã¡ã¢ã§ãã
ããã±ã¼ã¸ã®ã¤ã³ã¹ãã¼ã«
è¨å®ã«å¿ è¦ãªããã±ã¼ã¸ã¯ä»¥ä¸ã«ãªãã¾ãã
Apache Web Server(httpd) | Webãµã¼ãã½ãã |
Subversion | ãã¼ã¸ã§ã³ç®¡çã·ã¹ãã |
mod_dav_svn | Subversionãªãã¸ããªãæä¾ãããApacheè¨å®ãã£ã¬ã¯ãã£ã*1 |
# yum -y install httpd subversion mod_dav_svn
ãªãã¸ããªä½æ
ãªãã¸ããªã®ä½æã¨ãSubversionã®æ±ºã¾ãã¨ããããåæãã©ã«ããä½æãã¾ãã
trunk | éçºã®æ¬æµ |
tags | ç¹å®ã®ããªã¼ã®ã¹ãããã·ã§ãã |
branches | æ¬æµã¨ã¯ç°ãªãæ´æ°ãããæ¯æµ |
ã¨ããã®ãä¸è¬çã®ããã§ãããSubversionã®æ¬å®¶ã§ã¯ãbranchesã§éçºãé²ããOKã¨ãªã£ããã®ãtrunkã«æ¾ãè¾¼ãã¨ãããããªä½¿ãæ¹ããã¦ãã模æ§ã§ããå¤åã
å人ãè²ã
試ãã¦ãããããªç°å¢ã ã¨ããããã®ãããã®ããªã¼ããã®è¾ºãã¯èæ
®ãã¦ããããã§ãã
/var/www/svnã§ãsvnãªãã¸ããªç®¡çãã©ã«ããä½æããããã«sampleãªãã¸ããªãä½æã
"svn mkdir"ã§subversionã®åææ§æãä½æããå¾ã«ã"chown"ã§ç·¨é権éãä¸ãã¾ãã
# mkdir /var/www/svnãâsvnãªãã¸ããªè¨ç½®å ´æãä½æ # svnadmin create /var/www/svn/sampleãâãªãã¸ããªä½æ # svn mkdir file:///var/www/svn/sample/trunk \ âãã®è¡ãå«ã以ä¸ï¼è¡ã§ãã£ã¬ã¯ããªãä½æã # file:///var/www/svn/sample/tags \ # file:///var/www/svn/sample/branches \ # -m 'Initial import.' â''å ãã³ãããæã®ãã°ã¨ãã¦æ®ãããã«ãªãã # chown -R apache:apache /var/www/svnãâç·¨é権éãè¨å®
èªè¨¼ãã¡ã¤ã«ã®ä½æ
ä»åã¯ãBasic èªè¨¼*2ãè¡ãã®ã§ãèªè¨¼ç¨ã®ãã¡ã¤ã«ãä½æãã¾ãã
# htpasswd -c /etc/httpd/.htpasswd {USERNAME1}*3
å®è¡ããã¨ä»¥ä¸ã®ããã«ããã¹ã¯ã¼ãã®å ¥åãæ±ãããã¾ãã®ã§ããã¹ã¯ã¼ãã決å®ãã¦ä¸ããã
# New password:pass123 # Re-type new password:pass123 # Adding password for user mario
ããã§ãmarioã¨ããIDã§ããã¹ã¯ã¼ããpass123ã¨ããã¦ã¼ã¶ãä½æã§ãã¾ããã
ã¦ã¼ã¶ä½ææã® -c ãå¤ãã¦å®è¡ããã¨ãã¦ã¼ã¶ã追å ãããã¨ãã§ãã¾ãã(-c ãä»ããã¨åä½æãããå
ã®ãæ¶ãã¾ãã)
Subversionè¨å®ãã¡ã¤ã«ã®ç·¨é
次ã«ãSubversionã®è¨å®ãã¡ã¤ã«ãç·¨éãã¦ããã¾ãã
# vi /etc/httpd/conf.d/subversion.conf
è¨å®ãã¡ã¤ã«ãéãããã以ä¸ã®ããã«ç·¨éãã¦ãã ããã
ãDAV svn ãSVNParentPath /var/www/svn #ã #ãããSSLRequireSSL ãããAuthType Basic ãããAuthName "Authorization" ãããAuthUserFile /etc/httpd/.htpasswd ãããRequire valid-user #ã
Apache ã®åèµ·å
è¨å®ãçµäºããããApacheãåèµ·åãã¾ãã
# /etc/init.d/httpd start
åä½ç¢ºèª
å¥PCããããã©ã¦ã¶ã§ä¸è¨ã®ã¢ãã¬ã¹ãéããèªè¨¼ç»é¢ã表示ããã¾ãã®ã§ãIDã¨ãã¹ã¯ã¼ããå ¥åå¾ã«èªè¨¼ï¼¯ï¼«ã¨ãªãããªãã¸ããªå ãè¦ããç¶æ ã ã¨ï¼¯ï¼«ã§ãã
http://{servername}/repos/sample/
ããã®"repos"ããsubversionè¨å®ãã¡ã¤ã«ã®ã
ä¸åº¦æé ãç解ããã¨ãcentosのインストールããã30åãããã§ãCentOSã«ããSubversionç°å¢ãä½æã§ãã¡ããã¾ããå¤é¨ã«å
¬éãã¦äºã
ã¨ãªãã¨ãããã§ã¯ãã¡ã§ããããããã¼ã«ã«ã§ä½¿ãã«ã¯ããã§ååã ã¨æãã¾ããå®éã«ä¸çªæéããããã®ã¯ãã¤ã¡ã¼ã¸ãã¡ã¤ã«ã®ãã¦ã³ãã¼ãããï¼ç¬ï¼
ã¾ãããããåèã«ããã¦é ãããµã¤ããå«ãã¦ãå
人éãã¡ã¢ãæ®ãã¦ããã¦ããããã§ãããæè¬ã
é¢é£è¨äº
*1:æ示ãã¡ã¤ã«ãã¾ããè¨å®ãã¡ã¤ã«ã§ããã
*2:IDã¨ãã¹ã¯ã¼ãã«ããèªè¨¼ã§ãã
*3:htpasswd -c /etc/httpd/.htpasswd mario ã¨ãã風ã«å ¥åãã¾ãã
*4:ããã¯ç¥ã£ã¦ãã®ã«å¿ãã¦ã¦ãå¤ãä¸è´ãã¦ãããã«å ¨ç¶ã¤ãªãããªãã»ã»ã»ã¨ãããã¾ããï¼ç¬ï¼