Linux is a compact, network-oriented, open source operating system that can be used to create a programming environment and web server for new music projects. In this article we will look at how one distribution – Slax Linux – can be installed on a USB thumb drive and used with your PC to create a server-based system for TR that will make your music accessible on the Internet via web browser.
Slax 7 is a version of Linux can be used with i386 type processors – meaning even an older PC will run on Slax. I’ve used surplus thin client computers – $35 on ebay – to make Slax TR systems and these work very well. In this way you can have a dedicated, stand-alone server for your music without tying up the PC you use for creating or documenting your music.
Download and Install Slax:
Slax 7 can be downloaded from http://www.slax.org/ Be sure to download the appropriate language and type – there are 32 and 64 bit versions available. Slax 7 is just 220 MBytes and will fit easily on a 1 or 2 GByte thumb drive with lots of room to spare. Installation is simple. First, reformat the thumb drive for a FAT32 file system. The commands for this are in Windows Explorer. Next extract the Slax 7 zip file onto the thumb drive – there should then be a single directory on the USB drive: /slax
Next, navigate to the /slax/boot/ folder on the thumb drive and look for bootinst.bat. Click twice to execute this batch file and this will configure the master boot record for the thumb drive so it will launch Slax 7.
Slax 7 allows you to add programs and accessories that will be installed each time your Slax system is booted. For the TR Slax system, we will add three modules:
lighttpd – a web page server
PERL – a text-based programming language
CURL – a command line Internet API interface
sox – command line audio processing module
All Slax modules are available at http://www.slax.org/en/modules.php
Download the modules from the Slax site – these will be files ending in .sb Copy each module file into the /slax/modules folder on the Slax thumb drive just created. You can always add more modules – and there are hundreds to choose from on the Slax site – at any time.
Once the thumb drive has been loaded with Slax 7 and the desired modules, insert into the target PC USB port. The PC must be configured to boot from the thumb drive, so this will require that you get into the motherboard BIOS and set the boot sequence accordingly.
Slax 7 will load from the USB drive and configure itself according to the PC accessories present. The PC should be networked to get the maximum advantage for TR. During the boot process there will be a lot of text crawling down the screen, but eventually you will come on the Slax splash screen (shown above). At this point you have four seconds to press the escape key – so be ready! When you press escape the following menu appears:
Be sure to scroll down and de-select the Graphical Desktop – do this by hitting the space bar. We will run Slax 7 in the text command line mode.
Next, press the Tab key – this will cause a long command to appear at the bottom of the screen – and press enter. The booting process will continue until you arrive at the text mode log-in screen. Log in using the username root and the password toor. And you’re in!
At this point anyone familiar with linux can navigate the Slax system and find their way around. The first thing to do is to enable SSH and this is done by adding some commands to the /etc/rc.d/rc.local file
From root directory, navigate to /etc/rc.d directory.
Using the VI editor, modify the file rc.local, as follows:
Save the file, exit VI and shut down the system with the Linux command: poweroff
The system will close down and power off. Re-start the system using the same sequence when the boot process gets to the splash screen. You should see the SSH codes being generated during bootup.
Change the Password:
The Slax system has a default password but for security you should change this to something new that you can remember. To do this simply us the following command:
You will be prompted for a new password and asked to re-enter to confirm. That’s all you have to do – but be sure to record this somewhere safe in case you forget it.
PC Client Accessories for Slax 7:
When SSH has been enabled your PC can communicate with the Slax 7 system over your LAN using some free accessory programs. The first of these is Putty, a free terminal program for Windows that lets you log-in remotely to your Slax 7 system.
Download Putty at http://www.putty.org/ When installed into your PC and run under Windows you should see the following screen:
Enter the Slax 7 PC IP address and choose Port 22 SSH. You can determine the IP address of the Slax PC on your LAN by logging into Slax and running the linux command: ifconfig. The IP address will appear as part of the ethernet port specs.
When you press the Open button, an SSH message will appear – acknowledge this and you should see a log-in screen for the Slax system – enter username: root and passwd: toor. If successful you will be logged in to Slax just as if you were at the Slax PC keyboard. Putty is extremely useful – you can run linux commands, check the status or kill linux processes and run the VI editor – all remotely over your LAN.
Another useful capability that comes from SSH is FTP – the ability to move files between your PC and the Slax system easily. The best Windows client application for this is a freeware program called CORE FTP, and this can be downloaded here: http://www.coreftp.com/
COREFTP is easy to install and use. Ultimately you will be able to move files between your PC and Slax systems, change file permissions, delete files, etc. This is a useful tool that makes if possible to use Slax remotely.
You can access your Slax 7 system over the Internet by setting up Port forwarding in your home router. This allows you to Telnet into your Slax 7 system using Putty and move files with COREFTP. This lets you administer and program your Slax 7 system from anywhere in the world.