Support/SUMO install process

This document explains how to install a fresh checkout of SUMO on your server.

Note: Currently SUMO only works well if set up at the root of the domain. You may experience layout or links issues if your setup is different.

Note2: The instructions below have not been tested on a Windows machine.

Requirements

  • An up-to-date version of LAMP/MAMP/WAMP stack
    • PHP 5+ preferred, but PHP 4 may do (untested)
  • php-memcache and memcached for Memcache use (can be enabled from the admin->features panel)
  • Sphinx search engine installed for SUMO tiki-newsearch.php (preferred to older search). See Support/Sphinx_Installation
  • SUMO must be installed in the root of a domain (eg: example.com/ and not example.com/sumo/).

Check out SUMO

Start with a fresh checkout of trunk

svn co https://svn.mozilla.org/projects/sumo/trunk/ sumo

Configuration files and scripts

Now create the required configuration files:

cd sumo

To enable sphinx search:

cp scripts/sphinx/search.conf.php.dist scripts/sphinx/search.conf.php

To enable showfor: (without this, knowledge base pages may show up blank)

cp scripts/showfor/config.php.dist scripts/showfor/config.php

To enable minify: (without this, pages may show up without CSS and JS)

cp scripts/minify/minify.conf.php.dist scripts/minify/minify.conf.php

We provide a default minify.conf in webroot/files, but this requires memcache settings to be defined in webroot/db/local.php. For an example of this, see $memcached_* variables in webroot/db/local.php.dist.

Currently, when running this on multiple webheads, the administration switch to enable/disable minify (bug 502092) does not work. The WebDev team is working with IT to find a workaround. Until then, to ensure your site does not break when multiple webheads are present, you should ensure that apache cannot write to webroot/files/minify.conf.

For example:

sudo chmod 775 webroot/files/minify.conf

Here you must configure the databsase user, host, pass, etc. To set up the database connection:

cp webroot/db/local.php.dist webroot/db/local.php
vim webroot/db/local.php

$host_tiki='localhost'; // change this to your host
$user_tiki='mysqluser'; // change this to your db user
$pass_tiki='mysqluserpw'; // change this to your db password
$dbs_tiki='mysqldbname'; // change this to your db name

Now create the templates directory for Smarty:

cd webroot
./setup.sh root apache 02777

Depending on your permissions, the output of setup.sh will explain which specific command you need to run. The example above is used for our setup on the production site.

Finally, to set up URL rewrites: (in ./webroot)

./htaccess.sh

To log in as an admin, you may use the user/pass: admin/admin on a clean schema. If you're using a dump, you can change the `password` column to 'admin' in the users_users table for the user 'admin' and then log in.

All-in-one code

svn co https://svn.mozilla.org/projects/sumo/trunk/ sumo
cd sumo

# To enable sphinx search:
cp scripts/sphinx/search.conf.php.dist scripts/sphinx/search.conf.php

# To enable showfor: (without this, knowledge base pages may show up blank)
cp scripts/showfor/config.php.dist scripts/showfor/config.php

# To enable minify: (without this, pages may show up without CSS and JS)
cp scripts/minify/minify.conf.php.dist scripts/minify/minify.conf.php

# On *nix based systems, you must allow permissions for the server scripts
# (often apache/www-data user) to write to minify.conf

# For example:
sudo chmod 775 webroot/files/minify.conf

# Here you must configure the databsase user, host, pass, etc. To set up the database connection:
cp webroot/db/local.php.dist webroot/db/local.php
vim webroot/db/local.php

# Now create the templates directory for Smarty:
# Depending on your permissions, the output of <code>setup.sh</code> will
# explain which specific command you need to run. The example below works
# for our production site
cd webroot
./setup.sh root apache 02777

# Finally, to set up URL rewrites, in ./webroot
./htaccess.sh

Database setup

We set up a clean schema in bug 502089.

  • To use Sphinx search, enable it at tiki-admin.php?page=features
  • To use Memcache, enable it at tiki-admin.php?page=features
  • To use Minify, enable it at tiki-admin.php?page=general

Common Issues

  • If Memcached is not installed, you may need to run the following at the command line:
echo "d" > webroot/files/minify.conf

More information

If you would like more information, you can contact the SUMOdev team at sumo-dev[at]mozilla[dot]com