svn (Subversion)

Published by onesixx on

개요

–  open source version control system
–  keep track of a collection of files and folders.

Installation

https://help.ubuntu.com/lts/serverguide/subversion.html.en
https://tecadmin.net/install-subversion-server-on-ubuntu/   Written by Rahul K.
sudo apt install subversion 

To access Subversion repository using the HTTP protocol,

sudo apt install libsvn-dev libapache2-svn libapache2-mod-svn  

Using Apache

install apache

sudo apt-get install apache2

enable module

enable required Apache modules and restart Apache service.

sudo a2enmod dav
sudo a2enmod dav_svn
sudo service apache2 restart

Configure Apache with Subversion

Subversion Apache module package creates an configuration file /etc/apache2/mods-enabled/dav_svn.conf.
You just need to make necessary changes to it.

Alias /svn /var/lib/svn
<Location /svn>
   DAV svn
   SVNParentPath /var/lib/svn

   AuthType Basic
   AuthName "Subversion Repository"
   AuthUserFile /etc/apache2/dav_svn.passwd
   Require valid-user
</Location>

Server Configuration

Create Repository

sudo svnadmin create /svnhome/repo_config

설정파일

/snvhome/repo_config/conf$ ls
 authz*
 hooks-env.tmpl*
 passwd*
 svnserve.conf*

authz

/svnhome/repo_config/conf$ sudo vi authz
[aliases]

[groups]

[/]
sixx = rw

passwd

/svnhome/repo_config/conf$ sudo vi passwd
[users]
sixx = pwpw
[users]
sixx = pwpw

svnserve.conf

Access Methods  (via custom protocol (svn://))

/svnhome/repo_config$ sudo vi svnserve.conf
[general]
anon-access = none
password-db = passwd
authz-db = authz
realm = My First Repository

[sasl]

실행

준비

sudo mkdir -p /svnhome
sudo svnadmin create /svnhome/repo_config/
sudo chmod -R 775 /svnhome
sudo mkdir -p /svnhome
sudo svnadmin create /svnhome/repo_config/
sudo chmod -R 775 /svnhome

Start svn daemon

svnserve –daemon –root /svnhome/repo_config/

svnserve -d -r /svnhome/repo_config/

특정 Port로시작

svnserve -d -r /svnhome/repo_config/ --listen-port 3690

port 확인 (default port : 3690)

netstat -anp | grep svnserve
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 0.0.0.0:3690            0.0.0.0:*               LISTEN      3732/svnserve

Check svn daemon

ps -ef |grep svnserve
ps aux | grep svn

Importing Files (맨처음 한번 넣기)

svn import /svnhome/project01 file:///home/sixx/project

Checkout repository (맨처음 한번 가져오기, Client)

/svnhome/project01/ 폴더를 Repository로 사용

svnhome/project01/>  svn checkout svn://192.168.6.6 --username sixx --password pwpw
-----------------------------------------------------------------------
ATTENTION! Your password for authentication realm:

<svn://192.168.6.6:3690> My First 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
'/home/sixx/.subversion/servers'.
-----------------------------------------------------------------------
Store password unencrypted (yes/no)? yes
test.R
Checked out revision 1.

Update repository

/svnhome/project01/> svn update
/svnhome/project01/> svn update --username sixx --password pwpw

개요

–  open source version control system
–  keep track of a collection of files and folders.

Installation

https://help.ubuntu.com/lts/serverguide/subversion.html.en
https://tecadmin.net/install-subversion-server-on-ubuntu/   Written by Rahul K.
sudo apt install subversion 

To access Subversion repository using the HTTP protocol,

sudo apt install libsvn-dev libapache2-svn libapache2-mod-svn  

Using Apache

install apache

sudo apt-get install apache2

enable module

enable required Apache modules and restart Apache service.

sudo a2enmod dav
sudo a2enmod dav_svn
sudo service apache2 restart

Configure Apache with Subversion

Subversion Apache module package creates an configuration file /etc/apache2/mods-enabled/dav_svn.conf.
You just need to make necessary changes to it.

Alias /svn /var/lib/svn
<Location /svn>
   DAV svn
   SVNParentPath /var/lib/svn

   AuthType Basic
   AuthName "Subversion Repository"
   AuthUserFile /etc/apache2/dav_svn.passwd
   Require valid-user
</Location>

Server Configuration

Create Repository

sudo svnadmin create /svnhome/repo_config

설정파일

/snvhome/repo_config/conf$ ls
 authz*
 hooks-env.tmpl*
 passwd*
 svnserve.conf*

authz

/svnhome/repo_config/conf$ sudo vi authz
[aliases]

[groups]

[/]
sixx = rw

passwd

/svnhome/repo_config/conf$ sudo vi passwd
[users]
sixx = pwpw

svnserve.conf

Access Methods  (via custom protocol (svn://))

/svnhome/repo_config$ sudo vi svnserve.conf
[general]
anon-access = none
password-db = passwd
authz-db = authz
realm = My First Repository

[sasl]

실행

준비

sudo mkdir -p /svnhome
sudo svnadmin create /svnhome/repo_config/
sudo chmod -R 775 /svnhome

Start svn daemon

svnserve –daemon –root /svnhome/repo_config/

svnserve -d -r /svnhome/repo_config/

특정 Port로시작

svnserve -d -r /svnhome/repo_config/ --listen-port 3690

port 확인 (default port : 3690)

netstat -anp | grep svnserve
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 0.0.0.0:3690            0.0.0.0:*               LISTEN      3732/svnserve

Check svn daemon

ps -ef |grep svnserve
ps aux | grep svn

Importing Files

svn import /svnhome/project01 file:///home/sixx/project

Checkout repository

/svnhome/project01/ 폴더를 Repository로 사용

/svnhome/project01/>  svn checkout svn://192.168.6.6 --username sixx --password pwpw
-----------------------------------------------------------------------
ATTENTION! Your password for authentication realm:

<svn://192.168.6.6:3690> My First 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
'/home/sixx/.subversion/servers'.
-----------------------------------------------------------------------
Store password unencrypted (yes/no)? yes
test.R
Checked out revision 1.

Update repository

/svnhome/project01/> svn update
/svnhome/project01/> svn update --username sixx --password pwpw

Categories: Pj

onesixx

Blog Owner

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x