I'll assume you've already installed Apache and now want to install Gemstone behind it as a Seaside server. Let's install a few things that we're going to need later, just to get the dependencies out of the way. Login to your server/workstation as an admin user, someone who can sudo.
sudo aptitude install bc zip build-essential apache2-threaded-dev ia32-libs
Now let's setup the user we're going to run Gemstone under.
sudo adduser glass
Add him to the admin group so he can sudo.
sudo usermod -a -G admin glass
Login as this user.
su glass cd
Download Gemstone and install it.
wget http://seaside.gemstone.com/scripts/installGemstone.sh chmod +x installGemstone.sh ./installGemstone.sh
Download some init scripts so we can setup Gemstone as a service rather than manually starting it.
wget http://onsmalltalk.com/downloads/gemstone_initd_scripts.tgz tar xf gemstone_initd_scripts.tgz
Edit each of these scripts and change the line RUNASUSER=USER to RUNASUSER=glass and change the first line to #!/bin/bash instead of #/bin/sh as the Gemstone scripts need bash and Ubuntu changed the bin/sh link to point to dash instead of bash which won't work.
Install the init scripts. There's a shorter way to write these, but it will fit better on the blog if I do each one separately.
sudo mv gemstone_initd_scripts/gemstone /etc/init.d/ sudo mv gemstone_initd_scripts/gs_fastcgi /etc/init.d/ sudo mv gemstone_initd_scripts/netldi /etc/init.d/ chmod a+x /etc/init.d/gemstone chmod a+x /etc/init.d/gs_fastcgi chmod a+x /etc/init.d/netldi sudo chown root:root /etc/init.d/gemstone sudo chown root:root /etc/init.d/gs_fastcgi sudo chown root:root /etc/init.d/netldi sudo update-rc.d gemstone defaults sudo update-rc.d gs_fastcgi defaults sudo update-rc.d netldi defaults
Start just the gemstone and netldi services.
sudo /etc/init.d/gemstone start sudo /etc/init.d/netldi start
Grab GemTools and fire it up. I'm installing on my local machine so I can just fire this up here; if you're installing on a remote server, refer to my previous post about setting up X11Forwarding and running GemTools on a remote host.
wget http://seaside.gemstone.com/squeak/GemTools-1.0-beta.8-244x.app.zip unzip GemTools-1.0-beta.8-244x.app.zip GemTools-1.0-beta.8-244x.app/GemTools.sh
Edit the connection to point at localhost and login to Gemstone and open Monticello; open the MetacelloRepository; load either ConfigurationOfSeaside28 or ConfigurationOfSeaside30. I'm still on 2.8 so that's what I'm loading. If you're going to load 3.0, you'll need to edit the gs_fastcgi script accordingly as it's built to startup 2.8. Just change the DAEMON line to runSeasideGems30 instead of runSeasideGems.
Click the admin button on the gem launcher and check commit on almost out of memory option (just in case loading anything takes up too much temp space), then run ConfigurationOfSeaside28 load in the workspace. Once Seaside is loaded, we can continue and start up the Seaside gems.
sudo /etc/init.d/gs_fastcgi start
Next we need to setup Apache to be able to use FastCGI and enable a few modules we'll need and will need to first build the FastCGI module.
wget http://www.fastcgi.com/dist/mod_fastcgi-current.tar.gz tar zxvf mod_fastcgi-current.tar.gz cd mod_fastcgi* cp Makefile.AP2 Makefile make top_dir=/usr/share/apache2 sudo make install top_dir=/usr/share/apache2 echo "LoadModule fastcgi_module /usr/lib/apache2/modules/mod_fastcgi.so" > fastcgi.load sudo mv fastcgi.load /etc/apache2/mods-available/ sudo a2enmod fastcgi expires proxy proxy_http proxy_balancer deflate rewrite
And fix the host file so FastCGI doesn't wig out over the ip6 address you're not even using.
sudo nano /etc/hosts
Comment out ipv6 line like so.
#::1 localhost ip6-localhost ip6-loopback
Now create a configuration for the site.
sudo nano /etc/apache2/sites-available/gemstone
Using the below config and modifying where necessary.
Make a few symbolic links for those www directories, FastCGI seems to want these to all be different and Apache will complain if they don't actually exist.
sudo ln -s /var/www /var/www1 sudo ln -s /var/www /var/www2 sudo ln -s /var/www /var/www3
And enable the new site and restart Apache.
sudo a2ensite gemstone sudo /etc/init.d/apache2 restart
Hopefully you've gotten no errors at this point and you can navigate to http://yourMachineName/seaside/config and see that everything is working. Gemstone is now installed as a service, as is netldi and the Seaside FastCGI gems, and they'll start up automatically when the machine starts.
I'm not thrilled with running the Seaside gems this way because if they die nothing will restart them. I'll be following up later with a post on running the Seaside gems and maintenance gem under Monit which will ensure they're restarted should a gem crash for any reason. Gemstone itself and netldi I'm not worried about and this approach should work fine.
Since I did this on my workstation which already had apache installed as well as other things I run, I may have missed a dependency or two that I already had installed and didn't notice. If the above procedure doesn't work for you for any reason, please let me know what I overlooked.