Difference between revisions of "Archive:Website documentation"

From FreeCulture.org
Jump to: navigation, search
(Chapter hosting)
(The Mysterious Front Page)
Line 16: Line 16:
How does the actual FreeCulture.org homepage get produced?  What does everyone see when they visit http://freeculture.org ?
How does the actual FreeCulture.org homepage get produced?  What does everyone see when they visit http://freeculture.org ?
* Crontab runs /www/front.sh
* XXCrontab runs /www/front.shXX (There is no longer a front page cron job)
* front.sh does this:
* front.sh does this:
  cp /home/freecult/public_html/index.html /home/freecult/tmp/fc-backup.html
  cp /home/freecult/public_html/index.html /home/freecult/tmp/fc-backup.html

Revision as of 18:44, 7 October 2007

Mailing lists

We use Mailman to manage our lists. Here are some links you might like:


We use cron to run tasks every once in a while. To see the current list of jobs that run, do:

crontab -l

To edit them:

crontab -e

To see what the file format is, read this reference.

The Mysterious Front Page

How does the actual FreeCulture.org homepage get produced? What does everyone see when they visit http://freeculture.org ?

  • XXCrontab runs /www/front.shXX (There is no longer a front page cron job)
  • front.sh does this:
cp /home/freecult/public_html/index.html /home/freecult/tmp/fc-backup.html
php -q /home/freecult/public_html/lib/frontpage.php > /home/freecult/public_html/index.tmp.html
mv /home/freecult/public_html/index.tmp.html /home/freecult/public_html/index.html
  • In plain English, what front.sh does:
    • Step 1: Because everyone loves backups.
    • Step 2: Because we need to regenerate it, so we output it to a temp file.
    • Step 3: We use a temp file to make sure that, while the page gets regenerated, no one who hits the front of freeculture.org gets a half-generated page. (So now we move it into the real place.)
  • Ultimately, the front page resides at index.html, as one might expect. But it appears that you'll need to edit frontpage.php to make any changes.


The planet program lives in ~/planet-prog/. It outputs to ~/public_html/planet/ via an every-30m cron job.


There are two planets. They share the same Python code; they just have different config.ini directories:

  • ~/planet-prog/people-planet/config.ini
  • ~/planet-prog/chapters-planet/config.ini

Add people's RSS feeds to those config files. For the people Planet, add people's mini-photos in ~/public_html/planet/images/ and adjust the config.ini as appropriate. For the chapters Planet, I have no idea.

Upgrading "planet"

You could try upgrading it using "bzr". I wouldn't try it without backing up ~/planet-prog/. I expect it to clobber ~/planet-prog/examples/fancy/config.ini.


LiveJournal, for example, has broken RSS feeds that sometimes give the wrong Last-Modified-Date. So you might need to ask Planet to redownload the whole feed.

According to ~/planet-prog/examples/fancy/config.ini , Planet stores its cache in ~/planet-prog/cache/ . So to delete the whole cache:

rm ~/planet-prog/cache/*

In that directory, you can choose to remove just a single cached feed. The names make it clear which one is which.


Every domain we own or run is listed at Domains.

Calendar publishing

We use phpicalendar. If everyone working on the national level shares their calendars with each other, it becomes much easier to schedule meetings at mutually convenient times (instead of playing calendar battleship... "are you free at 3pm?" "No." "How about 4pm?" "You sunk my battleship! You bastard!").

As a user

  1. Set your calendar client to synchronize to http://freeculture.org:8080/calendars/YOURNAMEHERE.ics
    • You will need to use a username/password pair special to the calendar stuff assigned to you by the web team
    • Be SURE you use a file with your name in it. Otherwise you run the risk of others overwriting your data, and vice-versa!
  2. Check on http://freeculture.org/cal/ that your calendar appears

As a sysadmin

  • Apache2 runs the WebDAV service; its configuration is in /etc/apache2/
  • htpasswd file in ~freecult/passwords/calendar-htpasswd
  • calendar files stored in ~freecult/public_html/database/calendars/
  • to change someone's password, or create a user, do:
htpasswd  /home/freecult/passwords/calendar-htpasswd USERNAME



We have a secret gmail account, freeculture.org at gmail dot com, that receives copies of the email sent to freedom, newgroup, and media. This was built to solve [1].

Because each of those email addresses is a separate account, they have a .procmailrc in their $HOME that reads:

! the.gmail.address.i.listed.above@example.com

The "c" stands for copy. That's key - they stay in the IMAP box.


Creating a new list

  1. Go to http://lists.freeculture.org/
  2. Click for "the list admin overview page"
  3. Click to "create a new mailing list"
  4. Like, create one.




  • You can use PHPMyAdmin to view our databases.
  • You must log in using the username and password the web app itself uses, which you must fish out of the configuration for said app.

Chapter hosting

Wiki farm

  • To create a new wiki, do this:
    • ssh to freeculture.org
    • cd software/fco-svn/mediawiki-cloning/
    • python clone.py /home/freecult/chapter-hosting/wiki/LocalSettings.php
    • Take note of the username etc. it prints
    • In a new window, cd chapter-hosting
    • cp -a skeleton $college
    • cd $college/wiki/
    • nano -w LocalSettings.php
    • Update LocalSettings.php to have the right DB config info
    • Update LocalSettings.php to have the right Wiki name
    • Become root
      • cd /etc/apache/conf.d/
    • svn cp 200-umich.conf 200-$college.conf
    • sed -i s/umich/$college/g 200-$college.conf
  • NOTE: These wikis don't have any sort of smart OpenID setup.

Lyceum (WordPress farm)

  1. Log in as admin at freeculture.org/lyceum
  2. Create a blog for that user
  3. ssh to freeculture.org
  4. Become root
    • cd /etc/apache/conf.d/
    • svn cp 200-uf.conf 200-$college.conf
    • sed -i s/uf/$colege/g 200-$college.conf
    • /etc/init.d/apache reload

That should be "all".

Moving an existing wiki to the farm

Prepare DB

  • First get a SQL dump
    • As per this warning, use --default-character-set=latin1 for really old wikis.
  • Then create a new DB
  • Then use the mysql CLI to import the dump
  • Then delete the SQL dump!

Prepare MW

  • move AdminSettings.sample into AdminSettings.php
  • Edit LocalSettings.php to be similar to the old one, but with the current DB
    • NOTE: If you did --default-character-set=latin1 for the mysqldump, you will want to set $wgDBmysql5=false in LocalSettings.php.
  • Comment-out the define("MW_INSTALL_PATH") at the top
  • Set IP to ~/chapter-hosting/$chapter/wiki/
  • cp -a ~/software/mediawiki/maintenance .
  • php maintenance/update.php maintenance/refreshLinks.php

Good! If it said it worked, then:

  • rm -rf maintenance
  • mv AdminSettings.php AdminSettings.example
  • edit LocalSettings.php and re-enable the define("MW_INSTALL_PATH")
  • Copy their old logo into ~/chapter-hosting/$chapter/files/fcWikiLogo.png
  • Remove the "#" before the $wgLogo setting in LocalSettings.php

Prepare Apache

  • Do the usual Apache preparation as per chapter hosting in general.


Checking out


  • Just do "svn commit"!
    • But you must be a registered user first, see below!

Adding users

  • Log in to the freeculture.org server, and do:
htpasswd /home/freecult/subversion-repository/conf/htpasswd YOUR_USERNAME
    • Your password will not be encrypted when sent across the Internet, so keep that in mind when picking the password.



Asheesh set up 'dirvish' and configured his work desktop to pull the backups from the fco vserver.