This is a static copy of the main wikispot.org site, preserved for historical purposes only. Please see this page for more information.

How to Install/OS X

InfoInfo
Search:    

Say you want to do a quick and dirty install on Mac OS X. Here's a guide to get you there.

SQLite Install (and general instructions)

First of all, you installed the Xcode tools from Apple, right? You need gcc, after all.

If you don't have fink, you'll want to go install that now.

  1. Go to [WWW]http://www.finkproject.org/, and download that package.

  2. If you're running 10.5, they don't have a binary yet, and you'll need to download the source. Compile it, and tell it to install in the /sw directory where it will be happiest. This step will take an hour or two.

  3. If you set up the unstable branch, you'll be able to get a new version that works better with 10.5.

  4. They have a binary now, it should work fine.

Type fink install pil-py25 to install the Python Imaging Library. Fink will also want to install a new copy of python in the /sw/bin directory. Go ahead and let it.

cd /usr/bin
sudo rm python
sudo ln -s /sw/bin/python2.5 python

(this assumes you're using python2.5, change the numbers to use a different version)

Cool. Now we can download the SQLite branch of sycamore using subversion.

  1. cd /Library/WebServer/Documents

  2. svn co http://svn.devjavu.com/sycamore/branches/sqlite sycamore_base

  3. As a default, Apache is set up to serve using the account www. As a result, you'll need to run: sudo chown -R www sycamore_base

Next up, let's build the database. This is extremely easy for SQLite.

  1. cd sycamore_base/Sycamore

  2. sudo python buildDB.py should work, if you set up python correctly with PIL

Okay, now it's time to set up Sycamore.

  1. Open sycamore_base/share/sycamore_config.py for editing — preferably with a program you can call using sudo to give you access to save changes.

  2. Given our relatively simple setup, set url_prefix = '/sycamore_base/share/web/wiki' and relative_dir = 'sycamore_base/share/web/index.cgi'. This will allow us to use Apache with pretty much minimal setup.

  3. Note: you don't really have to change any of the other setup values, like wiki name, because much of that is handled by the website's settings page.

Now we need Apache to serve our files, and actually execute sycamore scripts rather than treating them as files.

  1. Go to System Preferences, and open the Sharing control panel. Turn on Web Sharing, if it's not already on.

  2. *Sigh*, we're back to the command line. Now you need to open your httpd.conf file for editing. The one you should be using is at: /private/etc/apache2/httpd.conf. You'll need to uncomment (remove the hash mark) from AddHandler cgi-script .cgi first.

  3. Then add this at the bottom of the httpd.conf:

<Directory "/Library/WebServer/Documents/sycamore_base/share/web">
    Options +ExecCGI
</Directory>

  1. Save, and return to the command line. You'll need to restart apache now, so type sudo apachectl graceful to make it reload the config file.

Theoretically, this should all be working now. Open your browser, and point it to [WWW]http://localhost/sycamore_base/share/web/index.cgi.

Your ghetto install of sycamore is now complete, and you can proceed to hack the code to your heart's desire. This is not intended to be a fast install for multiuser use. Without Xapian, memcached, and a real database, sycamore will run quite a bit slower.

PostgreSQL installation differences

Instead of getting the sqlite branch, you might as well get the trunk (main). Into the command line enter you:

Download PostgreSQL, if you don't already have it. You can get if from fink, but compiling it takes a long time; it's faster to get a binary.

  1. Download the OS X binary at [WWW]http://www.postgresql.org/download/macosx

  2. Open the PostgreSQL installer. It will alter your /etc/sysctl.conf for you (if you have something there already, see the README).

  3. Reboot

  4. Login to your computer as root (You can enable this in /Applications/Utilities/Directory Utility.app)

  5. Reopen the disk image and run the installer again.

    1. If it screws up in initializing the database, try deleting the new 'postgres' user account with the NetInfo manager (10.4) or [WWW]dscl (10.5). Then try again.

  6. You can go back to your regular account now, if you want.

  7. Run pgAdmin3.app in your Postgres folder (probably /Library/PostgresSQL/8.x). Create a new database called 'wiki' with 'postgres' as the owner.

While editing sycamore_config.py, you're going to need a few other things

  1. Set db_type = 'postgres'

  2. Set db_name = 'wiki' (the database you created earlier)

  3. Set db_user = 'postgres'

  4. Set db_user_password = to whatever you configured it as in the PostgreSQL installer.

  5. Remember, this is in addition to the settings above.

You need to install the Python's postgres library, psycopg2, before running buildDB.py

  1. In the command line, run:  fink install psycopg2-py25

This is a Wiki Spot wiki. Wiki Spot is a 501(c)3 non-profit organization that helps communities collaborate via wikis.