Install Subversion on Synology DS210j

    imageAt one time, he was puzzled by adding a compact server to his small home network for storing and downloading media content, an iTunes / UPnP server, backup of his projects, TimeMachine, etc.
    In the course of reading reviews, he focused on the recently released DS210j model from Synology. During the transfer of data to the NAS for storing projects, I decided to install the Version Control System - Subversion .
    If interested, welcome to cat.


    Initial preparations


    • Enable SSH in Synology Disk Station Manager Settings
    • Create a user for the svnserve daemon there (let svnowner be)
    • In the same place, create a ball for repositories, give svnowner user RW rights

    Install ipkg bootstrap


    Bootstrap is a script that installs ipkg (Package Management System). At the beginning of the installation, you need to find out which processor your NAS has. You can see it here and immediately download the desired IPKG. We copy the installation package to the public ball, go as root on the NAS, in the console, execute the following commands:

    >sh /volume1/public/syno-mvkw-bootstrap_1.2-7_arm.xsh
    >rm /volume1/public/syno-mvkw-bootstrap_1.2-7_arm.xsh
    >ipkg update
    >ipkg upgrade

    Install and configure Subversion


    Installing subversion is very simple:
    >ipkg install svn
    svnserve can be started as a regular daemon, then it will be constantly in memory and wait for user requests. Constantly occupying memory is not very convenient, considering that the memory of the DS210j is only 128MB, therefore, we will use the opportunity to run svnserve through the inetd daemon, it listens to the port to which svnserve requests can come and “raises” it to process incoming requests.

    start the vi text editor
    >vi /etc/inetd.conf
    add
    svn stream tcp nowait svnowner /opt/bin/svnserve svnserve -i -r /volume1/svn
    Save / exit: wq, svnowner is a user with access to the / volume1 / svn directory,
    add ports for the subversion protocol to the / etc / service file We reboot the NAS.
    svn 3690/tcp # Subversion
    svn 3690/udp # Subversion



    Create a test repository


    We connect by root to Diskstation, switch to the user swnowner (su svnowner), if the error “su: cannot run / sbin / nologin: No such file or directory” appears, do the following:
    >vi /etc/passwd
    change the line
    some_user:x:1025:100:Descriptive text:/nonexist:/sbin/nologin
    to
    some_user:x:1025:100:Descriptive text:/nonexist:/bin/ash
    Create a test repository in the / volume1 / svn ball
    cd /volume1/svn
    svnadmin create test


    Access rights


    Go to the / volume1 / svn / test / conf ball and add users to the passwd file with the authentication settings and prompts in the svnserve.conf file using any text editor. We try to connect the SVN client or from the console with the command: That's all. In conclusion, I recommend the wonderful and completely free book Version Control in Subversion .
    [users]
    testuser = testpassword


    [general]
    anon-access = none
    auth-access = write
    password-db = passwd
    realm = My test repository



    svn co svn:///test <папка назначения>


    Also popular now: