CVS create respository

Creating a CVS Repository

by Jeff Hunter, Sr. Database Administrator

Now, let's create a CVS repository. You will first need to decide on the location of the directory where you want to store the CVS repository. Here are several suggestions of directory locations for the repository:

* /usr/local/cvsroot
* /cvsroot
* /home/cvsroot
* /var/lib/cvsroot

If you want to follow the Filesystem Heirarachy Standard, (http://www.pathname.com/fhs/), then the preferred location for the repository would be: "/var/lib/cvsroot". That is the directory I will use in this example:

# mkdir /var/lib
# mkdir /var/lib/cvsroot

# chgrp cvsdev /var/lib/cvsroot
# ls -l /var/lib
total 2
drwxr-xr-x 2 root cvsdev 512 Jan 23 19:18 cvsroot

# chmod g+srwx /var/lib/cvsroot
# ls -l /var/lib
total 2
drwxrwsr-x 2 root cvsdev 512 Jan 23 19:18 cvsroot

# cvs -d /var/lib/cvsroot init
# ls -la /var/lib/cvsroot
total 6
drwxrwsr-x 3 root cvsdev 512 Jan 23 19:22 .
drwxr-xr-x 3 root other 512 Jan 23 19:18 ..
drwxrwsr-x 3 root cvsdev 1024 Jan 23 19:22 CVSROOT

# chown -R cvs /var/lib/cvsroot
# ls -l /var/lib
total 2
drwxrwsr-x 3 cvs cvsdev 512 Jan 23 19:22 cvsroot

Let's know examine the above commands:

* We created a UNIX group named cvsdev and that will be used for group read/write to the repository. This will allow users that may be on this machine to access the repository.

* We set the directory's SGID bit on the repository, so that files that get created in this directory have the same group ID as teh directory's group ID. (This is a very important step that can save a lot of headaches later!)

* We made the directory group writable/readable/executable.

* We also created a CVS repository using the command:

cvs -d repository_root_directory init

* For security reasons, we created a user (named cvs) to own the repository and the administrative files. We then did a chown on the respository's root directory and administrative files to that username.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值