NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
MoonSire
Feb 08, 2014Aspirant
subversion configuration
I am trying to get a subversion server running on my RN314. I have the following packages installed: root@sausage:/root# dpkg --get-selections | grep subversion subversion install subversion-n...
quickly_now
Mar 29, 2015Apprentice
HOWTO:
This is how I got subversion running on my brand new 314, running stock 6.2.2.
Step 1. Install the subversion app.
This is non trivial because the installation through Frontview seems to be broken (please Netgear how about a check and fix?)
To install it I eventually was able to find (google it) the subversion for readynas OS subversion-ntgr.deb file. Download that, and then use the upload button in frontview to install it.
This will install subversion, but leaves you in the dark as to what to do next. Presumably it could work using the svn: access method, but I want http and https:.
Step 2. Install the missing modules into the web server.
Using SSH login, issue the commands:
apt-get update
apt-get install libapache2-svn
This will download and install mod_dav_svn.so and (although it does not seem to be used or needed... but might depending on access / authentication that you want to use) mod_authz_svn.so.
At this point you are not much further advanced because you need a place for your subversion repository, and a means of pointing the web server at it.
Hence:
Step 3. Make a place for your subversion repositories.
I created mine under /data/.svn
In there I have created htpasswd-file (the authentication password file), and a directory called repos.
under repos, are each of the subversion repositories.
DO NOT make a share through Frontview for the repository location. You DO NOT want to have SMB / NFS / AFS access into the gory guts of the repository, and you don't want standard web access to it either.
Step 4. Tell the web server how to get into the repository.
You need to have a ".conf" file for the web server so that it can figure out the map from a URL to the underlying storage.
NORMALLY, on OS6, it looks like there should be a file under /apps which is the http web server configuration for each app. However there is no such file for the subversion app, and if you made one it would not be used because there is another file which references them all, and it is auto-managed by Frontview (so edits would get eaten). So instead we create a new file in the global apache2 configuration files location.
So, make a new file called SUBVERSION.conf, and create this in /etc/apache/conf.d
In this file, I put this content:
LoadModule authn_default_module /usr/lib/apache2/modules/mod_authn_default.so
<Location /svn/>
DAV svn
SVNParentPath "/data/.svn/repos"
SVNListParentPath On
AuthType Basic
AuthBasicProvider file
AuthName "Source Repository"
AuthUserFile "/data/.svn/htpasswd-file"
Require valid-user
</Location>
Step 5. Make sure you have a valid username and password in you htpasswd-file (Mr Google will help out there).
A few commands will sort that out.
Step 6. Restart the web server.
systemctl restart apache2
Now, point your browser at your nas thus:
http://mynas/svn/
Where "mynas" is the name of your NAS.
You should be prompted for the username and password set up in the htpassword-file above, and when that is entered correctly, you should be able to see and browse the subversion repositories.
Step 7. Niceties
If your NAS is to use port forwarding through the public internet, then forwarding port 80 will show anyone who comes along that you have a readynas there. They will have to use your admin usename and password, but the less you show the better.
So make a new share called something like "webroot", make that the HTTP default, and in that make a file called "index.html". In that file, just enter some text like "Access Denied", save it, and then anyone who casually points a web browser at your NAS (on port 80) gets that message. They, and you, have to use https://yournas/admin to get the admin page.
This is how I got subversion running on my brand new 314, running stock 6.2.2.
Step 1. Install the subversion app.
This is non trivial because the installation through Frontview seems to be broken (please Netgear how about a check and fix?)
To install it I eventually was able to find (google it) the subversion for readynas OS subversion-ntgr.deb file. Download that, and then use the upload button in frontview to install it.
This will install subversion, but leaves you in the dark as to what to do next. Presumably it could work using the svn: access method, but I want http and https:.
Step 2. Install the missing modules into the web server.
Using SSH login, issue the commands:
apt-get update
apt-get install libapache2-svn
This will download and install mod_dav_svn.so and (although it does not seem to be used or needed... but might depending on access / authentication that you want to use) mod_authz_svn.so.
At this point you are not much further advanced because you need a place for your subversion repository, and a means of pointing the web server at it.
Hence:
Step 3. Make a place for your subversion repositories.
I created mine under /data/.svn
In there I have created htpasswd-file (the authentication password file), and a directory called repos.
under repos, are each of the subversion repositories.
DO NOT make a share through Frontview for the repository location. You DO NOT want to have SMB / NFS / AFS access into the gory guts of the repository, and you don't want standard web access to it either.
Step 4. Tell the web server how to get into the repository.
You need to have a ".conf" file for the web server so that it can figure out the map from a URL to the underlying storage.
NORMALLY, on OS6, it looks like there should be a file under /apps which is the http web server configuration for each app. However there is no such file for the subversion app, and if you made one it would not be used because there is another file which references them all, and it is auto-managed by Frontview (so edits would get eaten). So instead we create a new file in the global apache2 configuration files location.
So, make a new file called SUBVERSION.conf, and create this in /etc/apache/conf.d
In this file, I put this content:
LoadModule authn_default_module /usr/lib/apache2/modules/mod_authn_default.so
<Location /svn/>
DAV svn
SVNParentPath "/data/.svn/repos"
SVNListParentPath On
AuthType Basic
AuthBasicProvider file
AuthName "Source Repository"
AuthUserFile "/data/.svn/htpasswd-file"
Require valid-user
</Location>
Step 5. Make sure you have a valid username and password in you htpasswd-file (Mr Google will help out there).
A few commands will sort that out.
Step 6. Restart the web server.
systemctl restart apache2
Now, point your browser at your nas thus:
http://mynas/svn/
Where "mynas" is the name of your NAS.
You should be prompted for the username and password set up in the htpassword-file above, and when that is entered correctly, you should be able to see and browse the subversion repositories.
Step 7. Niceties
If your NAS is to use port forwarding through the public internet, then forwarding port 80 will show anyone who comes along that you have a readynas there. They will have to use your admin usename and password, but the less you show the better.
So make a new share called something like "webroot", make that the HTTP default, and in that make a file called "index.html". In that file, just enter some text like "Access Denied", save it, and then anyone who casually points a web browser at your NAS (on port 80) gets that message. They, and you, have to use https://yournas/admin to get the admin page.
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!