« Perlモジュールのインストール | メイン | WebSVNのセットアップ »
2005年01月09日
ネットワークの構築:: シェルスクリプトでも・・・
Tweet @jin1016をフォローSubverionでリポジトリを作る作業が面倒なのでシェルスクリプトを少し調べてみた。
bashで始めるシェルスクリプト基礎の基礎
DOSのバッチとPerlの中間ぐらいって感じか。
なんとなく書けば出来そう。
Subverionでリポジトリを作るのは、/home/svn にDAV用のポリシーが設定あれば、次のような感じかな。(new_repは引数)
svnadmin create --fs-type=fsfs /home/svn/new_rep
chown -R apache:apache /home/svn/new_rep
rstorecon -R /home/svn/new_rep
/etc/httpd/conf.d/subversion.cnf に公開用なら次のように
<Location /svn/new_rep>
DAV svn
SVNPath /home/svn/new_rep
<LimitExcept GET PROPFIND OPTION REPORT>
SSLRequireSSL
AuthType Basic
AuthName "Please enter password."
AuthUserFile /path/to/passwdfile
Require user imoto
</LimitExcept>
</Location>
ローカル限定なら
<Location /svn/new_rep>
DAV svn
SVNPath /home/svn/new_rep
SSLRequireSSL
Allow from 192.168.1.0/255.255.255.0
Deny from ALL
Order Deny,Allow
</Location>
と追加し、httpdを再起動。
httpd restart
ってやるようにすれば、作成完了かな。
まあ、次リポジトリを作る時にスクリプト書くことにしよう。
投稿者 Takenori : 2005年01月09日 11:09
comments powered by Disqus