# rpm -qa | grep subversion
# yum install subversion
# yum install mod_dav_svn
# mkdir /home/svn/Project
# svnadmin create --fs-type fsfs /home/svn/Project
# cd /home/svn/Project
# cd conf
# vi svnserve.conf
--------------------------------------------------------
anon-access = none # 비인증계정은 권한이 없음
auth-access = write # 인증계정을 가진 사람만 쓰기 허용
password-db = passwd # 비밀번호 사용
realm = Project repository # Repository명 지정
:wq
# vi passwd
--------------------------------------------------------
[users]
user01 = user01 # account = password
user02 = user02
:wq
-- 서버시작 (기본포트 : 3690/svn)
# svnserve -d -r /home/svn/Project
# svnserve -d -r /home/svn/Project/ --listen-port 443 <-- 기본포트를 https로 변경
-- 포트확인
netstat -anop | grep 443
netstat -anop | grep svnserve
-- 서버종료
# killall svnserve
-- Service demon 만들기
# cd /etc/sysconfig
# vi svnserve
# OPTIONS is used to pass command-line arguments to svnserve.
#
# Specify the repository location in -r parameter:
OPTIONS="-r /home/svn" <- 최상위 Repository지정 (기본포트 사용 3690)
# service svnserve stop
# service svnserve start
# netstat -anop | grep svnserve
# ps -ef | grep svnserve
root 21218 1 0 19:40 ? 00:00:00 /usr/bin/svnserve --daemon --pid-file=/run/svnserve/svnserve.pid -r /home/svn
-- 부팅시 svnserve 서비스를 자동시작
# chkconfig --list svnserve
svnserve 0:off 1:off 2:off 3:off 4:off 5:off 6:off
# chkconfig svnserve on
# chkconfig --list svnserve
svnserve 0:off 1:off 2:on 3:on 4:on 5:on 6:off
-- 확인
# svn checkout svn://127.0.0.1/Project
Authentication realm: <svn://127.0.0.1:3690> Project repository
Password for 'root':
Authentication realm: <svn://127.0.0.1:3690> Project repository
Username: user01
Password for 'user01':
-----------------------------------------------------------------------
ATTENTION! Your password for authentication realm:
<svn://127.0.0.1:3690> Project repository
can only be stored to disk unencrypted! You are advised to configure
your system so that Subversion can store passwords encrypted, if
possible. See the documentation for details.
You can avoid future appearances of this warning by setting the value
of the 'store-plaintext-passwords' option to either 'yes' or 'no' in
'/root/.subversion/servers'.
-----------------------------------------------------------------------
Store password unencrypted (yes/no)? yes
Checked out revision 2.
-- cache에 남아 있는 비번 clear
# rm -rf ~/.subversion/auth/svn.simple/*
-- trunk, tags, branches Directory 만들기
# svn mkdir svn://127.0.0.1/Project/trunk
-- 만들수 없다는 메시지 발생시
# vi /root/.bash_profile
-------------------------------------------
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
# 이하추가
SVN_EDITOR=/usr/bin/vim
export SVN_EDITOR
:wq!
-------------------------------------------
# source .bash_profile
# svn mkdir svn://127.0.0.1/Project/trunk
:wq!
c 입력
# svn mkdir svn://127.0.0.1/Project/tags
:wq!
c 입력
# svn mkdir svn://127.0.0.1/Project/branches
:wq!
c 입력
-- 결과확인
# svn list svn://127.0.0.1/Project
branches/
tags/
trunk/
-- 기존 Repository에서 export -> import
-- HGPS Repository와 똑같은 HGPS_PRD Repository 만든후 passwd, svnserve.conf까지 설정후 아래 명령 실행
svn export svn://127.0.0.1/HGPS ./export
svn import --no-auto-props --no-ignore -m "Message" ./export svn://127.0.0.1/HGPS_PRD
rm -rf export/
Subversion 설치
|
2016.10.08 19:03:29
|
2021.04.17 23:44:32
|
505
|
Aiden
Total of Attached file
0.00 Bytes of 0 files
2017.01.04
2016.12.06
2016.11.30
2016.11.17
2016.10.08
2016.10.08
2016.10.08
2016.07.06
2014.05.16
2011.02.25
2010.11.03