Possum TV Live Server - Software


Operating-system-wise, I did things the hard way with this server, but even so, the process went fairly smoothly. Since this was my first effort at connecting a server to that wretched hive of scum and villainy known as the Internet, I decided to do my best to make it secure. My decision was to go open source and furthermore, I'd try to build everything on the system from the source code. I'd heard about LFS (Linux from Scratch) and it seemed worth a try. Not only would it (in theory at least) give me a lean system with a minimum of surface open to attack, but it would also be an interesting learning experience.


The first problem I encountered was that my motherboard was so new that it wasn't supported by the current release of LFS, and I even had difficulty finding a Linux CD that could successfully bootstrap the system. After a bit of searching, I managed to make a Kubuntu CD work with a bit of tweaking, but from that point on, things were fairly straight forward. It took major time (several days), even with the fast system I had, to compile and test all of the code, and there were a few issues to be resolved, but quite frankly it was easier (although admittedly slower) than installing XP. Every time I've installed XP, I've had to contend with blue screens and endless driver problems. By contrast, LFS (even the pre-release version) has been rock solid.


When I upgraded the system in March 2010, I went through this process again, and it was even easier the second time around, although it still took significant time to complete.


I should add that I'm not a Linux evangelist. I actually don't mind XP and can even cope with Windows 7; however a stripped-down version of Linux like LFS seems to be a perfect choice for a small web server like this and I'm very happy with it.


Once the OS was installed, I went about creating—the hard way—what is probably a fairly conservative LAMP (Linux, Apache, MySQL, Perl) webserver, with a program called Motion handling the video side of things. I installed the following software:



I also installed things like PCI Utils, Hdparm, cURL, Git and JOE for software development purposes and there might also be some other minor things I've forgotten, but I think the list above gives a good indication of the software needed for a webcam server like this one.


The server has only a command-line interface with no window manager. It makes the system much simpler and leaner to omit all of the Xorg stuff; the only down side is that you don't have any easy way of viewing movies or jpegs when setting up the cameras. I didn't find this to be a problem, because I could just access streaming video from Motion using a web browser on another computer.


Configuration


Configuring it all took a bit of time, but the main packages; Apache, MySQL and Motion, are fairly well documented and easy to work with, and the BLFS (Beyond Linux From Scratch) documentation is also very helpful. I won't go into the details of the configuration, but I'll just briefly mention a few relevant items which others might find helpful:



Recommendations


In general I would recommend starting with a stable and reasonably lean distro of Linux. If you are using Motion, there are pre-built packages available for Fedora, Mandriva, Debian and Ubuntu, so it would be easier to use one of these. Of these, Debian appears to have a particularly good reputation in web server applications and would probably be the best choice, although I haven't used it myself so can't really comment.


If you don't mind compiling Motion from the source code, you can use pretty much any distro you feel comfortable with (they all ultimately run on the Linux kernel, after all). Using LFS is taking things to extremes and only recommended if you want to learn about Linux, or if you're pushing the boundaries of performance.


Unless you've got specific preferences for other software packages, I would recommend installing the ones that I did. My understanding is that these packages are the Cisco routers or Fluke multimeters of the software world (although without the price-tag) and you can't go too far wrong by choosing them.


If you really wanted to, it would be possible to use Windows. Most video input cards come with Windows-based monitoring software, and you could combine this with a simple (and free) web server like WAMP. You'd probably have worse performance (although there may be little difference in practice) and you'd certainly have to pay extra attention to security issues, but I'm sure it would work.