Skip to content
This repository has been archived by the owner on Aug 16, 2019. It is now read-only.

OSX Local Copy Setup

mmcguinn edited this page Jun 5, 2012 · 6 revisions

This page contains instructions for setting up a local copy of the iSENSE website on OSX.

Installing Local Copy (OSX 10.6 Snow Leopard)

Enabling the built in WebServer

  1. Open System Preferences ( Apple Icon -> System Preferences)
  2. Click on Sharing
  3. Click the box next to “Web Sharing” so that it checked to be on.
  4. Click the link to where it says “Your computer’s website is available here.” Verify content is displayed properly here. This will be some stock “It works!” page.

Install MacPorts

  1. Follow these Instructions. Make sure you meet the requirements.
  2. If you didn’t read the above links, you will have trouble installing if you don’t have xcode. Install XCode somehow (Download it, find your osx dvd, etc).

Install Mongo

  1. Sudo port install mongodb
  • Please Note: Doing this took roughly forever to install the “boost” C++ Libraries for threading. Not sure why. Please report back if you encounter this as well.
  1. Paying attention to the install log will yield the following command.
    “sudo port load mongodb” Type this command to automatically start mongodb on boot.

Enable PHP

  1. Open /etc/apache2/httpd.conf
  2. Uncomment the Line "#LoadModule php5_module libexec/apache2/libphp5.so" (delete the #)
  3. Restart apache: sudo apachectl -k restart

Install MySql

  1. Go here and grab the 64 bit 10.6 dmg IF YOUR ON 10.6
  2. Install that
  3. If that link seems to be weird as it is for me. Here is a direct link http://mirror.services.wisc.edu/mysql/Downloads/MySQL-5.5/mysql-5.5.19-osx10.6-x86_64.dmg
  4. export PATH=$PATH:/usr/local/mysql/bin

Install PECL

Generic Instructions exist, however, to install for OSX:

  1. download http://pear.php.net/go-pear.phar
  2. php -d detect_unicode=0 go-pear.phar
  3. add pecl to your PATH
  4. export PATH=$PATH:/Users/<youruser>/pear/bin/

Install mongodb php extensions

  1. sudo pecl install mongo
  2. append extension=mongo.so to /etc/php.ini
  3. restart apache: sudo apachectl restart

Populate those databases

  1. To grab a current backup of the databases, run ~cadorett/bin/dumpdb on the remote isense server. This will create a “dbdump” folder in your home directory.
  2. Transfer this to your local machine
  3. on local, scp -r <user>@isense.cs.uml.edu:~/dbdump ~/
  4. mysql -u root < ~/dbdump/fullsql.sql
  5. mongorestore ~/dbdump/dump

Fill in your .xmls

  1. copy production-default.xml and debugging-default.xml to production.xml and debugging.xml respectively
  2. fill in: database -> pass

Allow redirection in apache2

  1. Edit /etc/apache2/httpd.conf and find the “AllowOverride” directive inside the <Directory /Library/WebServer/Documents> tag.
  2. Change “AllowOverride none” to “AllowOverride All”

TODO: Information about apache permissions TODO: Smarty requires write permissions from the server