免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1755 | 回复: 5
打印 上一主题 下一主题

★cvs服务器安装出现问题★ [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-12-07 19:03 |只看该作者 |倒序浏览
我的现在情况.
服务器:红帽子企业4(上已经安装了oracle)
cvs为:cvsnt-2.5.03.2151-rh9-rpm.tar.gz   ,在http://www.march-hare.com/cvspro/,下载的是最新的版本

我的安装过程:
确认是否安装了老版本的cvs,如果有老版本的,就统统删除
[root@redhat /]# rpm -qa |grep cvs
libbonoboui-2.8.0.99cvs20040929-2
cvs-1.11.17-7.RHEL4
[root@redhat /]# rpm -e cvs-1.11.17-7.RHEL4
[root@redhat /]# rpm -qa | grep cvs
libbonoboui-2.8.0.99cvs20040929-2

将下载的cvs文件解压
[root@redhat cvs]# tar zxvf cvsnt-2.5.03.2151-rh9-rpm.tar.gz
cvsnt-2.5.03.2151-1.i386.rpm
cvsnt-database-mysql-2.5.03.2151-1.i386.rpm
cvsnt-database-odbc-2.5.03.2151-1.i386.rpm
cvsnt-database-sqlite-2.5.03.2151-1.i386.rpm
cvsnt-protocol-gserver-2.5.03.2151-1.i386.rpm
cvsnt-protocol-sserver-2.5.03.2151-1.i386.rpm
[root@redhat cvs]# ls
cvsnt-2.5.03.2151-1.i386.rpm                 cvsnt-database-sqlite-2.5.03.2151-1.i386.rpm
cvsnt-2.5.03.2151-rh9-rpm.tar.gz             cvsnt-protocol-gserver-2.5.03.2151-1.i386.rpm
cvsnt-database-mysql-2.5.03.2151-1.i386.rpm  cvsnt-protocol-sserver-2.5.03.2151-1.i386.rpm
cvsnt-database-odbc-2.5.03.2151-1.i386.rpm

安装相关的rpm包(之后立刻确认安装)
[root@redhat cvs]# rpm -ivh cvsnt-2.5.03.2151-1.i386.rpm
Preparing...                ########################################### [100%]
   1:cvsnt                  ########################################### [100%]
[root@redhat cvs]# rpm -qa |grep cvs
libbonoboui-2.8.0.99cvs20040929-2
cvsnt-2.5.03.2151-1

[root@redhat src]# cvs -version

Concurrent Versions System (CVSNT) 2.5.03 (Scorpio) Build 2151 (client/server)

Copyright (c) 1989-2001 Brian Berliner, david d `zoo' zuhn,
                        Jeff Polk, and other authors
CVSNT version (Nov 14 2005) Copyright (c) 1999-2005 Tony Hoyle and others
see http://www.cvsnt.org

Commercial support and training provided by March Hare Software Ltd.
see http://www.march-hare.com/cvspro

CVSNT may be copied only under the terms of the GNU General Public License v2,
a copy of which can be found with the CVS distribution.

The CVSNT Application API is licensed under the terms of the
GNU Library (or Lesser) General Public License.

Perl Compatible Regular Expression Library (PCRE)
  Copyright (c) 1997-2004 University of Cambridge.
  Licensed under the BSD license.
  See http://www.pcre.org/license.txt

Specify the --help option for further information about CVS

建立cvs用户组
[root@redhat /]# groupadd cvs
以上建立组的语句,不会在/home中多出任何目录来,赫赫.

建立经后的存放目录
[root@redhat /]# mkdir cvs
[root@redhat /]# cd cvs
[root@redhat cvs]# mkdir src
[root@redhat cvs]# cd src
[root@redhat src]# pwd
/cvs/src
[root@redhat src]#

指定cvs组的cvsroot用户和所属的目录
[root@redhat src]# useradd -g cvs -G cvs -d/cvs cvsroot

为cvsroot用户添加密码
[root@redhat cvs]# passwd cvsroot
Changing password for user cvsroot.
New UNIX password:
BAD PASSWORD: it does not contain enough DIFFERENT characters
Retype new UNIX password:
passwd: all authentication tokens updated successfully.

改变/cvs的目录属性
[root@redhat /]# chmod 775 /cvs
drwxrwxr-x    4 root root    4096 Dec  7 14:14 cvs
[root@redhat cvs]# chmod 775 src
drwxrwxr-x   2 root    root 4096 Dec  7 14:06 src

对cvs进行相关的版本确认
[root@redhat /]# cvs version
Concurrent Versions System (CVSNT) 2.5.03 (Scorpio) Build 2151 (client/server)

启动cvs服务器
[root@redhat /]# more /etc/services|grep cvspserver
cvspserver 2401/tcp # CVS client/server operations
cvspserver 2401/udp # CVS client/server operations

如果上面没有这个内容就
[root@redhat /]# vi /etc/services
来添加相关的内容

[root@redhat /]# vi /etc/xinetd.d/cvspserver
service cvspserver
{
disable = no
flags = REUSE
port = 2401
socket_type = stream
protocol = tcp
wait = no
user = root
passenv = PATH
server = /usr/bin/cvs
server_args = -f --allow-root=/cvs pserver
log_on_failure += USERID
}

shift+wq!
"/etc/xinetd.d/cvspserver" [New] 14L, 225C written
[root@redhat src]# ls /etc/xinetd.d/cvspserver
/etc/xinetd.d/cvspserver
[root@redhat src]# su cvsroot
[cvsroot@redhat src]$ pwd
/cvs/src
[root@redhat /]# service xinetd restart
Stopping xinetd: [  OK  ]
Starting xinetd: [  OK  ]
[root@redhat /]# netstat -l |grep cvspserver
tcp 0 0 *:cvspserver *:*  LISTEN

初始化cvs源码库,新建立一个Repository,此操作生成目录/cvs/CVSROOT(或者/cvs/src/CVSROOT),其下为一些初始化文件
[root@redhat src]# export CVSROOT=/cvs/src
[root@redhat src]# env | grep CVSROOT
CVSROOT=/cvs/src

[root@redhat src]# cvs -d /cvs/src init

在我输入 cvs -d /cvs/src init之后,流程就死在这里了,等1,2天都还是这样.
[root@redhat src]# ps aux|grep cvs
root      3308  0.0  0.4  6228 1172 pts/2    S    17:47   0:00 su cvsroot
cvsroot   3309  0.0  0.5  5548 1388 pts/2    S    17:47   0:00 bash
cvsroot   3423  0.0  0.6  6300 1792 pts/2    S+   18:57   0:00 cvs -d /cvs/src init
root      3424  0.1  0.6  6300 1668 ?        Ss   18:57   0:00 cvs -f --allow-root=/cvs/src pserver
root      3426  0.0  0.1  2980  368 pts/1    R+   18:57   0:00 grep cvs

非常苦恼不知道从何找起错误,我都摸不到错误的方向.
疑问1:我的linux操作系统软件版本,和我下载的版本是否配套.
疑问2:那个cvs .... init 好像默认使用的是2402端口,而默认的rpm包安装是开放的2401端口,这个我都弄了好久.

请各位高手谈谈看法,可能错在那里.
谢谢了

论坛徽章:
0
2 [报告]
发表于 2005-12-08 09:29 |只看该作者
我没有用过redhat下的cvs.
你可以先看看是否在安装cvs包时已经完成了一些默认的配置。(比如已经添加了组,已经建立了默认的cvs repository)

论坛徽章:
0
3 [报告]
发表于 2005-12-08 09:58 |只看该作者
红帽子企业4是默认安装了cvs的,我下载的是cvsnt(http://www.march-hare.com/cvspro/),http://www.march-hare.com/cvspro/上的官方网页是说完全支持红帽子企业4的.

论坛徽章:
0
4 [报告]
发表于 2005-12-08 11:25 |只看该作者
那一个CVSROOT的目录是不用自己建的,你只要cvs -d /cvs/path init就会建好CVSROOT了

论坛徽章:
0
5 [报告]
发表于 2005-12-08 11:27 |只看该作者

这是我做CVS时写下的笔记

Cvs server build
1.        先裝上CVS的RPM
2.        在home裡mkdir new folder as cvs’s repository
3.        到/etc/xinetd.d裡 modify cvspserver
(contents as under list)
#> [Crtl]+[d] 切换到root用户身份
先建仓
#> cvs –d /home/cvsroot/repository init
#> cd /etc/xinetd.d
#> vi cvspserver

service cvspserver
{
disable = no
flags = REUSE
socket_type = stream
wait = no
user = cvsroot
server= /usr/sbin/cvspserver
server_args = -f --allow-root=/cvspath pserver
}
#> service xinetd restart
4.        在root 下build cvs repository
#>cvs –d /cvs/repository/path init
5.        restart xinetd 服務
#>service xinetd restart
6.        test cvs
#>cvs –d :pserver:username:passwd@:servere IP:/cvs’s repository path login
沒信息返回就證明登陸成功
7.常見問題解決方法
一、如找不到cvs repository時可以修改/etc/cvs/cvs.conf文件
CVS_REPOS=”cvs’s repository path”
二、如果cvs’s repository在使用過程中rebuild, cvs’s repository會被lock
Make out mode 到/cvs’s repository path/CVSROOT裡修改config文件
#>vi config
在(contents)裡的UseNewInfoFmtStrings=yes前加上#讓該行inactive
三、cvs默認使用了os 所建的passwd,如果想讓cvs server有猛獨立的user and passwd (procedure as follow)
#>su
#>cd /cvs’s repository path/CVSROOT
#>htpasswd –cb passwd username userpasswd (if add new user the sample as follow) #>htpasswd –b passwd newuser userpasswd
#>vi passwd
給用戶權限
Modify format as :  username:passwd:cvsroot
然後再modify config file
#>vi config
將SystemAuth=no前的 # remove,就可以active 使用剛才的 passwd 文件
四、
檢查CVS是否已經在服務器上運行\r
#>netstat –l | grep cvspserver

Note:
The Cvs config file’s position which in the repository “CVSROOT” directory.




11月1号补充
Cvs 所有仓库在/home/cvsroot/ 目录下

Cvsweb & chpasswd config文件在/etc/cvsweb 目录下

Cvsweb访问密码passwd在/home/cvsroot/config目录下

Cvsweb各库分页在/var/www/cgi-bin/各库名目录下

Chpaswd.cgi 文件在/var/www/cgi-bin/目录下

修改web登入passwd 路径在/etc/httpd/conf/httpd.conf里

论坛徽章:
0
6 [报告]
发表于 2005-12-08 19:46 |只看该作者
算了,半天配置cvs没有配置好,换了subversion了,不到1小时就配置好了,感觉非常不错,eclipse客户端也非常不错了,赫赫,就用subversion了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP