Send to Printer

smalltalk

Getting this Server Running

December 30, 2009 19:02:41.898

Smalltalk

One thing that a few people have expressed interest in already is this: what did I need to do to get this server running Smalltalk? Well, the first step involved some basic investigation: where could I find affordable VPS hosting? After looking around, I settled on slicehost for that (click here to sign up) - they have decent rates, the reviews I found looked positive (at least one of the inexpensive alternatives, which will remain nameless, had horrid reviews).

Before I go further, I should explain why I had to look into VPS (Virtual Private Server) or a Dedicated root server. If you run typical web software, it fires off a new instance every time a request is made; Smalltalk isn't like that. You have your Smalltalk image running all the time, listening on a port. So if you pick a hosting service that charges for CPU time, you'll get hit on that.

Anyway, I asked around about domain registrars, and got referred to GoDaddy - that was simple, although boy oh boy - do they ever want to upsell you on things :) Once I got that and slicehost set up, I needed to set the DNS records up - this post walked me through that easily. With that out of the way, a few things remained:

  • Getting Smalltalk onto the slicehost server
  • Getting the specific packages for my blog server onto the slicehost server
  • Setting up the Apache configuration (installing Apache first)

The first two were simple: I used a combination of wget and scp to transfer files up to my server, and then copied them into the directories I wanted them in. I set up a non-root user to run the Smalltalk server, and gave that user ownership of the appropriate directories, so that I didn't need to operate as root. Then I edited my files for the new setup, and started the server on a specific port. At this point, my Smalltalk server wouldn't start, telling me that the file (VM) didn't exist. This seemed strange; then I realized that I had a 32 bit VM and a 64 bit server. So, off to install the 32 bit libs:

sudo apt-get install ia32-libs

A minute or so later, the VM started fine, and doing this (not the port I'm using, btw) worked:

http://www.myNewDomain.com:12345/blog/blogView

Now I wanted to get rid of the port number in that url. With some help from Steve Rees, I did the following two things:

set up symlinks for the necessary mod-proxy load files in:

  • /etc/apache2/mods-available in /etc/apache2/mods-enabled
  • copied proxy.conf up out of the mods-available dir and into /etc/apache2
  • Edited that file:


 ProxyRequests On

        <Proxy *>
                AddDefaultCharset off
                Order deny,allow
                Deny from all
                Allow from .myNewDomain.com
        </Proxy>

Then, in httpd.conf (same directory), I added the following:


<Location /blog>
ProxyPass http://127.0.0.1:12345/blog
ProxyPassReverse http://127.0.0.1:12345/blog
</Location>

At which point, the base url, http://www.jarober.com/blog/blogView worked. And that was it - other than getting some files that I forgot to copy over the first time, it all worked fine.

So the bottom line? Getting a Smalltalk based server running on the net is pretty simple now, and not at all expensive. Over the next few years, I expect the price for VPS to drop even more, so it's only going to get easier. So if you're a Smalltalker and want to get your app running out on the net - just go do it :)

Technorati Tags: , ,

posted by James Robertson

Comments

Re: Getting this Server Running

[Travis Kay] December 31, 2009 3:45:07.606

I have used slicehost in the past with no complaints. The last few years my friends and I have run about a dozen vms from www.linode.com and haven't looked back (unless I needed windows). It's nice to see you have your own domain now.

 Share Tweet This