cvs server

Giorgos Keramidas keramida at ceid.upatras.gr
Tue Aug 16 13:54:19 EEST 2005


On 2005-08-14 13:09, axel maroudas <axelmangr at freemail.gr> wrote:
> kalispera pedia!
>
> Prosptho oli mera ke akri den vrisko. Akolouthisa tis odigies sas kathos
> ke kapia alla how to pou vrika gia ton cvs server alla na sindetho den
> mporo. I katastasi exi os exis:
>
> 1)     egatestisa ton cvs (apo yum)

Ok.

> 2)    $useradd -M -s /sbin/nologin cvs
>        $useradd -M -s /sbin/nologin cvs

Ok.

> 3)   sto /etc/group prosthesa:
>            cvs:x:502:anonymous
>            anonymous:x:503:
>            cvs:x:501:axel,anonymous

Den xreiazetai na yparxei "system user" me onoma "anonymous".  Mporeis na
oriseis sto 'passwd' arxeio tou CVSROOT se poion local user antistoixei o CVS
user 'anonymous'.  Epishs exe ypopsh oti to "pserver" prwtokolo pernaei tous
kwdikous panw apo to diktyo se mia praktika "unenrypted" morfh, opote den
einai to idio asfales me to na kaneis tunnel to CVS mesa apo SSH.

> 4) eftixa ena file /etc/xinetd.d/cvspserver:
>       service cvspserver
>        {
>            port=2401
>            socket_type=stream
>            protocol=tcp
>            wait=no
>            user=root
>            passenv=PATH
>            server=/usr/bin/cvs
>            server_args=-f --allow-root=/usr/local/cvsroot pserver
>        }
>
> 5) xanaxekinisa ton xinetd
>       $service xinetd restart

Bliax.  xinetd sucks :-(

> 6) prosthesa sto .bashrc
>       export CVSROOT=/usr/local/cvsroot/

O xarakthras '/' sto telos einai perittos kai mporei na sou dhmiourghsei
problhma se systhmata pou den yposthrizoun dyo synexomena path separators
(nomizw kapoies ekdoseis twn Windows kanoun blakeies otan doun "//" sto path
enos file name, alla de thymamai me sigouria pia).

	export CVSROOT='/usr/local/cvsroot'

> 7) eftiaxa ta directories
>       $mkdir $CVSROOT
>       chown -R cvs:cvs $CVSROOT
>       chmod ug+rwx $CVSROOT
>       chmod 0-rwx $CVSROOT
>       chmod g+s $CVSROOT
>
> 8) eftiaxa to symbolic link
>       $ ln -s /usr/local/cvsroot /cvs

Genika, ta symbolic links einai kalh fash alla mporei na se "paraksenepsei" to
pragmatiko path otan to deis kapou.  Apo thn ekdosh 2.4.10 tou Linux kernel
kai meta mporeis na kaneis 'remount' ena yparxon directory se opoiadhpote allo
meros ths ierarxias:

	# mount --rbind /usr/local/cvsroot /cvs

Ki etsi tha mporeis na blepeis katw apo to ``/cvs'' ola ta arxeia pou kanonika
yparxoun katw apo to ``/usr/local/cvsroot''.

> 9) meta ekana ta exis
>         $export CVSROOT=/usr/local/cvsroot
>          $cvs init
>
> 10) eftiaxa to passwd file ke to evala sto $CVSROOT/CVSROOT/passwd
>
> 11) eftiaxa to export
>       $export CVSROOT=':pserver:axel at axelman:/cvs'
>
> 12) ke prospathisa na kano login
>       $cvs login
>
> alla perno ena connection refused sti mouri:
>
> [root at axelman axel] # cvs login
> (Logging in to axel at axelman)
> CVS password:
> cvs [login aborted]: connect to axelman:2401 failed: Connection refused
>
> evala ke tin exis grammi sto /etc/sysconfig/iptables:
> -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 2401 -j ACCEPT
>
> Ti kano lathos re pedia. Gia doste ligo ta sofa fota sas

Eida oti to exeis hdh dior8wsei, alla auto to "Connection refused" mou leei
pws mallon ena apo ta parakatw ftaine (eftaigan estw):

	- Den exeis kanei swsta restart to xinetd

	- Den epitrepetai h syndesh apo to ``/etc/hosts.allow'' h to
	  ``/etc/hosts.deny'' arxeio




More information about the Linux-greek-users mailing list