Archlinux/Raspberry Pi - Setup SCM-Manager

SCM-Manager

SCM-Manager is a lightweight version control server. SCM-Manager manages 3 systems: GIT, Subversion and Mercurial.

And it provides an easy installation and plugin support for stuff like LDAP authentication and much more.

Links/Download

JSVC: Needed to execute SCM-Manager in daemon mode, but not shipped for arm cpu

Set-By-Step

  1. Download required software First download required software (SCM-Manager and JSVC) like:

    wget https://www.scm-manager.org/download-action/?download=/scm-server/1.46/scm-server-1.46-app.tar.gz
    wget http://mirror.archlinuxarm.org/armv6h/extra/java-jsvc-1.0.15-2-armv6h.pkg.tar.xz
    
  2. Create directories and unpack

    # untar downloaded archives
    tar -zxvf scm-server-1.46-app.tar.gz
    tar -xvJf java-jsvc-1.0.15-2-armv6h.pkg.tar.xz
    
    # move folder to opt
    sudo mv -v scm-server /opt/scm-server
    
    # create basedir for server
    sudo mkdir /var/scm
    
    # move jsvc to server libs
    sudo mv -v  usr/bin/jsvc /opt/scm-server/libexec/jsvc-linux-armv6l
    rm -Rv usr
    
    # optional: remove downloaded
    

    rm scm-server-1.46-app.tar.gz

  3. Create new group and user scm for server

    sudo useradd -rUs /usr/bin/nologin scm
    
  4. Add your user to group scm

    sudo gpasswd -a $USER scm
    

    Relogin after this step

  5. Change directory owner and permissions

    # configure like tomcat http://superuser.com/a/825867/550494
    
    sudo chown -Rhcv root:scm /opt/scm-server
    sudo chmod -cv 750 /opt/scm-server
    
    sudo chown -hcv root:scm /opt/scm-server/README.txt
    sudo chmod -cv 640 /opt/scm-server/README.txt
    
    sudo chown -Rhcv root:scm /opt/scm-server/bin
    sudo chmod -Rcv 740 /opt/scm-server/bin
    
    sudo chown -Rhcv root:scm /opt/scm-server/conf
    sudo chmod -Rcv 640 /opt/scm-server/conf
    
    sudo chown -Rhcv root:scm /opt/scm-server/lib
    sudo chmod -Rcv 640 /opt/scm-server/lib
    
    sudo chown -Rhcv root:scm /opt/scm-server/libexec
    sudo chmod -Rcv 750 /opt/scm-server/libexec
    
    sudo chown -Rhcv root:scm /opt/scm-server/var
    sudo chmod -Rcv 660 /opt/scm-server/var
    sudo chmod -R gu+S /opt/scm-server/var
    
    sudo chown -Rhcv scm:scm /opt/scm-server/work
    sudo chmod -Rcv 660 /opt/scm-server/work
    sudo chmod -R gu+S /opt/scm-server/work
    
    sudo chmod -Rcv ug+X /opt/scm-server
    
    sudo chown -Rhcv scm:scm /var/scm
    sudo chmod -Rcv 6770 /var/scm
    sudo chmod -Rcv gu+s /var/scm
    
  6. Configure server
    Change the user to scm and set working dir

    nano /opt/scm-manager/bin/scm-server

    bash sh
    
  7. Start daemon

    # scm-server <start|stop>
    sudo /opt/scm-server/bin/scm-server start
    
  8. Check logs

    sudo tail -fn 50 /opt/scm-server/var/log/scm-server.out
    
  9. Open SCM-Manager

    name value
    server http://[server]:8080
    adminuser scmadmin
    password scmadmin