Creating a occupyboston.org Development Environment: Difference between revisions

From wiki.occupyboston.org
Jump to navigation Jump to search
Line 39: Line 39:
== Configuration Setup ==
== Configuration Setup ==


<pre>
  cd occupyboston.org  # this is the document root
  cd occupyboston.org  # this is the document root
  Edit the file wp-config.php
  mv wp-config-sample.php wp-config.php
</pre>


=== Configuration Changes ===


=== Noteworthy Configuration Directives ===
define('DB_NAME', 'database_name_here');


If you'd like to use mod_rewrite, add the following to your
/** MySQL database username */
webserver's virtualhost definition:
define('DB_USER', 'username_here');


    RewriteEngine On
/** MySQL database password */
    RewriteRule ^/*$ http://obwiki.local/wiki/Main_Page [L]
define('DB_PASSWORD', 'password_here');
    RewriteRule ^/?wiki/(.*)$ /index.php?title=$1  [PT,L,QSA]
 
If you don't want to use mod_rewrite, add this line to LocalSettings.php
 
  $wgArticlePath = false;
 
You may also want to add
 
  $wgUseSquid = false;


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


== Additional Setup for Plugins ==
== Additional Setup for Plugins ==

Revision as of 19:25, 18 April 2012

Creating a occupyboston.org development environment

Obtaining the Source

mkdir occupyboston.org
cd occupyboston.org
git init
git remote add origin occubos@boggs.mayfirst.org
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

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.