Modifications entre les versions 2 et 4 (s'étendant sur 2 versions)
Version 2 à la date du 2016-09-22 13:12:00
Taille: 2073
Éditeur: LionelValentin
Commentaire:
Version 4 à la date du 2017-04-12 12:18:33
Taille: 2213
Commentaire:
Texte supprimé. Texte ajouté.
Ligne 3: Ligne 3:
Drupal+HAProxy+MemCached = Drupal+HAProxy+MemCached =

== Paquet necessaire ==

apt-get install apache2 haproxy php5 php5-gd php5-durl libssh2-php
Ligne 6: Ligne 10:
apt-get install apache2 haproxy php5 php5-gd php5-durl libssh2-php == Config pour recuperer le X-Forward-For ==
Ligne 13: Ligne 17:
AutoSlave :
Ligne 16: Ligne 19:
wget https://ftp.drupal.org/files/projects/autoslave-7.x-1.8.tar.gz == AutoSlave (repartition lecture/ecriture) ==
Ligne 19: Ligne 22:
mv autoslave /var/www/html/sites/all/modules/

chown -R www-data:www-data /var/www/html/sites/all/modules/autoslave/
https://ftp.drupal.org/files/projects/autoslave-7.x-1.8.tar.gz
Ligne 28: Ligne 29:

Ligne 67: Ligne 70:

== Memcached ==

apt-get -y install php5-memcache memcached

Module Drupal : https://ftp.drupal.org/files/projects/memcache-7.x-1.5.tar.gz

Rédiger « OVH/VPC02/idneuf » ici.

Drupal+HAProxy+MemCached

Paquet necessaire

apt-get install apache2 haproxy php5 php5-gd php5-durl libssh2-php

Config pour recuperer le X-Forward-For

sites/default/settings.php

$conf['reverse_proxy'] = TRUE; $conf['reverse_proxy_addresses'] = array('10.242.1.194','10.242.1.195');

AutoSlave (repartition lecture/ecriture)

https://ftp.drupal.org/files/projects/autoslave-7.x-1.8.tar.gz

cd /var/www/html/

cp -r sites/all/modules/autoslave/autoslave includes/database/

chown -R www-data:www-data includes/database/autoslave/

$databases['default']['default'] = array (

  • 'driver' => 'autoslave', 'master' => array('master', 'autoslave'), // Fallback to slaves if master fails (read-only mode) 'slave' => array('autoslave', 'master'), // Fallback to master if slaves fail 'affected tables backend' => 'autoslave.affected_tables.memcache-db-accurate.inc', 'watchdog on shutdown' => TRUE, 'replication lag' => 2,

);

$databases['default']['master'] = array (

  • 'database' => 'drupal', 'username' => 'auf', 'password' => 'XXXXXXXXXXXXXXXXXXXXXXX', 'host' => 'prod-db-master-idneuf', 'port' => , 'driver' => 'mysql', 'prefix' => ,

);

$databases['default']['autoslave'] = array (

  • 'database' => 'drupal', 'username' => 'haproxy_auf', 'password' => 'XXXXXXXXXXXXXXXXXXXXXX', 'host' => '127.0.0.1', 'port' => , 'driver' => 'mysql', 'prefix' => , 'readonly' => TRUE, // Required for system to enter "readonly" mode if master fails. 'tables' => array('sessions', 'semaphore', 'watchdog', 'users', 'history'),

);

// Use locking that supports force master $conf['lock_inc'] = 'sites/all/modules/autoslave/memcache-lock.inc';

// Use AutoSlave transactional safe cache wrapper with a memcache backend $conf['cache_backends'][] = 'sites/all/modules/autoslave/autoslave.cache.inc'; $conf['cache_default_class'] = 'AutoslaveCache'; $conf['autoslave_cache_default_class'] = 'MemCacheDrupal';

Memcached

apt-get -y install php5-memcache memcached

Module Drupal : https://ftp.drupal.org/files/projects/memcache-7.x-1.5.tar.gz

OVH/VPC02/idneuf (dernière édition le 2017-04-12 12:20:03 par JeanChristopheAndré)