Install CVS server:
$ sudo apt-get install cvsdWhen prompted in the cvsd installation process for Repository, type in “/cvsroot”.
2. Configuration
goto /var/lib/cvsd and build the cvsroot:
$ sudo cvsd-buildroot /var/lib/cvsdcreate the folder cvsroot:
$ sudo mkdir cvsrootand then initilize the repository
$ sudo cvs -d /var/lib/cvsd/cvsroot init
$ sudo chown -R cvsd:cvsd cvsroot3. Add user and password:
$ sudo cvsd-passwd /var/lib/cvsd/cvsroot +YOUR_USER_HERE(Repeat this line for each user)
NOTE: To create a user that has only read rights follow the next steps:
# touch /var/lib/cvsd/root/CVSROOT/readers
# chown cvsd:cvsd /var/lib/cvsd/root/CVSROOT/readers
# vi /var/lib/cvsd/root/CVSROOT/readersAdd the users you just created to this file, each user seperated by a new line. Do not forget to put a new line after the last user. This setting only allows readers to the repository, to allow writers, create a file writers on same path.
If a user is in the readers file the user is only allowed to read, regardless of whether or not they are in the writers file. If the user is in the writers file and not the readers file they can both read and write.
and then change the AUTH type:
$ sudo vi /var/lib/cvsd/cvsroot/CVSROOT/configuncomment the “SystemAuth=no” line.
4.Test it
On client side, install cvs
$ sudo apt-get install cvs and run$ cvs -d :pserver:YOUR_USER_HERE@YOUR_HOST_NAME:/cvsroot login
$ cvs -d :pserver:YOUR_USER_HERE@YOUR_HOST_NAME:/cvsroot checkout.If Windows client side, just download cvs.exe to use.
5. SSH Mode
Install:
$ sudo apt-get install openssh-server
# chmod -R 775 /var/lib/cvsd/cvsroot
# useradd USERNAME (create system user on server)
# gpasswd -a USERNAME cvsd (grant the user by adding him to the cvsd group)Repeat the second line for each user who needs access to cvs. Now any user that can access your server via ssh who also belongs to the cvsd group can access the cvs repository by setting CVSROOT as follows:
# CVSROOT=:ext:YOUR_USER_HERE@YOUR_HOST_NAME:/var/lib/cvsd/cvsroot; export CVSROOTTest: cvs rls
6. SSH without password prompt
On client side, generate DSA key pair:
$ ssh-keygen -t dsaSetting up passphrase access:
$ scp ~/.ssh/id_dsa.pub YOUR_USER_HERE@YOUR_HOST_NAME:.
$ ssh -l YOUR_USER_HERE -L 2401:localhost:2401 YOUR_HOST_NAME
% mkdir ~/.ssh
% chmod 700 ~/.ssh
% cat ~/id_dsa.pub >> ~/.ssh/authorized_keys2
% rm ~/id_dsa.pub
% chmod 600 ~/.ssh/*
% exit(You can also send the .pub file to your CVS Server's administrator to config)
Now test this by enter:
ssh YOUR_USER_HERE@YOUR_HOST_NAMEIf now you are logged in to the to the CVS machine without entering the password then everything's Ok.
NOTE: If the client side using Windows, please use puttygen to generate the key pair.
Check here for using PuTTY and SSH + JDev: http://www.oracle.com/technology/products/jdev/howtos/other/jdev10g_cvs_putty.html
Không có nhận xét nào:
Đăng nhận xét