Next: 4 FTP
Up: Redhat FAQ
Previous: 2 Big Brother
Contents
Subsections
- Log onto the server
- Set CVSROOT
$ export CVSROOT=/var/cvs
- Create the necessary user and group
$ sudo groupadd -g 105 cvs
$ sudo useradd -u 105 -g cvs -d $CVSROOT cvs
- Create the administrative directory
$ sudo mkdir -p $CVSROOT/CVSROOT
- Set ownership and permissions
$ sudo chown -R cvs:cvs $CVSROOT
$ sudo chmod -R ug+rwx $CVSROOT
$ sudo chmod -R o-rwx $CVSROOOT
- Become the cvs user
$ sudo su - cvs
- Initialize the repository
$ cvs init
- Logout from being cvs
- The repository is now prepared.
This step is not necessary if you are using ssh for access
- Create the file /etc/xinetd.d/cvs
# cvs server
service cvspserver
{
socket_type = stream
protocol = tcp
wait = no
user = cvs
passenv = PATH
server = /usr/bin/cvs
server_args = -f -allow-root=/var/cvs pserver
disable = no
}
- Reload the xinetd configuration
$ sudo service xinetd reload
If you are using pserver then passwords are needed. CVS cannot use
the MD5 hash so just copying system passwords is out on Linux. Use
openssl:
$ openssl passwd -crypt <password>
Paste the result into the the password field in $CVSROOT/CVSROOT/passwd.
The crypt function only uses the first eight characters.
- Set CVSROOT
$ export CVSROOT=:pserver:<user>@thames:/var/cvs
- Create a directory to store checked out files
$ mkdir ~/cvs
$ cd ~/cvs
- login to the CVS server
$ cvs login
- Checkout a new tree if necessary
$ cvs checkout <module name>
- Change to the correct directory
- Check if file to be edited is up to date
$ cvs status <filename>
- If necessary, get lastest versions
$ cvs update <filename>
- Make needed changes
- Upload changes
$ cvs commit <filename>
- If you do not want to keep the files around
$ cvs release -d <path/to/directory/to/delete>
- Logout
$ cvs logout
RCS is useful for maintaining configuration files on a local macine
where CVS would be overkill.
- Change to the directory the config files are in
$ cd /home/dnsadmin/data
- Make the RCS directory if necessary
$ mkdir RCS
- Add a file
$ rcs -i totalflood
- Check the file in
$ ci totalflood
- Check the file out for editing
$ co -l totalflood
- Edit the file
- Check the file back in. This also creates a read only copy for use
$ ci -u totalflood
To insure that only authorized users edit files you can create an
access list for a file.
$ rcs -a<username> <file>
- Make sure cvs group has write permission to the cvs directory (/var/cvs)
on the server. If the permissions do not allow group writes add a
directory for the new project.
- Log into the cvs server
- Become cvs user
$ sudo su - cvs
- Create the new directory
$ mkdir /var/cvs/foobar
- Set permissions
$ chmod ug+w /var/cvs/foobar
- Start Cervisia
- Select Repository->Import
- Select the correct repository. eg: ext:user@thames:/var/cvs
- Select a module name: foobar
- Give the complete path to the Working Directory.
- Enter a Vendor Tag and ReleaseTag.
- Click ``OK''
- Check the project directory back out
Next: 4 FTP
Up: Redhat FAQ
Previous: 2 Big Brother
Contents
2005-03-20