3,035
edits
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
[[Update:Home_Page|Update: Home Page]] » Installation Guide | [[Update:Home_Page|Update: Home Page]] » Installation Guide | ||
= | = Support and Maintenance = | ||
== | = v2 Installation = | ||
== Core == | |||
Without these, the application will not run. | |||
* A server | |||
* mysqld | |||
* apache2 | |||
* php4.x | |||
* php-mysql | |||
* PEAR::DB | |||
* Smarty | |||
== | == Enhancements == | ||
Without these, the app will still run, but it will be slower than optimal. We should plan on managing these, even if it is a PITA. | |||
* phpa | |||
* memcached | |||
* PECL PHP memcache extension (--enable-memcache[=DIR]) | |||
== | == Server Config == | ||
* Apache | |||
** Prod | |||
*** Copy contents of ./public/htaccess.dist into vhost conf file. | |||
** Dev/Testing | |||
*** If you are using a singular vhost to test multiple instances of AMO, you'll have to adjust the vhost to use .htaccess files, so you'd have to add "AllowOverride FileInfo" then restart httpd. | |||
** Make sure mod_rewrite is installed | |||
* MySQL | |||
** 4.1.x+ | |||
** When we move things forward we will need to import a mysqldump from production | |||
** We then will need to run ./shared/sql/v2.sql | |||
* PHP | |||
** php-mysql - PHP packages for mysql support, this is a basic package | |||
** phpa - https://intranet.mozilla.org/AMO | |||
*** Download the binary file, follow the README | |||
*** The short version is basically untarring it, placing it in a common place, then editing php.ini -- there is probably a better way to do this that won't piss off the RPM system, though -- ask justdave about this, his comments a couple weeks ago: "19:15 <@justdave> in otherwords, drop a one-line file in /etc/php.d and don't touch php.ini" | |||
** PECL memcache extension | |||
*** This involves adding a C extension to PHP and recompiling it. | |||
*** The INSTALL file offers instructions on how to do this using PHP utils and make. | |||
** PEAR::DB -- This is a basic package. | |||
** Smarty -- https://intranet.mozilla.org/AMO -- Only the /lib directory is needed, the rest doesn't really need to be extracted. | |||
*** In the past, it was helpful to just make symlink that was /usr/local/share/php/Smarty --> /usr/local/share/php/Smarty-2.x.x | |||
*** When you configure the application, you will point at the '''lib directory''' not the base directory for Smarty -- so be aware of the distinction. | |||
** zzlib (optional, for v1 only -- iguana) | |||
*** zzlib is required for extraction of XPIs for the v1 developers tools, and probably only needs to be installed on Iguana for use with these tools. | |||
*** As we plan out the rewrite for the developer tools, removing this dependency is a primary goal... :) | |||
== | == Application Config == | ||
The application is split into sections on purpose. The goal here was to: | |||
* segregate public, private and backend pieces | |||
* hide non-public scripts from the world by not having php includes in the webroot | |||
== Directory Structure == | |||
The main directories we should be aware of: | |||
* ./shared/bin - backend scripts are stored here, and use the config.php in this directory | |||
* ./shared/sql - sql structure along with a v2.sql for migrating v1 to the new structure live here | |||
* ./shared/lib - all php libs and dependencies that are central live here (class defninitions, etc.) | |||
* ./public/inc - wrappers live here, like config.php, init.php and finish.php | |||
* ./public/htdocs - this should be the webroot of the site | |||
* ./public/tpl - this is the template directory, not stored in the webroot | |||
* ./public/templates_c - this is where smarty stores compiled templates | |||
* ./public/cache - this is the smarty cache dir, not really needed but config requires it | |||
* ./public/configs - this is the smarty configs dir, not really needed but config requires it | |||
== Setting things up, permissions, etc. == | |||
* ./public/(templates_c, cache, and configs) | |||
** These should be writeable by apache | |||
* ./public/inc/config.php | |||
** Copy config-dist.php to config.php and follow the instructions in the comments. | |||
* ./public/htdocs/htaccess.dist | |||
** Copy to .htaccess then set the rewrite base to the proper value. | |||
* ./shared/bin/config.php | |||
** Copy config-dist.php to config.php and provide writeable DB information (don't use the SLAVE!). |
edits