Refer: http://www.if-not-true-then-false.com/2010/install-svn-subversion-server-on-fedora-centos-red-hat-rhel/
1. Install needed packages (mod_dav_svn and subversion)
yum install mod_dav_svn subversion
2. Modify Subversion config file /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>
3. Add SVN (Subversion) users
Use following command:
## Create testuser ##
htpasswd -cm /etc/svn-auth-users testuser
New password:
Re-type new password:
Adding password for user testuser
4. Create and configure SVN repository
mkdir /var/www/svn
cd /var/www/svn
svnadmin create testrepo
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 /var/www/svn/testrepo
## Following enables commits over http ##
chcon -R -t httpd_sys_rw_content_t /var/www/svn/testrepo
5. restart httpd
service httpd restart
6. Goto http://localhost/svn/testrepo address and you should see something like following, write username and password:
7. Configure repository
To disable anonymous access and enable access control add following rows to testrepo/conf/svnserve.conf file:
## Disable anonymous access ##
anon-access = none
## Enable access control ##
authz-db = authz
8. Create trunk, branches and tags structure under testrepo
Create “template” directories with following command:
mkdir -p /tmp/svn-structure-template/{trunk,branches,tags}
9.Then import template to project repository using “svn import” command:
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.
10. Check results on browser and see testrepo revision 1:
11. auto boot with svn
#
#
svnserve -d -r [svn path]
'Etc' 카테고리의 다른 글
TED. 왜 일터에서 일이 제대로 되지 않는가? (0) | 2014.05.07 |
---|---|
Xpenology, virtualbox IP address (0) | 2014.03.12 |
xpenology WebDav window 7 에서 쉽게 졉속 방법: Netdrive를 사용해보자 (0) | 2014.01.14 |
centos gnome (xwindow) 시작프로그램 등록 virtualbox 자동 실행 (0) | 2014.01.14 |
centos xwindow 자동 로그인 (0) | 2014.01.14 |