- svn 설치
yum install mod_dav_svn subversion -y
service httpd restart
chkconfig httpd on
- svn - apache 연동 설정
vi /etc/httpd/conf.d/subversion.conf
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
<Location /svn>
DAV svn
SVNParentPath /var/www/svn
AuthType Basic
AuthName "Subversion repositories"
AuthUserFile /etc/svn-auth-users
Require valid-user
</Location>
- svn 사용자 생성
## Create testuser ##
htpasswd -cm /etc/svn-auth-users testuser
New password:
Re-type new password:
Adding password for user testuser
## Create testuser2 ##
htpasswd -m /etc/svn-auth-users testuser2
New password:
Re-type new password:
Adding password for user testuser2
- svn repo create
mkdir /home/svn
cd /home/svn
svnadmin create restrepo
chown -R apache.apache testrepo
# If you have SELinux enabled (you can check it with "sestatus" command) ##
## then change SELinux security context with chcon command ##
chcon -R -t httpd_sys_content_t /home/svn/testrepo
## Following enables commits over http ##
chcon -R -t httpd_sys_rw_content_t /home/svn/testrepo
- apache restart
/etc/init.d/httpd restart
or
service httpd restart
- 접속
http://localhost/svn/testrepo
- config repo
testrepo/conf/svnserve.conf
anon-access = none
authz-db = authz
- create trunk, branches, tags
mkdir -p /tmp/svn-structure-template/{trunk,branches,tags}
svn import -m 'Initial import' /tmp/svn-structure-template/ http://localhost/svn/testrepo/
Adding /tmp/svn-structure-template/trunk
Adding /tmp/svn-structure-template/branches
Adding /tmp/svn-structure-template/tags
Committed revision 1.