Creating a occupyboston.org Development Environment: Difference between revisions

From wiki.occupyboston.org
Jump to navigation Jump to search
(worked through instructions. Added additional details)
Line 1: Line 1:
= Creating a occupyboston.org development environment =  
= Creating a occupyboston.org development environment =  
= Work in Progress - Not Yet Complete =
 
== Obtaining the Source ==
== Obtaining the Source ==


Line 34: Line 34:
$ mysql -uUSERNAME -p
$ mysql -uUSERNAME -p
mysql> create database occubos_wp;
mysql> create database occubos_wp;
mysql> grant all privileges on occubos_wp.* to 'occubos_wp'@'localhost' identified by 'secret-password';
mysql> exit
mysql> exit
</pre>
</pre>
Line 41: Line 42:
<pre>
<pre>
  cd occupyboston.org  # this is the document root
  cd occupyboston.org  # this is the document root
  mv wp-config-sample.php wp-config.php
  cp wp-config-sample.php wp-config.php
</pre>
</pre>
   
   


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


<pre>
<pre>
Line 60: Line 62:
Modify 'database_name_here', 'username_here', 'password_here' to the correct values above.
Modify 'database_name_here', 'username_here', 'password_here' to the correct values above.


== Additional Setup for Plugins ==
== Web Based Installation ==


We enable several MediaWiki plugins, and some of these plugins require
Start up a web browser and enter the following URL:
additional database tablesTo install the additional database
http://occupyboston.local/If all has gone well, you'll be
tables:
redirected to http://occupyboston.local/wp-admin/install.php.  Follow
the instructions to finish the installation.


cd mediawiki
Afterwards, log into your development site via http://occupyboston.local/wp-login.php.
php maintenance/update.php


At this point, you should be able to create and edit pages in your development environment.
At this point, you'll have a wordpress installation that contains all of
the plug-ins used by occupyboston.org. 


('''TODO:''' this wordpress installation will look nothing like the occupyboston.org; need to add additional instructions for setting up themeing, etc).


== Miscellaneous Notes ==
== Miscellaneous Notes ==


If you'd like to look at boggs server configuration for
The live apache configuration is <tt>~occubos/occupyboston.org/.red/apache2</tt>. There's not much to it. .htaccess (from git) contains the bulk of the apache configuration.
wiki.occupyboston.org, you'll find it in
<tt>~obwiki/wiki.occupyboston.org/.red/apache2</tt>.
 
The live document root is
<tt>~obwiki/wiki.occupyboston.org/web/mediawiki/</tt>.  Note that this
is a checked out copy of git repository.

Revision as of 13:13, 13 May 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:/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> grant all privileges on occubos_wp.* to 'occubos_wp'@'localhost' identified by 'secret-password';
mysql> exit

Configuration Setup

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


Configuration Changes

Edit wp-config.php; 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.

Web Based Installation

Start up a web browser and enter the following URL: http://occupyboston.local/. If all has gone well, you'll be redirected to http://occupyboston.local/wp-admin/install.php. Follow the instructions to finish the installation.

Afterwards, log into your development site via http://occupyboston.local/wp-login.php.

At this point, you'll have a wordpress installation that contains all of the plug-ins used by occupyboston.org.

(TODO: this wordpress installation will look nothing like the occupyboston.org; need to add additional instructions for setting up themeing, etc).

Miscellaneous Notes

The live apache configuration is ~occubos/occupyboston.org/.red/apache2. There's not much to it. .htaccess (from git) contains the bulk of the apache configuration.