Changes between Initial Version and Version 1 of internet_rights_workshop/setup


Ignore:
Timestamp:
Jan 17, 2009, 6:50:53 PM (17 years ago)
Author:
Daniel Kahn Gillmor
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • internet_rights_workshop/setup

    v1 v1  
     1[[PageOutline]]
     2= Setting up a development environment for the Collaborative Democracy Workshop software =
     3
     4The [wiki:internet_rights_workshop collaborative democracy workshop] uses a web application to facilitate its process.  That web application is under regular development, and we welcome contributions and collaboration from interested developers.  This page describes how to set up a development environment.  It often assumes you're running a debian-derived variant of the GNU/Linux operating system.  If you have another development environment you'd like to see documented, feel free to add instructions for that environment here.
     5
     6== setting up the dependencies ==
     7
     8Make sure you have installed subversion, php5, sqlite, and a web server of your choice (most folks use apache, but there are lots of other ways to go).  On a debian-derived system, you could do:
     9
     10{{{
     11sudo aptitude install libapache2-mod-php5 php5-sqlite subversion apache2 sqlite3
     12}}}
     13
     14== check out a working copy of the software ==
     15
     16This example puts the software in `/srv/ir`, but you can put it wherever makes sense to you (remember that the web server should be able to get to it).
     17
     18{{{
     19sudo mkdir -p /srv/ir
     20sudo chown $(whoami) /srv/ir
     21svn co https://svn.mayfirst.org/mfpl/trunk/ir /srv/ir
     22}}}
     23
     24(note that the subversion repository's TLS certificate is currently signed by the [wiki:mfpl_certificate_authority May First/People Link certificate authority], and has an SHA1 fingerprint of `1D:88:9F:17:15:A1:B1:B6:11:FD:A5:67:08:D9:89:68:BD:C8:D0:DD`)
     25
     26== setting up a name-based virtual host ==
     27
     28pick a virtual host name where this software will run, and bind it to a local loopback IP address that your web server is listening on.  I've chosen the name `ir.test`, and i'm binding to 127.0.2.1:
     29
     30{{{
     31sh -c 'echo 127.0.2.1 ir.test >> /etc/hosts'
     32}}}
     33
     34Tell your web server to respond to that hostname based on the filesystem tree found at `/srv/ir/web`.  For apache2 on debian, you can do this by putting the following file in `/etc/apache2/sites-available/ir.test` (in other distributions, you may need to insert this information elsewhere into the apache config):
     35{{{
     36<VirtualHost *:80>
     37        ServerAdmin webmaster@mayfirst.org
     38        ServerName ir.test
     39       
     40        DocumentRoot /srv/ir/web
     41        <Directory />
     42                Options FollowSymLinks
     43                AllowOverride None
     44        </Directory>
     45        <Directory /srv/ir/web>
     46                Options Indexes FollowSymLinks MultiViews
     47                AllowOverride None
     48                Order allow,deny
     49                allow from all
     50        </Directory>
     51
     52        ErrorLog /var/log/apache2/error.log
     53
     54        # Possible values include: debug, info, notice, warn, error, crit,
     55        # alert, emerg.
     56        LogLevel info
     57
     58        CustomLog /var/log/apache2/access.log combined
     59</VirtualHost>
     60}}}
     61
     62On debian systems, you would enable this virtual host with:
     63
     64{{{
     65sudo a2ensite ir.test
     66}}}
     67
     68== Create the sqlite database ==
     69
     70The sqlite database needs to be in a directory writable by the web server.  Here's a way to do that with debian:
     71
     72{{{
     73touch /srv/ir/db/db.sqlite
     74sudo chgrp -R www-data /srv/ir/db
     75chmod -R g+rwx /srv/ir/db
     76}}}
     77
     78== Setting up the configuration ==
     79
     80Now you need to configure the web application:
     81
     82{{{
     83cp /srv/ir/docs/conf.php.sample /srv/ir/conf.php
     84}}}
     85
     86Edit the contents of `/srv/ir/conf.php` to point to the correct source directory, and the actual database you've set up.
     87