1.创建cvs组,用户
[code]groupadd cvs
useradd cvsroot -g cvs
passwd cvsroot[/code]
2.查看service 里是否用cvs的端口
[code]more /etc/services | grep cvspserver[/code]
结果
[code]cvspserver 2401/tcp #CVS client/server operations
cvspserver 2401/udp #CVS client/server operations[/code]
3.编写cvs角本
[code]service cvspserver
{
disable = no
socket_type = stream
wait = no
user = root
env = HOME=
server = /usr/bin/cvs
server_args = -f --allow-root=/home/cvsroot/document pserver
}[/code]
注意:a、service后面的名称一定要和你在/etc/service文件中的cvs服务名称一样;
注意:每行等号左右都有一个空格,否则无法启动服务。
-f和--allow-root之间也有一个空格,--allow-root=/home/dsscvs/cvsroot之间不能有空格。
4.创建cvs库
[code]mkdir -d /cvsroot/document
chown -R cvsroot.cvs /cvsroot
chmod 771 /cvsroot/document[/code]
5.cvs进行初始化
[code]cvs -d /cvsroot/document init[/code]
6.测试连接
[code]cvs -d :pserver:cvsroot@localhosthost:/home/cvsroot/document login[/code]