id: 12386    nodeId: 12386    type: General    point: 139.0    linkPoint: 1.0    maker: cella    permission: linkable    made at: 2017.11.12 04:13    edited at: 2017.12.14 10:56
SVN on Ubuntu
Ubuntu help page
https://help.ubuntu.com/community/Subversion
A good introduction: but I chose to use /home/svn and it will spare complex group settings.

And there is a link to an init script svnserve to be placed in /etc/init.d/ in boot related part:
I changed in two points: the root repository directory and I made the daemon to start as user svn.
http://odyniec.net/articles/ubuntu-subversion-server/
- Make svn account on svn server machine (eg. 192.168.0.6; localhost can also be used)
$ sudo su
$ adduser svn

- This is many-project-in-a-repository strategy
- login as svn and create a repository root repos
$ cd
$ svnadmin create repos
- this enables "svn list" repositories under repos;

- as svn, cd /home/svn/repos/conf and edit svnserve.conf:
anon-access = none
auth-access = write
password-db = passwd
- and edit passwd
uname = pword

- as svn, start svnserve daemon
$ svnserve -d -r /home/svn/repos

- Access from svn client machine
$ svn list svn://192.168.0.6/
- or
$ svn list svn://localhost/
- nothing appears, as there is no repositories yet. But no error message means that it is working now.

- cd ~/tmp which contains a directory "test", and import test to repository as "t1"
$ cd ~/tmp
$ svn import test svn://192.168.0.6/t1
- password prompt appears for uname (only one user now);
- if there are multiple users in passwd, option "--username uname" would be needed.
- option "--password pword" can also be used.
- uname and pword are cached.

$ cd ~/tmp2
$ svn checkout svn://192.168.0.6/t1
- ./t1 is made.

- Copy a sample file resample.py in ./t1 and add
$ svn add resample.py
$ svn status
$ svn commit -m "first test"


And for one-project-in-a-repository strategy, some steps are different:
$ mkdir repos
$ cd repos
$ svnadmin create test
- as svn, cd /home/svn/repos/test/conf and edit svnserve.conf and passwd as above.

$ svn import test svn://192.168.0.6/test
- repository name "t1" cannot be used as only the repository "test" was made for now. And note that
$ svn list svn://192.168.0.6/
- invokes error since svn root directory /home/svn/repos is not a repository.


Return to SVN on Ubuntu