S-JIS[2003-06-22/2007-07-21] 変更履歴
LinuxのCVSをサーバーとし、クライアントとしてWinCvsを使う方法。
クライアントとしてEclipseを使う方法は別ページ参照。
# cd $CVSROOT/CVSROOT ←環境変数$CVSROOTは、普通にディレクトリを指す形式であること(pserver形式は駄目) # htpasswd passwd user2 ←パスワードファイル名とユーザーIDを指定 New password: ←パスワード入力 Re-type new password: ←パスワード入力 Adding password for user user2 # cat passwd user1:iymOI2s1dyB9I:user1 user2:l2Aspqxr99kpM # vi passwd user1:iymOI2s1dyB9I:user1 user2:l2Aspqxr99kpM:uniuser ←最後尾に、そのユーザーでUNIXにファイルを書き込む際に使われるUNIXユーザー名を追加する[2005-06-26]
# vi /etc/xinetd.d/cvspserver service cvspserver { disable = no socket_type = stream protocol = tcp wait = no user = root passenv = server = /usr/bin/cvs server_args = --allow-root=/usr/local/cvs pserver }
このファイルの内容については、Rob Braun(yomoyomo)さんの『xinetd FAQ』を参考にさせていただきました。
複数のCVSROOTをpserver経由でアクセスしたい場合には、--allow-rootを複数記述する。[2007-07-21]
server_args = --allow-root=/usr/local/cvs --allow-root=/usr/local/cvs2 pserver
# /etc/rc.d/init.d/xinetd restart
# chmod o+wx /usr/local/cvsもしくは 、cvs initで作成したリポジトリのディレクトリにアクセスできる専用のグループを作成し、その権限を付ける。[2007-07-21]
# groupadd グループ名 # chown -R :グループ名 /usr/local/cvs # chmod -R g+wx /usr/local/cvs
「管理」メニュー →「設定」から、CVSROOTをサーバーに設定する。
項目 | 値 |
---|---|
CVSROOT | :pserver:ユーザーID@サーバーのIPアドレス:CVSROOTのディレクトリ |
認証方法 | "passwd" file on the cvs server |
項目 | 説明 |
---|---|
ユーザーID | サーバー側のpasswdで指定したユーザー |
サーバーのIPアドレス | |
CVSROOTのディレクトリ | サーバーの環境変数CVSROOTの内容をフルパスで記述 |
サーバーに繋いで使う時には、「管理」メニュー
→「ログイン」でパスワードを入力してから使う。
パスワードは、サーバー側のpasswdで指定したパスワード。
Eclipseのページを参照。[2004-03-10]