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
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
# cvs -d /home/cvsroot init
Lalu edit configurasi xinetd di /etc/xinetd.d/cvs
# 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
Setting password untuk cvs
Testing CVS
$ cvs login
kemudian masukkan password mypassword
Menggunakan CVS
* Mengimport Project
Terlebih dahulu masuk kedalam direktori letak project:
$ export CVSROOT=:pserver:henry@yourserver.com:/home/cvsroot
$ cvs login
$ cvs import myproject henry star
atau
* Mendownload project
$ cvs login
$ cvs co myproject
atau
* Mengupdate file project
$ 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: Examining .
/home/cvsroot/myproject/test.php,v <– test.php
new revision: 1.2; previous revision: 1.1
* Menambah file baru pada project
$ export CVSROOT=:pserver:henry@yourserver.com:/home/cvsroot
$ cvs login
asumsi kita membuat file baru bernama 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
$ 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
mantab cuk
yg svn dong