« How to shut down a free website without hurting the user base | Main | Advice for remote server admins »

Setting up Subversion as an xinetd process

  1. Add it to services

    In /etc/services:
    svnserve 3690/tcp # Subversion svnserve
    svnserve 3690/udp # Subversion svnserve

  2. Create the xinetd configuration file for svnserve
    In /etx/xinetd.d/svnserve:
    # default: on
    # Subversion server
    
    service svnserve
    {
            socket_type     = stream
            protocol        = tcp
            user            = svnadmin
            wait            = no
            disable         = no
            server          = /usr/local/bin/svnserve
            server_args     = -i
            port            = 3690
    }

    Of course, adjust the above for port, file location, user, etc.

  3. Restart xinetd service
    kill -SIGUSR2 `cat /var/run/xinetd.pid`
  4. Verify svnserve is listening
    # netstat -anp | grep LISTEN | grep 3690
    tcp 0 0 0.0.0.0:3690 0.0.0.0:* LISTEN 3303/xinetd


    - or -

    # telnet localhost 3690
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    ( success ( 1 2 ( ANONYMOUS ) ( edit-pipeline ) ) )
    

Comments

5) If not on a protected network, launch via TCP Wrappers and limit access via /etc/hosts.{allow,deny}

6) Operate behind a firewall :)

Ooh, a completely unexpected tidbit. Thanks!

Isn't it great to find something you never knew you wanted? :)