CVSのインストール

## cvsのインストール
ubuntu@ubuntu-14:~$ sudo apt-get install cvs

## xinetdのインストール
ubuntu@ubuntu-14:~$ sudo apt-get install xinetd

## リポジトリの作成
ubuntu@ubuntu-14:~$ cvs -d /home/ubuntu/cvsroot init

## xinetdの起動設定
ubuntu@ubuntu-14:~$ cat /etc/xinetd.d/cvspserver
service cvspserver
 {
 port = 2401
 socket_type = stream
 protocol = tcp
 user = root
 wait = no
 type = UNLISTED
 server = /usr/bin/cvs
 server_args = -f --allow-root /home/ubuntu/cvsroot pserver
 disable = no
 }

## cvs用のOSユーザ作成
#ユーザ作成
ubuntu@ubuntu-14:/etc/xinetd.d$ sudo useradd cvsuser

## リポジトリの所有権変更
ubuntu@ubuntu-14:~$ sudo chown -R cvsuser.cvsuser /home/ubuntu/cvsroot/

## cvs利用ユーザの作成
#パスワード生成ツールのインストール
ubuntu@ubuntu-14:~/cvswork$ sudo apt-get install whois

#パスワード生成(htpasswdで生成したパスワードではログインできなかったのでmkpasswdで生成する)
ubuntu@ubuntu-14:~/cvswork$ mkpasswd cvsuser
urCo8tVK9tsXI

#パスワードファイルに書き込み
ubuntu@ubuntu-14:~/cvswork$ ls -l /home/ubuntu/cvsroot/CVSROOT/passwd 
-rw-r--r-- 1 cvsuser cvsuser 30  422 00:01 /home/ubuntu/cvsroot/CVSROOT/passwd

ubuntu@ubuntu-14:~/cvswork$ cat /home/ubuntu/cvsroot/CVSROOT/passwd
cvsuser:urCo8tVK9tsXI:cvsuser

## xinetdの再起動とサービス起動確認
#再起動
ubuntu@ubuntu-14:/etc/xinetd.d$ sudo /etc/init.d/xinetd restart

#サービス起動確認
ubuntu@ubuntu-14:/etc/xinetd.d$ sudo netstat -tap |grep cvs
tcp        0      0 *:cvspserver            *:*                     LISTEN      3376/xinetd     

## cvsへの接続確認
#環境変数設定(:pserver:ユーザ名:パスワード@ホスト名:リポジトリのパス)
ubuntu@ubuntu-14:~/cvswork$ CVSROOT=:pserver:cvsuser:cvsuser@localhost:/home/ubuntu/cvsroot; export CVSROOT;

#ログイン
ubuntu@ubuntu-14:~/cvswork$ cvs login
Logging in to :pserver:cvsuser@localhost:2401/home/ubuntu/cvsroot

※参考
インストールに関して
http://www.itnotes.eu/?p=358
http://a23187.yorozuyah.com/blog/?p=279

パスワードの生成について
http://docstore.mik.ua/orelly/other/cvs/cvs-CHP-8-SECT-7.htm