Table of Contents:

To get more extensive information about using Seaside on GemStone/S, visit the GLASS Wiki, or read Dale's and James' blogs.

If you have an existing Squeak or Pharo Seaside application, porting it to GemStone/S Seaside should be straightforward. Details are available in the wiki sections on Getting started with GLASS and the GemTools Launcher.

A GemSource code repository you can use to store GemStone/S Seaside projects is available at http://seaside.gemstone.com/ss/

If you are unfamiliar with Seaside, Pharo, or Squeak, visit seaside.st, pharo-project.org or squeak.org to get up to speed.

Installing the GemStone/S Web Edition on Linux or Mac OS X

This section covers installing the GemStone/S Web Edition to run under your own user account. These instructions are not intended for deployment, as they don't cover automatic startup on boot, setting up services to connect from other hosts on your network, or configuring Apache. The installation is done from a terminal session as a non-root user, but you'll need to be able to use sudo for some commands that require root permissions.

Download and execute installGemstone.sh script with the GemStone/S version string as an argument. For example the following downloads and installs the GemStone/S 3.1.0.1 release:

     installGemstone.sh 3.1.0.1

It automates everything you would do manually, but includes error checks that prevent overwriting any existing files or settings. If /opt/gemstone/product already exists, you should rename or remove it first. As I would suggest for any script you download, look it over before executing it. It contains comments that explain what it does.

Running the GemStone/S Web Edition

Define GEMSTONE environment variables. If you don't want to do this every time you run GemStone/S, add the command to your .bashrc.

 source /opt/gemstone/product/seaside/defSeaside

Start a netldi process, then a stone process.

 startnet
 startGemstone

Make sure everything is running OK:

 gslist -lcv

Exploring Seaside on GemStone/S

You can test Seaside by running Hyper from the command line, even though you'd normally use Apache, or start Hyper from a GemStone/S Workspace in Squeak. Note: While Hyper can be used to explore Seaside on GemStone/S, it is not suitable for serious development – that requires Apache load balanced to several GemStone VM's. Since the following command will never return, you'll need to enter ctl-C in the terminal window running Hyper to execute a soft break and regain control of the terminal window.

 startSeaside_Hyper 50081

Once Hyper is running, you can access Seaside from a web browser on that machine using the links below. Take a look at some of the open source Scriptaculous tests. Try the "effects" or "drag and drop" tabs. There is a "view source" link below each example. Play with the Pier CMS from Lukas Renggli. Note: The Seaside config username/password is currently admin/swordfish, but it will be changed to the more standard seaside/admin in the next release.

 http://localhost:50081/seaside
 http://localhost:50081/seaside/tests/scriptaculous/
 http://localhost:50081/seaside/pier/

When you're ready to shut down, enter ctl-C in the terminal window running Hyper, then stop the stone and netldi processes:

 stopGemstone
 stopnetldi

Connecting to GemStone/S from Pharo

If you want to use a Pharo image running natively on your machine, download the version of GemTools that matches your GemStone/S release. It contains everything you need to connect to GemStone/S and start developing a Seaside application – Pharo image/changes, GemStone library, even a Pharo VM. It runs on Mac OS X, Windows, and Linux.

After starting up the image update to the latest version of GemTools following these instructions.

Connecting to GemStone/S from a different machine

If you need to connect to GemStone/S from a different machine than the one it is running on, "localhost" will not suffice for a hostname. A hosts file is the simplest way on Linux or Mac OS X to specify an IP address (e.g. 192.168.1.100) to use for a hostname (e.g. frodo or frodo.example.net) without checking DNS. Note: To use this your computer must have a static IP address that never changes. Put a line like the following in /etc/hosts, substituting your real IP address and hostname:

 192.168.1.100     frodo       frodo.example.net

You will also need a way to find the netldi service port. The simplest way to achieve this is to put a line like the following in your /etc/services file. It needs to have the same name and port number on every system you want to connect from.

 gs64ldi           50377/tcp   #GemStone/S 64 Bit

It is possible you cannot connect to the NetLDI port due to firewall settings on your machine. You'll need to allow TCP access to the NetLDI port. If this doesn't make sense to you, talk to a local sysadmin, search for more complete information on the web, or read the GemStone/S System Administration Guide.

Running multiple copies of the GemStone/S Web Edition

This describes running two separate instances of GemStone/S on a single machine. This can useful if you want to have a separate GemStone/S system to experiment with, similar to running multiple Squeak images.

Make sure GemStone is shut down. Copy /opt/gemstone/product/seaside/data to another location. Make a copy of /opt/gemstone/product/seaside/defSeaside and modify it to override the GEMSTONE_NAME and GEMSTONE_DATADIR environment variables set by /opt/gemstone/product/seaside/etc/gemstone.conf.