Difference between revisions of "Subversion"
imported>WikiSysop |
imported>ThorstenStaerk |
||
(7 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | + | Subversion is a [[revision control system]] with a central repository. | |
+ | |||
+ | This article describes how to set up a subversion server. It has been tested with SUSE Linux 11, but should work for other distributions as well. | ||
+ | |||
+ | = Install it = | ||
+ | Install the subversion software: | ||
+ | yast -i subversion | ||
+ | Then add a subversion user and its group: | ||
useradd -m svn | useradd -m svn | ||
groupadd svn | groupadd svn | ||
Line 10: | Line 17: | ||
Start the subversion server | Start the subversion server | ||
/etc/init.d/svnserve start | /etc/init.d/svnserve start | ||
− | Run it | + | |
+ | Now add user rights management to your subversion. Modify /srv/svn/repos/conf/svnserve.conf: | ||
+ | anon-access = read | ||
+ | auth-access = write | ||
+ | password-db = passwd | ||
+ | realm = My First Repository | ||
+ | |||
+ | = Run it = | ||
svn co svn://localhost | svn co svn://localhost | ||
Checked out revision 0. | Checked out revision 0. | ||
+ | |||
+ | Check out your repository using | ||
+ | svn co svn+ssh://root@localhost/srv/svn/repos/ | ||
+ | Password: | ||
+ | Password: | ||
+ | Checked out revision 0. | ||
+ | Add your first directory | ||
+ | cd repos/ | ||
+ | ls | ||
+ | .svn | ||
+ | svn mkdir trunk | ||
+ | A trunk | ||
+ | svn commit -m "myfirst" | ||
+ | Password: | ||
+ | Adding trunk | ||
+ | |||
+ | Committed revision 1. | ||
+ | |||
+ | = Show it in the web = | ||
+ | To make your subversion repository browsable from a web browser, have an apache server running on the same server and install ViewVC. | ||
+ | You will need to adapt /etc/sysconfig/apache and /srv/viewvc/viewvc.conf | ||
= See also = | = See also = | ||
* http://queens.db.toronto.edu/~nilesh/linux/subversion-howto/ | * http://queens.db.toronto.edu/~nilesh/linux/subversion-howto/ |
Latest revision as of 07:11, 9 July 2011
Subversion is a revision control system with a central repository.
This article describes how to set up a subversion server. It has been tested with SUSE Linux 11, but should work for other distributions as well.
Install it
Install the subversion software:
yast -i subversion
Then add a subversion user and its group:
useradd -m svn groupadd svn
Find out where subversion expects its repository
/etc/init.d/svnserve start Starting svnserve svnserve: Root path '/srv/svn/repos' does not exist or is not a directory. failed
Create the respective directory
svnadmin create /srv/svn/repos
Start the subversion server
/etc/init.d/svnserve start
Now add user rights management to your subversion. Modify /srv/svn/repos/conf/svnserve.conf:
anon-access = read auth-access = write password-db = passwd realm = My First Repository
Run it
svn co svn://localhost Checked out revision 0.
Check out your repository using
svn co svn+ssh://root@localhost/srv/svn/repos/ Password: Password: Checked out revision 0.
Add your first directory
cd repos/ ls .svn svn mkdir trunk A trunk svn commit -m "myfirst" Password: Adding trunk Committed revision 1.
Show it in the web
To make your subversion repository browsable from a web browser, have an apache server running on the same server and install ViewVC. You will need to adapt /etc/sysconfig/apache and /srv/viewvc/viewvc.conf