Prepare a friendly CVS server for programming and development

Source: Internet
Author: User
Tags vmail
Article Title: Prepare a friendly CVS server for programming and development. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Only by doing development work can we find that a CVS server is essential, even for projects of few developers,
Using CVS will also play a major role. What is the specific role of CVS :)
  
Next, let's talk about how I set up a CVS server. What's different from those of my predecessors is that I set up a WEB interface,
Therefore, it is "friendly". You can view the code and view the graphical modification records through the WEB interface (submit
Log to the MySQL database -- This feature is a clone of the Mozilla Projects
Bonsai database.). Currently, SourceForge is using a lower version of this interface.
  
Function introduction:
1: Base CVS Server;
2: repository browsing.
3: SQL checkin database.
4: Colorize sourcecode.
5: Can display a clickable, graphical of files in a CVS repository.
6: generate tarball from a repository on the fly.
  
  
OK, Lets go!
  
1: Initialize the environment
  
# Groupadd cvs
  
# Mkdir/home2/cvsroot
# Useradd-g cvs-G cvs-d/home2/cvsroot
  
# Su-cvsroot
$ Chmod 775.
  
OK!
  
2: Start CVS Server
You have already made a brilliant explanation of prawns! : P
  
# More/etc/services | grep cvspserver
Cvspserver 2401/tcp # CVS client/server operations
Cvspserver 2401/udp # CVS client/server operations
  
OK. The RedHat system is not stupid. You can write the script.
  
# Vi/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 =/home2/cvsroot pserver
Log_on_failure + = USERID
}
  
: Wq
  
# Ls/etc/xinetd. d/cvspserver
/Etc/xinetd. d/cvspserver
  
Script ready!
  
# Su-cvsroot
$ Cvs-d/home2/cvsroot init
# Service xinetd restart
  
Check whether there is any?
  
# Netstat-l | grep cvspserver
Tcp 0 0 *: cvspserver *: * LISTEN
  
Great!
  
  
3: Add a Web Interface, viewcvs-0.9.2
  
  
URL: http://viewcvs.sourceforge.net/
  
Requirements are more personalized, a lot more! List:
  
A:
Python 1.5 or later (http://www.python.org /)
Rh7.2 has two python versions, 1.5 and 2.1, which are more personalized!
B:
RCS, Revision Control System (http://www.cs.purdue.edu/homes/trinkle/RCS)
Comes with Rh7.2.
C:
Read-only, physical access to a CVS repository (See http://www.cvshome.org/for more information)
Comes with Rh7.2.
D:
A web server capable of running CGI programs (for example, Apache at http://httpd.apache.org /)
The viewcvs-0.9.2 documentation says apache is optional :(
E:
GNU-diff to replace broken diff implementations (http://www.gnu.org/software/diffutils/diffutils.html)
Comes with Rh7.2.
F: MySQL to create and query a commit database (http://www.mysql.com /)
Comes with Rh7.2.
G: http://sourceforge.net/projects/mysql-python) (and Python 1.5.2 or later)
Pull now
H: Enscript to colorize code displayed from the CVS repository (http://people.ssh.com/mtr/genscript)
Pull now
I: CvsGraph for a graphical representation of the CVS revisions (http://www.akhphd.au.dk /~ Bertho/cvsgraph /)
Pull now
  
# Tar zxvf cvsgraph-1.1.3.tar.gz
# Cd cvsgraph-1.1.3
#./Configure
# Make
# Cp cvsgraph/usr/bin
# Mkdir/etc/cvsgraph
# Cp cvsgraph. conf/etc/cvsgraph
  
# Rpm-ivh egenix-mx-base-2.0.3-py2.1_1.i386.rpm
# Rpm-ivh MySQL-python-0.9.1-1py2.i386.rpm
  
  
# Tar zxvf viewcvs-0.9.2.tar.gz
# Cd viewcvs-0.9.2
#./Viewcvs-install
# Cp/usr/local/The viewcvs-0.9.2/cgi/viewcvs. cgi/var/www/cgi-bin
  
# Cp/usr/local/cvsview-0.9.2/PyFontify */usr/lib/python2.1/
# Cp/usr/local/cvsview-0.9.2/py2html */usr/lib/python2.1/
OK!
  
****************/
Create two users, cvsroot (password: cvsroot) uses root permission, cvsread (password: cvsread)
Read-Only permission.
  
#/Usr/local/cvsview-0.9.2/make-datebase
OK!
  
# Vi/usr/local/viewcvs-0.9.2/viewcvs. conf
Cvs_roots =
Development:/home2/cvsroot
  
Rcs_path =/usr/bin/
  
Address = hleil@vmail.com
  
[Cvsdb]
  
Host = localhost
Database_name = ViewCVS
User = cvsroot
Passwd = cvsroot
Readonly_user = cvsread
Readonly_passwd = cvsread
Row_limit = 1000
  
Py2html_path =/usr/lib/python2.1
  
Enscript_path =/usr/bin/
  
Allow_tar = 1
  
Use_cvsgraph = 1
  
  
**************************************** ****************
* ** If python-1.x and python-2x (such as RedHat7.2) are installed simultaneously)
* ** Pay attention to the following 10 million (we use python-2.x)
**************************************** ****************
Cd/usr/local/viewcvs-0.9.2
Loginfo-handler, standalone. py, cvsdbadmin
And
All files under cd/usr/local/viewcvs-0.9.2/cgi,
  
The first line is changed :#! /Usr/bin/python2
  
# Cp/usr/local/The viewcvs-0.9.2/cgi/viewcvs. cgi/var/www/cgi-bin
  
Http: // 127.0.0.1/cgi-bin/viewcvs. cgi/
OK!
  
  
4: Add user
  
# Usermod-G cvs username # Use System verification
  
OK, enjoy CVS!
  
  
5. fine-tuning
  
# Mkdir/var/lock/cvs
# Mkdir/var/lock/cvs/CVSROOT
# Chmod-R 775/var/lock/cvs
# Chown-R cvsroot. cvs/var/lock/cvs
# Su-hleil
$ Export CVSROOT =: pserver: cvsroot@vmail.com:/home2/cvsroot
$ Cvs login
$ Cvs checkout CVSROOT
$ Cd CVSROOT
$ Vi loginfo
ALL (echo % {sVv}; cat) |/usr/local/viewcvs-0.9.2/loginfo-handler # SQL checkin
: Wq
  
$ Vi config
SystemAuth = yes # Use System verification
LockDir =/var/lock/cvs # for security
LogHistory = all
: Wq
  
$ Cvs commit
# Service xinetd restart
  
  
Great! Finally!
  
Now let's start your code journey!
  
  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.