Archive for 'Software'

Download PDF

As I write a lot of scripts for different tasks I find it useful to keep a hold of them all for future reference.
One of the easiest ways of keeping this information no matter where I am is to create my own home subversion repository. This means that no matter where I am, as long as I have http access to my home server I can get to my files.

How do you do this, well the first thing is to create your repository. Suppose I want to create a Repository at /usr/local/subversion/repository using fsfs database so execute the command:

mkdir -v /usr/local/subversion/
/usr/bin/svnadmin create --fs-type fsfs /usr/local/subversion/repository

That should create a subversion repository under /usr/local/subversion/repository.

ls /usr/local/subversion/repository
conf/ dav/ db/ format hooks/ locks/ README.txt

You should be able to see those files under the repository directory.

Setting up httpd.conf to serve the created repository:

Add the following lines to httpd.conf or the appropriate apache configuration file.

<Location /subversion>

  DAV svn

  SVNPath /usr/local/subversion/repository/

</Location>

Make sure that the module mod_dav is loaded in the apache configuration file and is also present under modules directory.

 

Setting up authentication:

For the authentication we need to make changes to the apache configuration yet another time.

Basic authentication requires that we just add the following lines to the httpd.conf where we added the svn repository earlier.

AuthType Basic

AuthName "{Name of the authentication popup tab}"

AuthUserFile {Location of the password file}

Require valid-user

So it should look like this.

<Location /subversion>

  DAV svn

  SVNPath /usr/local/subversion/repository/

  AuthType Basic

  AuthName "Subversion repository"

  AuthUserFile /usr/local/subversion/repository/conf/svn-auth-file

  Require valid-user

</Location>

It is necessary that we add users to the password file before anyone can access it, which is described in the next step.

 

Adding SVN users:

Since we are using svn with an apache server, and an apache basic authentication method.

We need to create a password file with the htpasswd binary provided with a standard apache installation.

htpasswd -cmd /usr/local/subversion/repository/conf/svn-auth-file {user-name}

-c option creates a new htpasswd file.

-m encrypts the password with an MD5 algorithm.

-d encrypts the password with a CRYPT algorithm.

Where {user-name} stands for an actual user name that will be used for authentication.

Warning: We should not use the -c option once we have added the first user. Using so will create and replace all existing user within the file.

htpasswd -md /usr/local/subversion/repository/conf/svn-auth-file {user-name}

 

Setting up the initial repository layout:

A repository mostly contains 3 standard folders.

branches

tags

trunk

For creating those standard folders in a repository, create a temporary folder anywhere you want, /tmp would be a good idea, with the following subdirectories.

mkdir -pv /tmp/subversion-layout/{branches,tags}

After we have made all the layout folders, move all the contents of your project to the trunk folder.

mv -v /usr/local/apache2/htdocs /tmp/subversion-layout/trunk

Then make an initial import of the temporary created directory.

/usr/local/subversion/bin/svn import /tmp/subversion-layout/ http://127.0.0.1/subversion/

This will setup you up with a default repository layout, and make a first revision.

Home Media Center on the cheap

Download PDF

With technology moving on and digital media being available for everyone it is now getting to the time when you have a home media server in the house.

You can buy off the shelf servers like medi8tor, but for anyone with a PC lying about doing nothing, can i suggest vortexbox.

Yes you can buy a ready built server from these folks. But they also offer a downloadable .iso file. Run this on your old PC and it will install everything for you. ( Note : I did have to do an update the first time to get the applications uptodate ).

For any CD or DVD just drop it in the drive and that will automatically be converted and pulled into your server.

Go check it out, for a home media server, this is making all the right moves.

VortexBox is a free, open source (GPL v3), quick-install ISO that turns your unused computer into an easy-to-use music server/jukebox. Once VortexBox has been loaded on an unused PC, it will automatically rip CDs to FLAC and MP3 files, ID3 tag the files , and download the cover art. Vortexbox will then serve the files to network media players such as Logitech Squeezebox, Sonos, or Linn. The music files can also be streamed to a Windows or Mac OSX system.

Features

  • Convert an old PC to a CD ripper / jukebox / NAS in 15 minutes.
  • Based on Fedora so it’s easy to modify.
  • Automatically tags all files from online music database.
  • Automatically downloads the cover art.
  • Automatic sharing of file to SMB (Microsoft) file shares.
  • Automatic re-indexing Squeezebox Server after every CD is ripped.
  • AppleTalk – for OSX or Bonjour for Windows.
  • DAAP – Automatically shares all MP3s for streaming to iTunes and Roku Soundbridge.
  • NFS – For Linux boxes and almost anything else, Solaris etc.
  • DLNA support – Play music and video DLNA enabled players, XBOX 360,PS3, Windows 7 etc.
  • Easy installation of mplayer for AlienBBC support.
  • Good support for Sonos.
  • Works well as a back end server for XBMC (XBOX Media Center) running on XBOX, Windows, OSX, AppleTV, or Linux.
« Previous posts Back to top