Subversion @ Gentoo Linux - Linux Life

はじめに

ソース管理システム Subversion を使ってみます。

インストール

# emerge -avt subversion
* Man pages are not installed for most modules now.
* Please use perldoc instead.
* Subversion Server Notes
* -----------------------
*
* If you intend to run a server, a repository needs to be created using
* svnadmin (see man svnadmin) or the following command to create it in
* /var/svn:
*
*     emerge --config =dev-util/subversion-1.3.2-r3
*
* If you upgraded from an older version of berkely db and experience
* problems with your repository then run the following commands as root:
*     db4_recover -h /var/svn/repos
*     chown -Rf apache:apache /var/svn/repos
*
* Subversion has multiple server types, take your pick:
*
*  - svnserve daemon:
*    1. edit /etc/conf.d/svnserve
*    2. start daemon: /etc/init.d/svnserve start
*    3. make persistent: rc-update add svnserve default
*
*  - svnserve via xinetd:
*    1. edit /etc/xinetd.d/svnserve (remove disable line)
*    2. restart xinetd.d: /etc/init.d/xinetd restart
*
*  - svn over ssh:
*    1. Fix the repository permissions:
*         groupadd svnusers
*         chown -R root:svnusers /var/svn/repos/
*         chmod -R g-w /var/svn/repos
*         chmod -R g+rw /var/svn/repos/db
*         chmod -R g+rw /var/svn/repos/locks
*    2. create an svnserve wrapper in /usr/local/bin to set the umask you
*       want, for example:
*          #!/bin/bash
*          umask 002
*          exec /usr/bin/svnserve "$@"
*
*  - http-based server:
*    1. edit /etc/conf.d/apache2 to include both "-D DAV" and "-D SVN"
*    2. create an htpasswd file:
*       htpasswd2 -m -c /var/svn/conf/svnusers USERNAME
*
* If you intend to use svn-hot-backup, you can specify the number of
* backups to keep per repository by specifying an environment variable.
* If you want to keep e.g. 2 backups, do the following:
* echo '# hot-backup: Keep that many repository backups around' > /etc/env.d/80subversion
* echo 'SVN_HOTBACKUP_NUM_BACKUPS=2' >> /etc/env.d/80subversion
*
# cd /var/run
# emerge --config =dev-util/subversion-1.3.2-r3

SSH 認証

# groupadd svn
# chown -R :svn /var/svn/
# chmod -R g+rw /var/svn/
# usermod -G svn tasuku

実行

# /etc/init.d/svnserve start
# rc-update add svnserve default

使いかた

Desktop > SVN を参照。

スポンサードリンク

Copyright © 2025 Linux-Life.net