|
|
| (13 intermediate revisions by 2 users not shown) |
| Line 1: |
Line 1: |
| {{draft}}
| | This page is now out of date. Please go here:<br> |
|
| |
|
| == Packages To Install ==
| | https://wiki.mozilla.org/Drumbeat/Batucada/Roadmap<br> |
| | |
| (Debian/Ubuntu package names in brackets)
| |
| | |
| * Apache 2.x (apache2)
| |
| * PHP 5.2 (php5)
| |
| * MySQL 5 (mysql-server)
| |
| * PHP MySQL support (php5-mysql)
| |
| * Mail server (e.g. postfix)
| |
| | |
| sudo apt-get install apache2 php5 mysql-server php5-mysql postfix
| |
| | |
| == Configuration ==
| |
| | |
| === PHP 5.2 ===
| |
| | |
| Edit <tt>/etc/php5/apache2/php.ini</tt> and make the following changes:
| |
| | |
| * memory_limit = 128M
| |
| * max_execution_time = 300
| |
| * upload_max_filesize = 8M
| |
| | |
| Install the following stuff:
| |
| | |
| * libgd2 for image manipulation - (php5-gd module + dependencies? Or is it built-in?) [booker - these are installed by default on Ubuntu]
| |
| * curl support for feeds (php5-curl module? Isn't it built-in?) [booker - installed by default on Ubuntu]
| |
| * pecl module "uploadprogress" for enhanced ajax uploads (XXXwhere to find and how to install? Install php-pear and then run a pear command?)
| |
| * sendmail support (XXXphp-mail module? Or is it built-in?)
| |
| | |
| === Apache 2 ===
| |
| | |
| * Enable mod_rewrite for clean urls:
| |
| | |
| sudo a2enmod rewrite
| |
| | |
| === MySQL 5 ===
| |
| | |
| * innodb (XXX is there actually anything to do here? my.cnf on Ubuntu says InnoDB is enabled by default...)
| |
| | |
| == Get Code ==
| |
| | |
| This includes our own copies of Drupal, various Drupal modules, and CiviCRM. From now on, $DRUPAL_ROOT represents the place you want to put the code - e.g. <tt>/var/www/drumbeat.org</tt>. If you don't put it in <tt>/var/www</tt>, you'll need a symlink so the webserver can see it.
| |
| | |
| Run this command:
| |
| | |
| svn co http://svn.mozilla.org/projects/crm/trunk $DRUPAL_ROOT
| |
| or
| |
| svn co https://svn.mozilla.org/projects/crm/trunk $DRUPAL_ROOT
| |
| | |
| Or, if you have Mozilla SVN write access:
| |
| | |
| svn co svn+ssh://svn.mozilla.org/projects/crm/trunk $DRUPAL_ROOT
| |
| | |
| === Install Sample Database ===
| |
| | |
| * XXX - need to make this available
| |
| * Need to set up database users with appropriate rights to the imported databases
| |
| | |
| Below, where it says to "update a database connection string", you should use the "mysqli" connection method, and the usernames, passwords and database names you set up in this section.
| |
| | |
| == Additional Server Configuration ==
| |
| | |
| Edit <tt>$DRUPAL_ROOT/sites/default/settings.php</tt>:
| |
| | |
| # Update <tt>$db_url['default']</tt> and <tt>$db_url['mozcrm_civicrm']</tt> database connection strings ('default' is for the Drupal database, the other is for CiviCRM).
| |
| # Check the correct memcached port is specified in the <tt>memcache_servers</tt> array.
| |
| # Right at the bottom of the file, the domain module include path must be updated to be "<tt>$DRUPAL_ROOT/sites/all/modules/contrib/domain/settings.inc</tt>".
| |
| | |
| Edit <tt>$DRUPAL_ROOT/sites/default/civicrm.settings.php</tt>:
| |
| | |
| # Update the database connection string for the Drupal database (<tt>CIVICRM_UF_DSN</tt>).
| |
| # Update the database connection string for the CiviCRM database (<tt>CIVICRM_DSN</tt>).
| |
| # Update the CiviCRM root path <tt>$civicrm_root</tt> to be "<tt>$DRUPAL_ROOT/sites/all/modules/civicrm</tt>".
| |
| # Update the CiviCRM template folder <tt>CIVICRM_TEMPLATE_COMPILEDIR</tt> to be "<tt>$DRUPAL_ROOT/sites/default/files/civicrm/templates_c/</tt>".
| |
| | |
| Make these two files read only ($USER is your user, and $APACHE_USER is the user your Apache runs as, "<tt>www-data</tt>" on Ubuntu):
| |
| | |
| cd $DRUPAL_ROOT/sites/default/
| |
| chmod 0640 settings.php civicrm.settings.php
| |
| sudo chown $USER:$APACHE_USER settings.php civicrm.settings.php
| |
| | |
| Edit <tt>$DRUPAL_ROOT/sites/default/files/civicrm/upload/Config.IDS.ini</tt>:
| |
| | |
| # Make sure the full paths are correct (<tt>$DRUPAL_ROOT/sites/...</tt>)
| |
| # Make it read-only, and readable by the apache user only:
| |
| | |
| cd $DRUPAL_ROOT/sites/default/files/civicrm/upload/
| |
| chmod 0440 Config.IDS.ini
| |
| sudo chown $USER:$APACHE_USER Config.IDS.ini
| |
| | |
| Verify that the following files & folders exist and are writeable by the apache user and readable by everyone else:
| |
| | |
| # $DRUPAL_ROOT/sites/default/files/ (and all subfolders)
| |
| # $DRUPAL_ROOT/cache/
| |
| | |
| cd $DRUPAL_ROOT
| |
| mkdir cache
| |
| chmod -R 0664 cache sites/default/files
| |
| sudo chown -R $USER:$APACHE_USER cache sites/default/files
| |
| | |
| == View Site ==
| |
| | |
| From here on, replace $SITE with the URL you plan to use to access drumbeat.org on your local web server, e.g.
| |
| | |
| localhost/drumbeat.org
| |
| | |
| Access
| |
| | |
| http://$SITE/
| |
| | |
| to see your installation working.
| |
| | |
| XXX This will depend on your /etc/host configuration. All the required steps are at http://groups.drupal.org/node/6266 [booker] - Paul - can we integrate the appropriate steps, or give a simple recipe? That URL seems fairly complex... - Gerv i'll do this when i set up my development server [Booker]
| |
|
| |
| Access
| |
| | |
| http://$SITE/user/
| |
| | |
| If you can reach the above but not this one, mod_rewrite may not be working.
| |
| | |
| XXX what about SSL config?
| |
| | |
| == Web Configuration ==
| |
| | |
| Log in to the site as “admin”. (XXX password in default db?)
| |
| | |
| # Go to <tt>http://$SITE/admin/build/domain/settings</tt> and set the Primary domain name to the Mozillians domain name. Save.
| |
| # Go to <tt>http://$SITE/admin/build/domain/edit/2</tt> and set the DOMAIN name to $SITE. Save. When using the drumbeat domain name, the site should now appear in the drumbeat theme.
| |
| # Next flush the cache - click “Flush all caches” on the Drupal icon menu (should be <tt>http://$SITE/admin_menu/flush-cache</tt>). (XXX isn't this broken?)
| |
| | |
| Now CiviCRM configuration which can be tricky, because it stores more path related settings in the database from the UI, which breaks links in the CiviCRM configuration screens.
| |
| | |
| # Check <tt>http://$SITE/civicrm/admin/setting/path?reset=1</tt> full paths are correct.
| |
| # Check <tt>http://$SITE/civicrm/admin/setting/url?reset=1</tt> paths are correct. Use the Drumbeat domain.
| |
| # Setup donation Payment Processors <tt>http://$SITE/civicrm/admin/paymentProcessor?reset=1</tt> XXXNot for testing, I presume?
| |
| | |
| Google Maps API key - for geolocating users. Add it at <tt>http://$SITE/admin/settings/gmap</tt>
| |
| | |
| Flickr API key - for Flickr widget. Add it at <tt>http://$SITE/admin/settings/flickr</tt>
| |
| | |
| Enable the “Simple Mail” module to provide mail functionality
| |
| | |
| # <tt>http://$SITE/admin/build/modules</tt>. Save right at the bottom.
| |
| # <tt>http://$SITE/admin/settings/site-information</tt> and ensure site email is correct.
| |
| | |
| Setup timezone at <tt>http://$SITE/admin/settings/date-time</tt>
| |
| | |
| Drumbeat specific settings are configurable at <tt>http://$SITE/admin/settings/drumbeat</tt> | |
| | |
| Finally check the status reports <tt>http://$SITE/admin/reports/status</tt>. You can safely ignore the SWFObject message.
| |
| | |
| === Drupal cronjob ===
| |
| | |
| Run:
| |
| | |
| sudo crontab -e
| |
| | |
| and add:
| |
| | |
| 10 * * * * wget -q -O /dev/null http://$SITE/cron.php
| |
| | |
| XXX the cron.php file will also need to be unreachable from over the web [booker] - in which case, we should fix the default .htaccess so this is true - Gerv.
| |
| | |
| === Troubleshooting ===
| |
| | |
| I'll be happy to assist anyone who wishes to help out with Drumbeat [booker]
| |
| | |
| == Optional Pieces ==
| |
| | |
| === Boost Module ===
| |
| | |
| Boost module maintains a page cache, which dramatically improves performance for anonymous users.
| |
| | |
| Modify the "cache" folder in the Drupal root apache writeable, other readable.
| |
| Copy the settings generated at http://{drumbeat_staging_url}/admin/settings/performance/boost-rules into {Drupal root}/.htaccess over the existing #Boost rules section.
| |
| | |
| See the INSTALLATION section of sites/all/modules/contrib/boost/README.txt for configuration.
| |
| | |
| === Memcached ===
| |
| | |
| You only need memcache if you are running performance testing or debugging memcache problems. Install these modules:
| |
| | |
| * memcached (memcached)
| |
| * php5-memcache 2.2.5 (php5-memcache) - not 3.x, which Ubuntu 9.10 ships
| |
| | |
| XXX Where do people get the older version of php5-memcache?
| |
| | |
| Run this command:
| |
| | |
| /usr/bin/memcached -m 2048 -p 11210 -u {apache user} -l 127.0.0.1
| |
| | |
| * Check that the settings in {Drupal root}/sites/default/settings.php match the above command line (the port, in particular)
| |
| * Make sure local services can access port 11210 on localhost XXX how? telnet test?
| |
| | |
| You can tell if it's working by checking the reports at
| |
| http://$SITE/admin/reports/memcache - if there are no statistics, then memcache is not correctly configured or running.
| |
| | |
| === Apache Solr ===
| |
| | |
| There's a [[Drumbeat/Website/Install/Solr|separate page]] for this.
| |
| | |
| == Extra Bits (???) ==
| |
| | |
| * Moving CiviCRM database from staging to live. Clear the CiviCRM configuration from the database - which is rebuilt automatically from {Drupal root}/sites/default/civicrm.settings.php
| |
| UPDATE `mozcrm_civicrm`.`civicrm_domain` SET `config_backend` = NULL WHERE `civicrm_domain`.`id` =1 LIMIT 1 ;
| |
| | |
| == Notes on setting up ubuntu desktop server for SSL ==
| |
| | |
| * http://paulbooker.info/node/9#comment-3
| |
| * http://paulbooker.info/setting-up-ssl--ubuntu-and-apache
| |
| * http://paulbooker.info/creating-ca-self-signed-ssl-certificates
| |
| | |
| I'll help further with this wiki page when i go through the whole installation process
| |
| from scratch on a vanilla install of Ubuntu.
| |
| | |
| == Questions/ Notes ==
| |
| | |
| This is stuff that [[User:Theinterned | Ned]] Is working through as he starts getting set up to work on the site locally.
| |
| | |
| === Content of Project Pages Duplicated when not signed in ===
| |
| | |
| === Working with Javascript ===
| |
| * How are the js files structured and what files can I add functions to?
| |
| * Apparently Javascript Concatenation is turned on by default, for development work this should be turned off here: admin/settings/performance but I am not seeing any form controls here
| |
| | |
| === Signup not working ===
| |
| | |
| Is it possible to create a user on the local version of the site without this error:
| |
| | |
| Sorry. A non-recoverable error has occurred.
| |
|
| |
| QuickForm Error: unknown error
| |
|
| |
| Return to home page.
| |
|
| |
| Error Details:
| |
|
| |
| Array
| |
| (
| |
| [callback] => Array
| |
| (
| |
| [0] => CRM_Core_Error
| |
| [1] => handle
| |
| )
| |
|
| |
| [code] => -1
| |
| [message] => QuickForm Error: unknown error
| |
| [mode] => 16
| |
| [debug_info] => Form rule callback returned invalid value in HTML_QuickForm::validate()
| |
| [type] => HTML_QuickForm_Error
| |
| [user_info] => Form rule callback returned invalid value in HTML_QuickForm::validate()
| |
| [to_string] => [html_quickform_error: message="unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="QuickForm Error: " info="Form rule callback returned invalid value in HTML_QuickForm::validate()"]
| |
| )
| |