|
|
| Line 1: |
Line 1: |
| This document explains how to install a fresh checkout of SUMO on your server. | | This document only covers '''installation of the Tiki/PHP/SVN portion''' of SUMO. This will ''go away'' after 2.4. |
|
| |
|
| '''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.
| | For instructions on setting up the Django/Python/Git portion, see [http://github.com/jsocol/kitsune/blob/development/docs/installation.rst installation.rst] on [http://github.com/jsocol/kitsune Github]. |
|
| |
|
| '''Note2:''' The instructions below have not been tested on a Windows machine.
| | == Pre-requisites == |
|
| |
|
| = Requirements =
| | * PHP, MySQL, Apache, and you probably want Memcached. |
| | * PHP [http://us2.php.net/Memcache Memcache] (''not'' Memcached) extension. |
|
| |
|
| * An up-to-date version of LAMP/MAMP/WAMP stack
| | == Installation/Setup == |
| ** 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 =
| | cd /path/to/sumo |
| | svn co https://svn.mozilla.org/projects/sumo/trunk . |
| | cd webroot |
| | sudo ./setup.sh [user] [group] |
| | ./htaccess.sh |
| | cd .. |
|
| |
|
| Start with a fresh checkout of trunk
| | A few less-simple steps: |
| * [http://viewvc.svn.mozilla.org/projects/sumo/trunk/ trunk]
| | # For any <code>.dist</code> files in the <code>scripts/</code> directory (next to <code>webroot/</code>) copy them to a <code>.php</code> version in place. |
| <pre> | | # Make the <code>DocumentRoot</code> for whatever server or virtual server point to <code>webroot/</code>. |
| svn co https://svn.mozilla.org/projects/sumo/trunk/ sumo
| | # Copy <code>webroot/db/local.php.dist</code> to <code>webroot/db/local.php</code> and fill in values. <code>$gearman_servers</code> is vestigial and can be ignored. |
| </pre> | |
|
| |
|
| = Configuration files and scripts =
| | <code>setup.sh</code> should take care of most everything. If not, you might see a big red heading that says something like "not installed correctly." If there is a relevant message, do what it says. If not, look in [irc://irc.mozilla.org/sumodev #sumodev] for help. |
| Now create the required configuration files:
| |
| <pre> | |
| cd sumo
| |
| </pre>
| |
| To enable sphinx search:
| |
| <pre>
| |
| cp scripts/sphinx/search.conf.php.dist scripts/sphinx/search.conf.php
| |
| </pre> | |
| To enable showfor: (without this, knowledge base pages may show up blank)
| |
| <pre>
| |
| cp scripts/showfor/config.php.dist scripts/showfor/config.php
| |
| </pre>
| |
| To enable minify: (without this, pages may show up without CSS and JS)
| |
| <pre>
| |
| cp scripts/minify/minify.conf.php.dist scripts/minify/minify.conf.php
| |
| </pre>
| |
| We provide a default <code>minify.conf</code> in <code>webroot/files</code>, but this requires memcache settings to be defined in <code>webroot/db/local.php</code>. For an example of this, see <code>$memcached_*</code> variables in <code>webroot/db/local.php.dist</code>.
| |
|
| |
|
| 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.
| | == Relationship to Django/Python/Git == |
|
| |
|
| For example:
| | While the PHP half lives at least partially in the DocumentRoot, the Python half, aka "Kitsune", should not. A good place to clone Kitsune is in the same directory that houses <code>webroot/</code> or one level above that. |
| <pre>
| |
| sudo chmod 775 webroot/files/minify.conf
| |
| </pre>
| |
| Here you must configure the databsase user, host, pass, etc. To set up the database connection:
| |
| <pre> | |
| cp webroot/db/local.php.dist webroot/db/local.php
| |
| vim webroot/db/local.php
| |
|
| |
|
| $host_tiki='localhost'; // change this to your host
| | Kitsune is designed to run with mod_wsgi. There are [http://github.com/jsocol/kitsune/blob/development/docs/wsgi.rst instructions] for setting that up as well. |
| $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
| |
| </pre>
| |
| | |
| Now create the templates directory for Smarty:
| |
| <pre>
| |
| cd webroot
| |
| ./setup.sh root apache 02777
| |
| </pre>
| |
| Depending on your permissions, the output of <code>setup.sh</code> 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)
| |
| <pre>
| |
| ./htaccess.sh
| |
| </pre>
| |
| | |
| 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 ==
| |
| <pre>
| |
| 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
| |
| </pre>
| |
| | |
| = 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:
| |
| <pre>echo "d" > webroot/files/minify.conf</pre>
| |
| | |
| = More information =
| |
| | |
| If you would like more information, you can contact the SUMOdev team at sumo-dev[at]mozilla[dot]com
| |
This document only covers installation of the Tiki/PHP/SVN portion of SUMO. This will go away after 2.4.
For instructions on setting up the Django/Python/Git portion, see installation.rst on Github.
Pre-requisites
- PHP, MySQL, Apache, and you probably want Memcached.
- PHP Memcache (not Memcached) extension.
Installation/Setup
cd /path/to/sumo
svn co https://svn.mozilla.org/projects/sumo/trunk .
cd webroot
sudo ./setup.sh [user] [group]
./htaccess.sh
cd ..
A few less-simple steps:
- For any
.dist files in the scripts/ directory (next to webroot/) copy them to a .php version in place.
- Make the
DocumentRoot for whatever server or virtual server point to webroot/.
- Copy
webroot/db/local.php.dist to webroot/db/local.php and fill in values. $gearman_servers is vestigial and can be ignored.
setup.sh should take care of most everything. If not, you might see a big red heading that says something like "not installed correctly." If there is a relevant message, do what it says. If not, look in #sumodev for help.
Relationship to Django/Python/Git
While the PHP half lives at least partially in the DocumentRoot, the Python half, aka "Kitsune", should not. A good place to clone Kitsune is in the same directory that houses webroot/ or one level above that.
Kitsune is designed to run with mod_wsgi. There are instructions for setting that up as well.