본문 바로가기

OS의 속삭임/Linux의 외침

[OS][LINUX][subversion]SVN 설치 및 설정

-------------------------------------------

-- SVN 설치 

-------------------------------------------

1. yum 을 사용한 설치

[root@localhost Desktop]# yum install svn

Loaded plugins: fastestmirror, refresh-packagekit, security

Loading mirror speeds from cached hostfile

 * base: www.ftp.ne.jp

 * extras: ftp.riken.jp

 * updates: www.ftp.ne.jp

base                                                     | 3.7 kB     00:00     

extras                                                   | 3.5 kB     00:00     

updates                                                  | 3.4 kB     00:00     

updates/primary_db                                       | 2.6 MB     00:01     

Setting up Install Process

Resolving Dependencies

--> Running transaction check

---> Package subversion.x86_64 0:1.6.11-7.el6 will be updated

---> Package subversion.x86_64 0:1.6.11-9.el6_4 will be an update

--> Finished Dependency Resolution


Dependencies Resolved


================================================================================

 Package            Arch           Version                Repository       Size

================================================================================

Updating:

 subversion         x86_64         1.6.11-9.el6_4         updates         2.3 M


Transaction Summary

================================================================================

Upgrade       1 Package(s)


Total download size: 2.3 M

Is this ok [y/N]: yes

Downloading Packages:

subversion-1.6.11-9.el6_4.x86_64.rpm                     | 2.3 MB     00:00     

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

  Updating   : subversion-1.6.11-9.el6_4.x86_64                             1/2 

  Cleanup    : subversion-1.6.11-7.el6.x86_64                               2/2 

  Verifying  : subversion-1.6.11-9.el6_4.x86_64                             1/2 

  Verifying  : subversion-1.6.11-7.el6.x86_64                               2/2 


Updated:

  subversion.x86_64 0:1.6.11-9.el6_4                                            


Complete!



2. rpm을 이용한 설치 

- 의존성 문제가 있으므로 의존성 패키지또한 미리 준비 해야 된다. 의존성 패키지는 다음과 같다.

- neonapr, db4apr-util

rpm -ivh subversion-1.5.X-X.rpm


3. svn 유저 계정 생성


[root@localhost Desktop]# adduser svn

[root@localhost Desktop]# passwd svn

[root@localhost Desktop]# svnadmin create --fs-type fsfs /home/svn/repo/sample_project

[root@localhost Desktop]# chown -R svn:svn /home/svn/repo

[root@localhost Desktop]# su - svn

[svn@localhost ~]$ vi /home/svn/repo/sample_project/conf/svnserve.conf 

# 익명 사용자 권한 (write, read, none)

anon-access = read

# 인증 사용자 권한

auth-access = write

# 인증 패스워드 설정 파일

password-db = passwd

[svn@localhost ~]$ vi /home/svn/repo/sample_project/conf/passwd

username = passwd

[svn@localhost ~]$ svnserve -d -r /home/svn

[svn@localhost ~]$ ps aux | grep svnserv

svn      29223  0.0  0.0 156908   752 ?        Ss   18:16   0:00 svnserve -d -r /home/svn

svn      29239  0.0  0.0 103244   832 pts/0    S+   18:19   0:00 grep svnserv


[svn@localhost ~]$ vi .bash_profile

#SNV 환경변수 설정

SVN_EDITOR=/usr/bin/vim

export SVN_EDITOR

[svn@localhost ~]$ source ~/.bash_profile


[svn@localhost ~]$ svn mkdir svn://127.0.0.1/repo/sample_project/trunk


Log message unchanged or not specified

(a)bort, (c)ontinue, (e)dit:

c

Authentication realm: <svn://127.0.0.1:3690> 92a9475c-f642-479a-8758-a51633c7813f

Password for 'svn': 

Authentication realm: <svn://127.0.0.1:3690> 92a9475c-f642-479a-8758-a51633c7813f

Username: hongil

Password for 'hongil': 


-----------------------------------------------------------------------

ATTENTION!  Your password for authentication realm:


   <svn://127.0.0.1:3690> 92a9475c-f642-479a-8758-a51633c7813f


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

'/home/svn/.subversion/servers'.

-----------------------------------------------------------------------

Store password unencrypted (yes/no)? yes


Committed revision 1.


[svn@localhost ~]$ svn mkdir svn://127.0.0.1/repo/sample_project/tage


Log message unchanged or not specified

(a)bort, (c)ontinue, (e)dit:

c


Committed revision 2.

[svn@localhost ~]$ svn mkdir svn://127.0.0.1/repo/sample_project/branches


Log message unchanged or not specified

(a)bort, (c)ontinue, (e)dit:

c


Committed revision 3.