Labels

Showing posts with label UNIX. Show all posts
Showing posts with label UNIX. Show all posts

Thursday, December 29, 2011

CVS Server Setup Guide

1.0 Introduction

The Concurrrent Versioning System (CVS) has become an integral tool in the development of many software applications. Unfortunately, the process of setting-up the server discourages many from using CVS. This document was written to give a start-to-finish installation and setup of CVS on Red Hat Linux.

Please refer to the documentation provided from the CVS web site if you encounter problems. Also, the FAQ is often very helpful.

http://www.cvshome.org/docs/

http://ccvs.cvshome.org/fom/fom.cgi

2.0 Installation

    1. Obtaining the Source Distribution

      The best way to install the latest release of CVS is to obtain the source code and compile CVS.
      To download the source code proceed to the CVS web site: http://www.cvshome.org/
      Navigate to the download page of the CVS web site. There will be a large list of releases but the “stable” release is the one you should download.

    2. Configuring and Installing the Source Distribution

      Configuring the source distribution determines what operating system you are using and where the binary files should be installed.
      To get the source distribution onto the CVS server, you can either upload from your machine to the server or download it directly to the server from the CVS website. The later is detailed in following instructions:
      1. Login to the Red Hat Linux server via SSH
      2. su Switch to the root user. Enter the password for the root user when prompted.
      3. cd /usr/local/src Change to the source repository directory.
      4. wget <URL_of_CVS_distribution_file> Download the source distribution. Replace <URL_of_CVS_distribution_file> with the actual URL to download the CVS distribution file.
      5. tar -xzvf cvs-1.xx.tar.gz Decompress and untar the source files. This should create a new directory with a name similar to that of the distribution file containing all the CVS source files. You should briefly review the files “README” and “INSTALL” in the new directory for detailed instructions on configuring and installing CVS.
      6. cd cvs-1.xx Change to the new CVS source directory
      7. ./configure Configure the CVS source for installation. This creates a “make” file to compile the source and install it.
      8. make Compile the CVS binaries.
      9. make install Install the binaries and documentation on the system.

3.0 The Repository

The CVS repository is basically a directory in which all the files and directories under version control are stored. This document covers the bare minimum of what is needed to get the CVS repository up and running. It is recommended that you review the CVS manual (a.k.a the Cederqvist) for more information.

    1. Create a New Repository

Create a new “cvs” user with “cvs” as its default group. You must be logged-in as the root user to do this.

groupadd cvs

useradd –g cvs cvs

In addition to adding a new user and group to the Linux system, this should create a new home directory for the user. By default, this is /home/cvs.

Now, login as the “cvs” user and create a new directory for the repository root. You must set the permissions on the repository root to be group writable and set the “set gid flag” so that any files that are added to the repository belong to the “cvs” group. This ensures that users belonging to the “cvs” group will have access to these files.

su cvs

mkdir ~cvs/cvsroot

chmod 0770 ~cvs/cvsroot

chmod g+s ~cvs/cvsroot

Finally to initialize the new repository, execute:

cvs –d ~cvs/cvsroot init

    1. Creating a New User for CVS Access

A user has to be a member of the “cvs” group to have access to the new CVS repository. So we must create a new user of the “cvs” group and set its password. You must be logged-in as the root user to do this.

useradd –g cvs brad

passwd brad

Now we must enable CVS to find the repository root when the user executes CVS commands. We can accomplish this by setting the “CVSROOT” environment variable in the user’s profile. Add the following to the user’s .bash_profile (e.g. /home/brad/.bash_profile).

CVSROOT=/home/cvs/cvsroot

umask 006

export CVSROOT

You should now be able to login as the new Linux user and execute CVS commands on the new repository. For example, you could try creating a test module and import it into CVS:

su brad

cd ~

mkdir testmodule

echo “This is a test file.” >> testmodule/test.txt

cvs import –m “Importing test.” testmodule Vendor-1 Release-1

It is recommended that you refer to the Cederqvist CVS manual for more information about running CVS commands.

4.0 Sources

Please refer to the following documentation for further information:

Step-to-step guide to stablish a CVS system

http://www.salleurl.edu/~is04069/Codders/cvspasoapaso.html

Cederqvist CVS Manual

http://www.cvshome.org/docs/manual/

Wednesday, December 28, 2011

UNIX Command Summary

ls ................. show directory, in alphabetical order

logout ............. logs off system

mkdir .............. make a directory

rmdir .............. remove directory (rm -r to delete folders with files)

rm ................. remove files

cd ................. change current directory

man (command) ...... shows help on a specific command

talk (user) ........ pages user for chat - (user) is a email address

write (user) ....... write a user on the local system (control-c to end)

pico (filename) .... easy to use text editor to edit files

pine ............... easy to use mailer

more (file) ........ views a file, pausing every screenful

sz ................. send a file (to you) using zmodem

rz ................. recieve a file (to the unix system) using zmodem

telnet (host) ...... connect to another Internet site

ftp (host) ......... connects to a FTP site

archie (filename) .. search the Archie database for a file on a FTP site

irc ................ connect to Internet Relay Chat

lynx ............... a textual World Wide Web browser

gopher ............. a Gopher database browser

tin, trn ........... read Usenet newsgroups

passwd ............. change your password

chfn ............... change your "Real Name" as seen on finger

chsh ............... change the shell you log into

grep ............... search for a string in a file

tail ............... show the last few lines of a file

who ................ shows who is logged into the local system

w .................. shows who is logged on and what they're doing

finger (emailaddr).. shows more information about a user

df ................. shows disk space available on the system

du ................. shows how much disk space is being used up by folders

chmod .............. changes permissions on a file

bc ................. a simple calculator

make ............... compiles source code

gcc (file.c) ....... compiles C source into a file named 'a.out'

gzip ............... best compression for UNIX files

zip ................ zip for IBM files

tar ................ combines multiple files into one or vice-versa

lharc, lzh, lha .... un-arc'ers, may not be on your system

dos2unix (file) (new) - strips CR's out of dos text files

unix2dos (file) (new) - adds CR's to unix text files