-
Notifications
You must be signed in to change notification settings - Fork 21
Windows Local Setup
- GitHub
- WAPP Stack- this software stack has postgres built in
Step 1. Clone this repository using Github.
Step 2. Open C:\BitNami\wappstack-5.4.10-0, double click use_wappstack.bat and create a postgres DB named transitscreens
createdb -O postgres -h localhost -U postgres transitscreens
Step 3. Load the schema (schema.sql) into the DB
psql -d transitscreens -U postgres -f C:\Users\Wherever\You\Put\TransitScreen\schema.sql -h localhost
Step 4. Create a TransitScreens user Currently there is no user creation facility, so you will have to add an administrative user by hand (or using your favorite DB admin tool).
4.a. Log into Postgres with
psql -U postgres -h localhost -W transitscreens
and your postgres password.
4.b. Now create a transitscreens login password and md5 hash it. This website will generate a md5 hash when you type it in.
4.c. Now in the Postgres interface:
INSERT INTO users (id,email,password,admin) VALUES (1, 'email@domain','md5(password)','t');
4.d. to check the table and see the user exists:
table users;
4.e. then quit with \q
Step 5. Add your postgres password xxxxxxxxxxx to application/config/database.php
Step 6. In application/config/config.php change the following:
//$config['base_url'] = 'http://' . $_SERVER['SERVER_NAME'] . '/Transit-Screen/';
$config['base_url'] = 'http://localhost/';
Step 7. Set WAPP to serve from the TransitScreen directory.
Edit C:\BitNami\wappstack-5.4.10-0\apache2\conf\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/
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.
Additionally you will need to make sure that whatever editing software you are using is capable of maintaining the Mac/Unix style line endings. See this for details.