Creating a occupyboston.org Development Environment: Difference between revisions

From wiki.occupyboston.org
Jump to navigation Jump to search
Line 7: Line 7:
cd occupyboston.org
cd occupyboston.org
git init
git init
git remote add origin occubos@boggs.mayfirst.org
git remote add origin occubos@boggs.mayfirst.org:/home/members/occupyboston/sites/occupyboston.org/users/occubos/occupyboston.org/include/site_hub
git fetch origin
git fetch origin
git merge origin/master
git merge origin/master

Revision as of 16:18, 19 April 2012

Creating a occupyboston.org development environment

Work in Progress - Not Yet Complete

Obtaining the Source

mkdir occupyboston.org
cd occupyboston.org
git init
git remote add origin occubos@boggs.mayfirst.org:/home/members/occupyboston/sites/occupyboston.org/users/occubos/occupyboston.org/include/site_hub
git fetch origin
git merge origin/master

The "occupyboston.org" directory will be your document root.

Setup a Virtual Host

Add an IP/hostname mapping to your hosts file (e.g., /etc/hosts). For example:

 127.0.0.1     occupyboston.local

Add a virtualhost to your web server. For example:

 <VirtualHost localhost:80>
   ServerName occupyboston.local
   DocumentRoot /PATH/TO/occupyboston.org/
 </VirtualHost>

Create a Database

Run

$ mysql -uUSERNAME -p
mysql> create database occubos_wp;
mysql> exit

Configuration Setup

 cd occupyboston.org   # this is the document root
 mv wp-config-sample.php wp-config.php


Configuration Changes

Edit the wp-config.php file; focus on the below lines.

define('DB_NAME', 'database_name_here');

/** MySQL database username */
define('DB_USER', 'username_here');

/** MySQL database password */
define('DB_PASSWORD', 'password_here');

Modify 'database_name_here', 'username_here', 'password_here' to the correct values above.

Additional Setup for Plugins

We enable several MediaWiki plugins, and some of these plugins require additional database tables. To install the additional database tables:

cd mediawiki
php maintenance/update.php

At this point, you should be able to create and edit pages in your development environment.


Miscellaneous Notes

If you'd like to look at boggs server configuration for wiki.occupyboston.org, you'll find it in ~obwiki/wiki.occupyboston.org/.red/apache2.

The live document root is ~obwiki/wiki.occupyboston.org/web/mediawiki/. Note that this is a checked out copy of git repository.