LoginSignup
8
5

More than 5 years have passed since last update.

いまさらSVNサーバー建立メモ

Posted at

前提

  • CentOS7
  • Windows (TortoiseSVN:fileプロトコル) から Linux (svnserve:svnプロトコル) へ

手順

  • 指定フォルダにリポジトリ作成

    • svnadmin create /hoge/hoge/リポジトリ名
  • 現行リポジトリのダンプファイル取得

    • svnadmin dump "c:\hoge\リポジトリ名" > c:\work\hoge.dump
  • ダンプファイルの移行先へのロード

    • svnadmin load /hoge/hoge/リポジトリ名 < /hoge/dump/hoge.dump
      ※リモートデスクトップ接続経由のコピーは、サイズが大きいとファイルが壊れる場合がある。FTPが安心。
  • ポート開放
    svn://プロトコルでアクセスするため、TCPのポート3690を開ける

    • firewall-cmd --permanent --add-port=3690/tcp
  • svnserveのサービス自動起動設定

    • systemctl enable svnserve.service
  • svnserveのサービス起動

    • systemctl start svnserve.service
  • サーバ上でのアクセス確認

    • svn list svn://xxx.xxx.xxx.xxx/省略パス以降のリポジトリ格納フォルダパス/リポジトリ名
  • リポジトリのアクセス権設定
    匿名ユーザ(Redmine等)はread権
    各ユーザーはwrite権

    • 設定ファイル
      • hoge/hoge/リポジトリ名/conf/svnserve.conf
    • 設定
      anon-access = read
      auth-access = write
      password-db = passwd
  • リポジトリのユーザー設定

    • 設定ファイル
      • hoge/hoge/リポジトリ名/conf/passwd
    • 設定(例)
      username = パスワード
      ※=以降無しでパスワード無しにもできる
  • リポジトリのチェックアウト
    クライアント側で以下のようにurl指定

    • svn://xxx.xxx.xxx.xxx/hoge/リポジトリ名
8
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
5