By Conrad Barski, M.D.
LISPERATI.COM


There's lots of reasons why languages like Lisp and Scheme make ideal environments for serving up web pages. Unfortunately, setting up a web server that uses these languages can be intimidating. Sure, you can tell someone something like "Oh just use mod_lisp and you're good to go!" But things are just not that easy- Just because someone has some interest in programming lisp/scheme does not mean they know the intricacies of Apache or know how to configure the minutiae of their own linux system. Whenever software needs to be configured to talk to other software or the outside world, it has a way of just not doing anything and making debugging nigh impossible. I realized how difficult it was to setup a scheme-enabled server last weekend- Setting up a server that works with SISC Scheme seems like a perfect web environment to me, since SISC supports true continuations and since it runs within JAVA, a language with plenty of great web development tools supporting it.

Basically, I expected it would take me a couple of hours to set up a Debian/Tomcat/SISC web server, but it took about 20 hours instead... In order to avoid others such headaches, I have created this set of instructions: If you follow them precisely, you will have built yourself a powerful Debian system from the ground up to serve up scheme web pages and should be able to do so (hopefully) without running into any unexpected configuration nightmares!

How can I Host a Scheme Web Server?

One of the big conundrums of Scheme web programming is that it requires more control over the web server than a mom-and-pop web hosting company will give you: You need to be able to install your own Scheme software on the server- Most web hosters will only want you to serve up static html pages and maybe do a little PHP programming, which is not enough to make Scheme applications possible. However, there are web hosting plans available that make it possible to host J2EE web applications, and SISC Scheme (Since it is Java-based) can run in such an environment. Since I was interested in an environment that allows more control over my Scheme applications, I decided to build my own Scheme server taking advantage of a technology called User Mode Linux. The idea behind UML is to build a version of linux that can run other copies of linux inside of it so that they behave just like their own computers. The web company can now have just one mondo web server at their office and it can run lots of smaller web servers inside of it, all controlled individually by people who want their own virtual co-located server that they have complete control over:



There's several companies that offer this kind of service. Here's a list of some of them:

   linode.com
   setnine.com
   rosehosting.com
   mirroredsolutions.com

The only company out of these I have any experience with is linode.com and I haven't had any problems with their service. The instructions that follow assume you went with linode... (Of course, none of the instructions that follow require you to have a virtual server at all- If you want to set up a "real" server, that's fine, too!)

Setting Up Linux on Your Server

Alright, so once you have bought your virtual server (which runs 30 bucks at linode.com to start with) they will give you a static IP address and a way to configure your new server with an operating system. In our case, we want to install Debian linux as our opertaing system. Debian linux is great for configuring stuff like this, because it has the powerful apt-get command that will download and install software for you of the net with a minimum of hassle.

To install Debian on your server, (assuming linode.com) login at linode.com and go to the "Distro Wizard" tab. Choose the Debian disk image, set the disk size (1000MB is plenty), create a root password and install the distro. Next, go to the "Overview" page and click on the boot button to start the server. You now have a basic Debian machine set up, waiting for you to log in.

To log in, you'll need an ssh client. The easiest I know of is MindTerm, a java applet that you can run without installing any software. Just type in your server's IP address and your root password, and you should be logged in to your brand-new linux server:



Excellent!

NEXT >>