全部博文(297)
分类: LINUX
2008-01-09 11:19:06
1.Install:(don't validate)
#rpm -qa cvs ;check your system whether install CVS server
if system have no CVS server, you must be download CVS code/program. download URL:
install step:
#./configure --prefix=/usr/local/cvs ;configure install dir
#make
#make install
2.Configure:(Linux redhat9.0, auto install CVS server)
1)bulid CVS user-group
#groupadd cvs
2)build CVS group's cvsroot user and these dir
#useradd -g cvs -G cvs -d /home/cvsroot cvsroot
3)add cvsroot user password
#passwd cvsroot
4)change /home/cvsroot/ dir.'s attribute
#chmod 755 /home/cvsroot
5)initialize cvs source code repository, then create dir /home/cvsroot/CVSROOT
#cvs -d /home/cvsroot init
6)create can login cvs service's user & password, create file passwd
#vi /home/cvsroot/CVSROOT/passwd
under file format:
chenchao:XXXXX:cvsroot
XXXXX is password, build by passwdgen.pl file execute
#passwdgen.pl 123456 ; "123456" is password
7)create passwdgen.pl file: #vim /home/cvsroot/passwdgen.pl ; file content is :
#!/usr/bin/perl
srand (time());
my $randletter = "(int (rand (26)) + (int (rand (1) + .5) % 2 ? 65 : 97))";
my $salt = sprintf ("%c%c", eval $randletter, eval $randletter);
my $plaintext = shift; my $crypttext = crypt ($plaintext, $salt);
print "${crypttext}\n";
8)add CVS service(because of RedHat9.0 default have cvs service, don't add)
#vim /etc/services
cvspserver 2401/tcp #pserver cvs service
cvspserver 2401/udp #pserver cvs service
9) CVS server by inetd run up, so we are need to add startup server(RedHat9.0 used xintd mode, create cvspserver file
#vim /etc/xinetd.d/cvspserver
service cvspserver
{
disable = no
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/bin/cvs
server_args = -f --allow-root=/home/cvsroot pserver
log_on_failure += USERID
}
10)restart inetd or xinetd:
#/etc/rc.d/init.d/xinetd restart
11)check cvspserver server whether startup
#netstat -l |grep cvspserver
result: tcp 0 0 *:cvspserver *:* LISTEN # OK started
12) all about above then test login:
#cvs -d :pserver:chenchao@10.4.37.12:/home/cvsroot login
prompt input passwd, then input it . If have no information back it , then you are success.
13)Client set environment: ~/.bash_profile
export CVS_RSH=ssh
export CVSROOT=:pserver:username@ip:/home/cvsroot
14)then you can direct login: cvs login
3.CVSweb:
1)download cvsweb URL:
2) #tar -zxvf cvsweb-3.0.6.tar.gz
3)copy configure file "cvsweb.conf " to apache2 configure dir
#cd cvsweb-3.0.6
#cp cvsweb.conf /usr/local/apache2/conf
Modify "cvswebconf ", file content,
#vim /usr/local/apache2/conf/cvsweb.conf
@CVSrepositories = (
'local' => ['Local Repository', '/var/cvs'],
# 'freebsd' => ['FreeBSD', '/var/ncvs'],
# 'openbsd' => ['OpenBSD', '/var/ncvs'],
# 'netbsd' => ['NetBSD', '/var/ncvs'],
# 'ruby' => ['Ruby', '/var/anoncvs/ruby'],
change 'local' last field: '/var/cvs', change to your cvs repository dir. For example: /home/cvsroot.
4)individuation setting
$logo
$defaulttitle
$long_intro
$short_instruction
5)copy "cvsweb.cgi " to apache2/cgi-bin/ dir,
#cp cvsweb.cgi /usr/local/apache2/cgi-bin/
change cvsweb.cgi "$config" variable value with your cvsweb.conf path.
#vim /usr/local/apache2/cgi-bin/cvsweb.cgi
##### Start of Configuration Area ########
between there
##### End of Configuration Area ########
change path: '/usr/local/apache2/conf/cvsweb.conf '.
6)chinese support, in cvsweb.cgi
lookup sub html_header($) function
between and
7) copy all file in "icons" dir to apache2/icons dir
#cp icons/* /usr/local/apache2/icons
8) add access control
switch to /usr/local/apache2/conf dir, build passwd:
#cd /usr/local/apache2/conf
#/usr/local/apache2/bin/htpasswd -c cvsweb.passwd user (user is your user: chenchao)
this command will build a cvsweb.passwd file, under configure you must appoint this file location.
9)Modify httpd.conf file, add:
AuthName "CVS Authorization"
AuthType Basic
AuthUserFile /usr/local/apache2/conf/cvsweb.passwd
require valid-user
10)restart apache server
#/usr/local/apache/bin/apachectl restart
11)in browser: ip/cgi-bin/cvsweb.cgi; if have error, you can check /usr/local/apache2/logs/error_log log.
12)notice
a) your system must have File::Temp, IPC::Run, URI etc. perl module.
b) cvs must hvae been installed.
13)perl module install
download IPC::Run, URL:
decompression this file, into dir ./lib copy "IPC" dir to /usr/lib/perl5/5.8.0/i386-linux-thread-multi/
then restart apache.
14)other
For my system, this configure, the system is natural.
4.install enscript:
1)download enscript-1.6.4.tar.gz, from URL:
2)install:
#./configure
#make;make install
3)copy cvsweb packet under enscript dir's file *.st to /usr/local/share/enscript/hl
5.install cvsgraph:
1)download cvsgraph-1.4.0.tar.gz, from URL:
2)install:
#./configure
#make
3)read cvsgraph dir README file and install/ startup it.
6.Use:
1)create a project: you can create your project root dir, then in project root dir create your project resource. in your project root dir, you can do,
#cvs import -m "write some comments here for you create project" project_name verder_tag release_tag
2)check out project resource: enter your want to download project dir,you can do,
#cvs co project_name
3)summary cvs command
7.note:
If we have any question, we can check /usr/local/apache2/log/error_log info & cvsweb INSTALL doc step by step.
httpd.conf: parameter
ServerRoot
DocumentRoot
User/Group = apache
Options Indexes FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all