Personas/Dev Setup

From MozillaWiki
Jump to navigation Jump to search

Requirements

  • basic LAMP stack with gettext support
  • MySQL Database
  • ImageMagick - to resize uploaded images

Procedure

  1. Checkout http://svn.mozilla.org/projects/getpersonas.com/trunk/ from svn
  2. Create a database for personas
    1. Cleaned db dump here: http://people.mozilla.org/~rdoherty/personasdump.sql.zip
  3. Copy server/lib/personas_constants.php.dist to server/lib/personas_constants.php
  4. Edit server/lib/personas_constants.php with
    1. database username, password and name - for slave and master
    2. PERSONAS_BASE_URL should be the url to access your dev install
    3. PERSONAS_CDN_HOST should be http://PERSONAS_BASE_URL
  5. Copy server/localhttpd-dist.conf to the apache conf for your dev install (probably best to create a VirtualHost)
  6. Change '/path/to/personas/' in the text you just copied to the full path to where you checked out the svn repository.
  7. Restart apache
  8. Profit!

Example Apache VirtualHost

  • DocumentRoot and Directory should both reference the top-level directory where you checked out the site (ie. trunk)
    • Replace /Users/username/Projects/getpersonas.com/trunk in the example below
  • Remember to add an entry in your hosts file matching ServerName and/or ServerAlias
<VirtualHost *:80>
    ServerAdmin "personas@localhost"
    DocumentRoot "/Users/username/Projects/getpersonas.com/trunk"
    ServerName getpersonas.com.localhost
    ServerAlias www.getpersonas.com.localhost
    ErrorLog  "/path/to/log/folder/getpersonas.com.localhost-error_log"
    CustomLog "/path/to/log/folder/getpersonas.com.localhost-access_log" common


     <Directory "/Users/username/Projects/getpersonas.com/trunk">
         Options Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
         AllowOverride All
         Order allow,deny
         Allow from all
     </Directory>
</VirtualHost>