Sunday, January 17, 2016

svn 설정

bitnami로 레드마인을 설치하게 되면 아래 경로에 svn 폴더가 설치된다.
/home/{user}/redmineplusagile-3.2.0-1/subversion
아래 경로를 이동한다
cd /home/{user}/redmineplusagile-3.2.0-1/subversion/bin

svn 시작

cd /home/{user}/redmineplusagile-3.2.0-1/subversion/scripts
./ctl.sh start

svn 종료

cd /home/{user}/redmineplusagile-3.2.0-1/subversion/scripts
./ctl.sh stop

프로젝트 생성하기

svnadmin create /home/{user}/redmineplusagile-3.2.0-1/subversion/snv/{폴더이름}

svn 폴더 설정하기

cd /home/{user}/redmineplusagile-3.2.0-1/subversion/svn/test/conf
vi svnserve.conf
[general]
anon-access = none -> 익명의 사용자 접근 금지
anon-access = read
auth-access = write
password-db = passwd

사용자 추가 하기

[users]
user1= 111
user2 = 222
user3 = 333

권한 상세 설정하기

권한에는 groups을 지정해주어야 하며
경로에 따른 그룹이나 사용자의 권한을 지정해주면 됩니다.
그룹을 지정하고 하는 경우는 앞에 @를 추가하며
사용자의 경우는
svnserve.conf 여기의 파일에 # authz-db = authz 주석을 푼다
[groups]
allaccess = user1, user2
someaccess = user3
[/]
@allaccess = rw
[hello:/view]
@someaccess = r
  • = r
example
# User defined in group
[groups]
admin = boss, sysadmin
phpteam = php1, php2, php3
rubyteam = ruby1, ruby2

# SVN root should only be access by boss and system admin
[/]
@admin = rw
* =

# Main web repository should only be access by boss and system admin, others cannot read/write at all
# By specifying svn path, we need to list which user/group who can and cannot access
[/web]
@admin = rw
* =

# PHP project repository can only be access by php developer, boss and sys admin
# By specifying svnrep: directive, we just need to list which user/group who can access
# Others will automatically rejected
[svnrep:/web/php]
@phpteam = rw
@admin = rw

# Ruby project repository can only be access by Ruby developer, boss and sys admin
# By specifying svnrep: directive, we just need to list which user/group who can access
# Others will automatically rejected
[svnrep:/web/ruby]
@rubyteam = rw
@admin = rw

No comments:

Post a Comment