Skip to content
mvs202 edited this page Mar 2, 2013 · 10 revisions

Download

Setup

Note that the code repository is TransitScreen, but the database is transitscreens.

Step 1. Clone the TransitScreen repository using Github.

Step 2. Create a postgres user named "postgres" with password xxxxxx and default port (5432)

Step 3. Run pgAdmin. Double click PostgreSQL local in the tab. Type in and save password.

Step 4. Go to SQL shell (psql). Press several times.

Create a postgres DB named transitscreens

CREATE DATABASE transitscreens;

(or from the command line)

createdb -O postgres transitscreens -h localhost -U postgres

Step 5. Load the schema into the DB

\i TransitScreen/schema.sql
psql -d transitscreens -U postgres -f schema.sql -h localhost

Step 6. Create a TransitScreens user

Step 7. Add your postgres password to application/config/database.php

$db['default']['username'] = 'postgres';
$db['default']['password'] = 'xxxxxx';
$db['default']['database'] = 'transitscreens';

Step 6. In application/config/config.php change the following:

//$config['base_url'] = 'http://' . $_SERVER['SERVER_NAME'] . '/Transit-Screen/';
$config['base_url']	= 'http://localhost:8888/';

Step 7. Set MAMP to serve from the TransitScreen directory.

Edit /Applications/MAMP/conf/apache/httpd.conf. Search for DocumentRoot and change both

DocumentRoot "/Users/Wherever/You/Put/TransitScreen"

<Directory "/Users/Wherever/You/Put/TransitScreen">

Now, the TransitScreens admin interface should be accessible at: http://localhost:8888/

Notes

MAMP logs are at: /Applications/MAMP/logs/php_error.log and /Applications/MAMP/logs/apache_error_log

In GitHub client, you will want to set it to ignore application/config/database.php and application/config/config.php because they will contain your DB password and local server name.

Clone this wiki locally