1. 在Windows 7上安装CVS 服务器端,cvsnt
2.在win->CVSNT->Service Control Panel 启动 cvs和cvslock service
并创建一个"Ropository " 名称这里为cvs_repository
3. 在命令行窗口中首先登录cvs ,命令如下:
cvs -d :pserver:[email protected]:/ cvs_repository login 注:这里要用自己操作系统的管理员用户代替administrator
4: 添加用户
cvs -d :pserver:[email protected]:/ cvs_repository passwd -a cvsadmin
这样就创建了用户名为 cvsadmin 的账户,此时在 cvs 的安装目录下会生成一个passwd文件,里边存储着用户名和经过加密后的密码。这时候如果用命令 cvs -d :pserver: cvsadmin @127.0.0.1:/ cvs_repositorylogin 登录系统,可能会提示 cvsadmin 是无效的用户( 如果出现 Fatal error, aborting.
cvs [login aborted]: cvsadmin : no such user
这种错误.还要打开" CVSNT Control Panel" 程序在"Server Settings"选项卡的Run as 下拉框,选中 administrator 默认为 client user ,高版本可以),需要再执行如下命令将该用户与操作系统用户绑定:
5: cvs -d :pserver:[email protected]:/ cvs_repository passwd -r administrator (操作系统用户名) -a cvsadmin
6: 这时passwd文件中的记录变为 cvsadmin :***(加密的密码): administrator ( cvsadmin 用户的别名)
现在客户端可以用cvsadmin 用户来share project了。
另外一个问题,用cvsadmin 来share project以后,在服务器所在的机器上可以通过import from CVS repository来导入项目,但是在 其它机器上就提示Connection failed或者connection time out的错误。这是由于服务器端的防火墙的原因,在控制面板->安全中心->例外中,为端口2401,2402关闭防火墙即可。
7:附上权限设置 From http://codeidear.iteye.com/blog/225893
cvs可供使用的命令
CVS commands are:
add Add a new file/directory to the repository
admin Administration front end for rcs
annotate Show last revision where each line was modified
chacl Change the Access Control List for a directory
checkout Checkout sources for editing
chown Change the owner of a directory
commit Check files into the repository
diff Show differences between revisions
edit Get ready to edit a watched file
editors See who is editing a watched file
export Export sources from CVS, similar to checkout
history Show repository access history
import Import sources into CVS, using vendor branches
init Create a CVS repository if it doesn't exist
info Display information about supported protocols
log Print out history information for files
login Prompt for password for authenticating server
logout Removes entry in .cvspass for remote repository
ls List files in the repository
lsacl List the directories Access Control List
passwd Set the user's password (Admin: Administer users)
authserver Authentication server mode
rannotate Show last revision where each line of module was modified
rdiff Create 'patch' format diffs between releases
release Indicate that a Module is no longer in use
remove Remove an entry from the repository
rename Rename a file or directory
rchacl Change the Access Control List for a directory
rchown Change the owner of a directory
rlsacl List the directories Access Control List
rlog Print out history information for a module
rtag Add a symbolic tag to a module
server Server mode
status Display status information on checked out files
tag Add a symbolic tag to checked out version of files
unedit Undo an edit command
update Bring work tree in sync with repository
version Show current CVS version(s)
watch Set watches
watchers See who is watching a file
xdiff Show differences between revisions using an external diff p
rogram
(Specify the --help option for a list of other help options)