Posted: December 6th, 2010 | Author: admin | Filed under: QNap | Tags: subversion version control qnap | No Comments »
Based on the guide on the QNap wiki. This guide specifically shows how to install a subversion server on port 4000 for multiple repositories on the QNAP TS-239 Pro II.
# ipkg update
Create a directory for the repositories:
# ipkg install svn
# mkdir /share/HDA_DATA/subversion
To create a new repository for a project, do the following:
# mkdir /share/HDA_DATA/subversion/repos1
# svnadmin create /share/HDA_DATA/subversion/repos1
NB: To delete a repository, just delete the directory itself.
Access to the repositories is set up in the repos1/conf/svnserve.conf and repos1/conf/passwd files. The following is a basic configuration.
anon-access = read
auth-access = write
password-db = passwd
To start the svnserve daemon on startup, we must add a command to autorun.sh.
This file is located on the configuration ram block, sdx6, which must first be mounted. This is done in the following way on the TS-239 Pro II (for other models, see Running Your Own Application at Startup)
# mount -t ext2 /dev/sdx6 /tmp/config
Open autorun.sh in an editor:
# nano /tmp/config/autorun.sh
Add the following line, which will make sure svnserve is executed only when opt/bin has been loaded:
(while test ! -x “/opt/bin/svnserve”; do sleep 5; done; /opt/bin/svnserve -d --listen-port=4000)&
Finally, make sure autorun.sh is executable and unmount sdx6:
# chmod +x /tmp/config/autorun.sh
You can test the subversion server by doing a checkout using your favourite subversion client (e.g. TortoiseSVN). The url to check out will be something like this:
# umount /tmp/config
Posted: December 6th, 2010 | Author: admin | Filed under: QNap | Tags: ampache flac streaming qnap | No Comments »
Go to the Web Interface -> Applications -> MySQL Server -> “Enable MySQL Server” and “Enable TCP/IP Networking“
Go to the Web Interface -> Network Services -> “Enable Web Server“
In the “Web” directory on the QNap, create a directory called “music“.
Download the latest release of Ampache and extract it to this directory.
Open the corresponding URL in a browser (e.g. ‘http://nas/music’) and the Ampache installation page appears.
If all requirements are met the configuration can begin.
Leave the default settings and enter ‘root’ in username and ‘admin’ in password, if you have not changed these.
This will generate a config file, which must be saved to the
‘/config‘ directory of the Ampache installation.
Lastly, you will be asked to create a user for Ampache itself.
After logging into Ampache, go to the admin menu (found in the left menu) and add a catalog. This catalog should point to your music collection on the NAS.
Open a port in your router and forward it to the web server on the QNap (port 80 if it was not changed).
You are now ready to test your Ampache installation. You can go directly to the Ampache URL or if you have an iPhone you can use the free iAmpache app. One caveat with using the iAmpache app is, that it cannot play FLAC files. If you need to do this, or just want to save some bandwidth, continue with the following steps, which sets up FLAC to MP3 transcoding.
You will need LAME and FLAC in order to transcode the FLAC files to mp3.
Install them as follows:
ipkg install lame
Open ampache.cfg in an editor able to display unix line ending (e.g. Notepad++) and edit the ‘transcode_cmd_flac‘ directive,
ipkg install flac
so it looks like the following:
transcode_cmd_flac = “/opt/bin/flac -dc %FILE% | /opt/bin/lame -rb %SAMPLE% -S – - “
Set ‘transcode_flac’ to ‘true’:
transcode_flac = true