Install CVS Server on openSUSE 11

Posted on June 24th, 2008 by id_provoke.
Categories: Linux, Orat-oret.

CVS adalah Concurrent Versions System. Fungsi dari CVS sendiri adalah untuk mencatat perubahan pada sebuah file, biasanya lebih sering digunakan untuk mencatat sebuah project development yang mencatat perubahan-perubahan pada file-filenya.

Install CVS di openSUSE 11

# zypper in cvs
Reading installed packages…
The following NEW package is going to be installed:
cvs

Overall download size: 368.0 K. After the operation, additional 872.0 K will be used.
Continue? [YES/no]: yes
Downloading package cvs-1.12.12-126.1.i586 (1/1), 368.0 K (872.0 K unpacked)
Downloading: cvs-1.12.12-126.1.i586.rpm [done (11.0 K/s)]
Installing: cvs-1.12.12-126.1 [done]

Configurasi CVS

Atur Repositori pada direktori /home/cvsroot

# mkdir /home/cvsroot
# cvs -d /home/cvsroot init

Lalu edit configurasi xinetd di /etc/xinetd.d/cvs

# CVS pserver (remote acces to your CVS repositories)
# Please read the section on security and passwords in the CVS manual,
# before you enable this.
# default: off

service cvspserver
{
disable = no
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/bin/cvs
server_args = -f –allow-root=/home/cvsroot pserver
}

lalu restart xinetd

/etc/init.d/xinetd restart

Setting password untuk cvs

htpasswd -nb henry mypassword > /home/cvsroot/CVSROOT/paswd

Testing CVS

$ export CVSROOT=:pserver:henry@yourserver.com:/home/cvsroot
$ cvs login

kemudian masukkan password mypassword

Menggunakan CVS

* Mengimport Project

Terlebih dahulu masuk kedalam direktori letak project:

$ cd /home/henry/public_html/myproject
$ export CVSROOT=:pserver:henry@yourserver.com:/home/cvsroot
$ cvs login
$ cvs import myproject henry star

atau

$ cvs import -m “Importing my project to CVS repository” myproject henry start

* Mendownload project

$ export CVSROOT=:pserver:henry@yourserver.com:/home/cvsroot
$ cvs login
$ cvs co myproject

atau

$ cvs checkout myproject

* Mengupdate file project

$cd /home/henry/public_html/myproject
$ export CVSROOT=:pserver:henry@yourserver.com:/home/cvsroot
$ cvs login

asumsi kita mempunyai file test.php dan telah melakukan perubahan pada file test.php

$ cvs commit-m “Update file test.php”
cvs commit: Examining .
/home/cvsroot/myproject/test.php,v <– test.php
new revision: 1.2; previous revision: 1.1

* Menambah file baru pada project

$cd /home/henry/public_html/myproject
$ export CVSROOT=:pserver:henry@yourserver.com:/home/cvsroot
$ cvs login

asumsi kita membuat file baru bernama connect.php

$ cvs add connect.php
cvs add: Re-adding file `connect.php’ after dead revision 1.1.
cvs add: use `cvs commit’ to add this file permanently
$ cvs commit
cvs commit: Examining .
/home/cvsroot/myproject/connect.php,v <– connect.php
new revision: 1.2; previous revision: 1.1

* Menghapus file pada project

$cd /home/henry/public_html/myproject
$ export CVSROOT=:pserver:henry@yourserver.com:/home/cvsroot
$ cvs login
$ rm connect.php
rm: remove regular file `connect.php’? y
$ cvs remove connect.php
cvs remove: scheduling `connect.php’ for removal
cvs remove: use `cvs commit’ to remove this file permanently
$ cvs commit -m “Hapus connect.php”
cvs commit: Examining .
/home/cvsroot/myproject/connect.php,v <– connect.php
new revision: delete; previous revision: 1.2

2 comments.

biji
Comment on June 25th, 2008.

mantab cuk

anonymous
Comment on July 13th, 2008.

yg svn dong

Leave a Comment

Names and email addresses are required (email addresses aren't displayed), url's are optional.

Comments may contain the following xhtml tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>