Blog do projektu Open Source JavaHotel

piątek, 19 października 2012

CVS and AIX

Introduction
AIX does not come with CVS (client and server) installed. But it is quite easy to install them and transform our AIX server also to CVS server.
IBM AIX Toolbox and rpm
It is a set of GNU Open Source tools compiled for AIX from source files. Ready to use packages are available here: IBM AIX Toolbox download information. Before downloading read carefully licensing and installation instructions. Those packages are installed as RPM packages so make sure that your AIX has rpm already installed. Just run:
-bash-3.2# rpm --version
RPM version 3.0.5
-bash-3.2#
If rpm is not installed then install it first.
Download
Download two packages: zlib and csv. Rpm files for these packages should be like: zlib-1.2.3-4.aix5.2.ppc.rpm and cvs-1.11.17-3.aix5.1.ppc.rpm
Install
As root user:
rpm -i zlib-1.2.3-4.aix5.2.ppc.rpm
rpm -i cvs-1.11.17-3.aix5.1.ppc.rpm
Verify that cvs is installed:
-bash-3.2# cvs -version
Concurrent Versions System (CVS) 1.11.17 (client/server)
Copyright (c) 1989-2004 Brian Berliner, david d `zoo' zuhn,
Jeff Polk, and other authors
CVS may be copied only under the terms of the GNU General Public License,
a copy of which can be found with the CVS distribution kit.
Specify the --help option for further information about CVS
Add user cvs
Add user cvs who will be the owner of cvs repositories.
useradd -m cvs
Check the service 
As a root user verify that the file /etc/services contains entries:
cvspserver 2401/tcp # cvspserver
cvspserver 2401/udp # cvspserver
Create repository directory 
Login as user cvs and create the first repository.
cvs -d /home/cvs/cvstest init
Create a list of authorized users. File: vi /home/cvs/cvstest/CVSROOT/passwd
john::cvs
marry::cvs
ivan::cvs
Add the repository just created to the list of attended repositories. 
As a root user add an entry to the /etc/inetd.conf
cvspserver stream tcp nowait cvs /usr/bin/cvs cvs --allow-root=/home/cvs/cvstest pserver
Restart the service
refresh -s inetd
Test if everything is running 
From another computer run the command:
cvs -d :pserver:ivan@aixhost:/home/cvs/cvstest login
If everything is ok then this command should be completed without any message.
Create the first project:
mkdir proj
vi proj/file.txt
And import this project into repository as a repository module
cvs -d :pserver:marry@aixhost:/home/cvs/cvstest import -m "Initial import" proj proj start
Then move to another catalog or use another computer and checkout the project just created.
cvs -d :pserver:john@aixj:/home/cvs/cvstest checkout proj
If the project content is recreated it means that our repository is running and ready to act as a host for our next big project.
Add next repository. 
It is very simple now. Just create next repository directory - for instance
cvs -d /home/cvs/cvsprod init
Add list of authorized users.
vi /home/cvs/cvsprod/CVSROOT/passwd
Modify a line in the /etc/inetd.conf (important: all repositories entries should be included in one line)
cvspserver stream tcp nowait cvs /usr/bin/cvs cvs --allow-root=/home/cvs/cvstest --allow-root=/home/cvs/cvsprod pserver
Restart
refresh -s inetd
And next repository is ready to use.

Brak komentarzy:

Publikowanie komentarza