Install and Configure Scheme ---------------------------- * Download DrScheme http://download.plt-scheme.org/drscheme/ * Double click on the plt-372-bin-ppc-osx-mac.dmg file * With the mouse, copy the folder "PLT Scheme v372 file" to the Applications folder Install and Configure PostgreSQL --------------------------------- You can get the latest version of PostgreSQL (8.3 as of this writing) from here: http://www.postgresql.org/ * Become the root user, so you don't have to type sudo in front of every command $ su root * Create a postgres user. This will be the user that one's all of the postgres processes: [Need to review this] * Create a src directory for the PostgreSQL source code. I made mine in /usr/local/src: $ mkdir /usr/local/src * Copy the postgreSQL tarball to the src directory: $ cp ~/Desktop/postgresql-8.3.0.tar.gz /usr/local/src * Unzip and untar the postgreSQL tarball: $ tar xzvf postgresql-8.3.0.tar.gz * Configure, make, and then the install the postgreSQL package. This will build the postgres binaries and install them to their default locations. $ cd postgresql-8.3.0 $ ./configure --with-includes=/sw/include/ --with-libraries=/sw/lib\ $ make $ make install * Make a directory for your database cluster $ mkdir /usr/local/pgsql/data * Change the ownership of the directory to the postgres user $ chown -R postgres /usr/local/pgsql/data * Create a new PostgreSQL database cluster (or database system). A database cluster is a collection of databases that are managed by a single server instance: $ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data * Add these lines to your .bashrc (or the equivalent file for whatever shell you're using): export PGDATA=/usr/local/pgsql/data PATH=$PATH:/usr/local/pgsql/bin Create the database -------------------- $ createdb wishforge; CREATE DATABASE * As the postgres user, start up the postmaster process $ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start * You can verify that the database has been created correctly by starting up the psql process and running the \l command: $ psql postgres=# \l List of databases Name | Owner | Encoding -----------+----------+----------- postgres | postgres | SQL_ASCII template0 | postgres | SQL_ASCII template1 | postgres | SQL_ASCII wishforge | postgres | SQL_ASCII (4 rows) * Create the tables $ psql -f wishforge.sql wishforge * To verify that the table has been created: $ psql postgres=# select table_name from information_schema.tables where table_schema='public' and table_type='BASE TABLE'; table_name ------------ users (1 row) To view all the fields in a table: postgres=# \d users Table "public.users" Column | Type | Modifiers ------------+------------------------+----------- login | character varying(256) | password | character varying(32) | first_name | character varying(256) | last_name | character varying(256) | email | character varying(256) | phone | character varying(256) | addr1 | character varying(256) | addr2 | character varying(256) | city | character varying(256) | state | character varying(256) | zip | character varying(256) | country | character varying(256) | * Create user "crasch" postgres=# create user crasch with password 'xxxxxxx'; CREATE ROLE To view all users: postgres=# \du List of users User name | User ID | Attributes | Groups -----------+---------+----------------------------+-------- crasch | 16422 | | {} postgres | 10 | superuser, create database | {} (2 rows) Install Wishforge code ---------------------- * Create a Projects directory in your home directory $ cd ~ $ mkdir Projects * Create a wishforge directory. $ cd Projects $ mkdir wishforge * Check out the code with SVN: $ svn co http://svn.wishforge.org/wishforge/ Configure Apache ---------------- * Create the DocumentRoot, cgi-bin, and icon directory: $ mkdir ~/www.wishforge.com ~/www.wishforge.com/cgi-bin ~/www.wishforge.com/local-icons * Symlink index.html to wishforge.html in the DocumentRoot direcotry: $ ln -s ~/www.wishforge.com/index.html ~/www.wishforge.com/wishforge.html * Edit /etc/httpd/httpd.conf $ sudo vim /etc/httpd/httpd.conf * Change this line: ScriptAlias /cgi-bin/ "/Users/crasch/www.wishforge.com/cgi-bin/" ...to this: ScriptAlias /cgi-bin/ "/Library/WebServer/CGI-Executables/" And change this: DocumentRoot "/Library/WebServer/Documents" ...to this: DocumentRoot "/Users/crasch/www.wishforge.com" Restart Apache: $ apachectl restart Links ----- Install PostgreSQL http://developer.apple.com/internet/opensource/postgres.html Apache Web-Serving with Mac OS X: Part 1 http://www.oreilly.com/pub/a/mac/2001/12/07/apache.html