#!/bin/bash # # svnserve Startup script for the Subversion svnserve daemon # # chkconfig: - 85 15 # description: Subversion svnserve daemon # processname: svnserve # pidfile: /var/run/svnserve.pid # Source function library. . /etc/rc.d/init.d/functions export SVNSERVE=/usr/bin/svnserve export SVNSERVE_PID=/var/run/svnserve.pid export SVNSERVE_OPTS="--daemon --root /var/www/svn --pid-file ${SVNSERVE_PID}" RETVAL=0 start() { ${SVNSERVE} ${SVNSERVE_OPTS} RETVAL=$? return ${RETVAL} } stop() { if [ -f ${SVNSERVE_PID} ]; then kill -9 `cat ${SVNSERVE_PID}` rm ${SVNSERVE_PID} fi RETVAL=$? return ${RETVAL} } case "$1" in start) start ;; stop) stop ;; restart) stop start ;; status) status -p ${SVNSERVE_PID} svnserve RETVAL=$? ;; *) echo $"Usage: $prog {start|stop|restart|status}" exit 1 esac exit $RETVAL |
さて、次は接続するユーザ名とかパスワードとかを設定してみます。
前回、/var/www/svn/hiranoというレポジトリを作ったので、
/var/www/svn/hirano/conf
に設定ファイルがあります。
/var/www/svn/hirano/conf/svnserve.conf
### This file controls the configuration of the svnserve daemon, if you ### use it to allow access to this repository. (If you only allow ### access through http: and/or file: URLs, then this file is ### irrelevant.) ### Visit http://subversion.tigris.org/ for more information. [general] ### These options control access to the repository for unauthenticated ### and authenticated users. Valid values are "write", "read", ### and "none". The sample settings below are the defaults. anon-access = read auth-access = write ### The password-db option controls the location of the password ### database file. Unless you specify a path starting with a /, ### the file's location is relative to the conf directory. ### Uncomment the line below to use the default password file. password-db = passwd ### The authz-db option controls the location of the authorization ### rules for path-based access control. Unless you specify a path ### starting with a /, the file's location is relative to the conf ### directory. If you don't specify an authz-db, no path-based access ### control is done. ### Uncomment the line below to use the default authorization file. # authz-db = authz ### This option specifies the authentication realm of the repository. ### If two repositories have the same authentication realm, they should ### have the same password database, and vice versa. The default realm ### is repository's uuid. # realm = My First Repository |
### This file is an example password file for svnserve. ### Its format is similar to that of svnserve.conf. As shown in the ### example below it contains one section labelled [users]. ### The name and password for each user follow, one account per line. [users] # harry = harryssecret # sally = sallyssecret hirano = ****** |
$ svn mkdir svn://localhost/hirano/test -m 'てすと' --username hirano --password ****** リビジョン 27 をコミットしました。 |