
At the time, I was puzzled by adding a compact server to my small home network, for storing and downloading media content, iTunes / UPnP servers, backup of my projects, TimeMachine, etc.
In the course of reading
reviews, I stopped at the recently released
DS210j model from Synology. During the transfer of data to the NAS for storing projects, I decided to install a Version Control System -
Subversion .
If interested, welcome under cat.
Initial preparations
- Enable SSH in Synology Disk Station Manager settings
- In the same place, create a user for the svnserve daemon (let it be svnowner)
- In the same place to create a ball for repositories, to give the user svnowner the rights RW
Installing ipkg bootstrap
Bootstrap is a script that installs ipkg (package management system). At the beginning of the installation, you need to find out what processor your NAS has. This can be viewed
here and immediately download the desired IPKG. Copy the installation package to the public ball, go root on the NAS, execute the following commands in the console:
>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
Subversion installation and setup
Subversion installation is very simple:
>ipkg install svnsvnserve can be run as a normal daemon, then it will be permanently in memory and wait for users to wait. Keeping the memory constantly is not very convenient, considering that the DS210j has only 128MB of memory, so we’ll use the opportunity to launch svnserve through the inetd daemon, it listens to the port that requests to svnserve can come in and “raises” it to process incoming requests.
')
run vi text editor
>vi /etc/inetd.confadd
svn stream tcp nowait svnowner /opt/bin/svnserve svnserve -i -r /volume1/svnSaving / exiting: wq, svnowner is a user with access to the / volume1 / svn directory,
add ports for subversion protocol to the / etc / service file
svn 3690/tcp # Subversion
svn 3690/udp # SubversionReboot the NAS.
Creating a test repository
Connecting to Diskstation root, switching to swnowner user (su svnowner), if the error “su: cannot run / sbin / nologin: No such file or directory” appears, do the following:
>vi /etc/passwdchanging the string
some_user:x:1025:100:Descriptive text:/nonexist:/sbin/nologinon
some_user:x:1025:100:Descriptive text:/nonexist:/bin/ashCreate a test repository in the balloon / volume1 / svn
cd /volume1/svn
svnadmin create testAccess rights
Go to the ball / volume1 / svn / test / conf and add any users to the passwd file with any text editor.
[users]
testuser = testpasswordAuthentication and invitation settings in the svnserve.conf file
[general]
anon-access = none
auth-access = write
password-db = passwd
realm = My test repository
We try to connect SVN client or from the console with the command:
svn co svn://<IP >/test < >That's all. As a conclusion, I recommend a wonderful and completely free
version control book
in Subversion .