2123
Commentaire:
|
2878
|
Texte supprimé. | Texte ajouté. |
Ligne 5: | Ligne 5: |
{{{ |
|
Ligne 7: | Ligne 9: |
}}} | |
Ligne 9: | Ligne 12: |
Contenu du fichier : /etc/haproxy/haproxy.cfg : {{{ global log /dev/log local0 log /dev/log local1 notice chroot /var/lib/haproxy stats socket /run/haproxy/admin.sock mode 660 level admin stats timeout 30s user haproxy group haproxy daemon defaults log global mode tcp option dontlognull timeout connect 5000 timeout client 50000 timeout server 50000 listen mysql-cluster bind 127.0.0.1:3306 mode tcp option mysql-check user haproxy balance roundrobin server prod-db02-idneuf database_server01:3306 check server prod-db03-idneuf database_server02:3306 check }}} === Contenu du fichier |
|
Ligne 14: | Ligne 51: |
{{{ |
|
Ligne 16: | Ligne 55: |
}}} | |
Ligne 17: | Ligne 57: |
Dans le fichier /etc/memcache.conf, configurer la quantité de RAM a allouer : | Dans le fichier /etc/memcache.conf, configurer la quantité de RAM a allouer :{{{ |
Ligne 25: | Ligne 65: |
}}} |
|
Ligne 27: | Ligne 69: |
Installer le module suivant depuis l'interface d'administration : | Installer le module suivant depuis l'interface d'administration :{{{ |
Ligne 30: | Ligne 72: |
}}} | |
Ligne 31: | Ligne 74: |
Dans le fichier sites/default/settings.php, insérer les lignes suivantes : | Dans le fichier sites/default/settings.php, insérer les lignes suivantes :{{{ |
Ligne 51: | Ligne 94: |
}}} | |
Ligne 65: | Ligne 108: |
Ligne 70: | Ligne 112: |
Ligne 71: | Ligne 114: |
Ligne 74: | Ligne 119: |
sites/default/settings.php | Modifier le fichier sites/default/settings.php :{{{ |
Ligne 78: | Ligne 123: |
}}} |
Rédiger « OVH/VPC02/idneuf/Drupal » ici.
Installation des paquets
apt-get install apache2 haproxy php5 php5-gd php5-durl libssh2-php
Configuration HAProxy
Contenu du fichier : /etc/haproxy/haproxy.cfg :
global log /dev/log local0 log /dev/log local1 notice chroot /var/lib/haproxy stats socket /run/haproxy/admin.sock mode 660 level admin stats timeout 30s user haproxy group haproxy daemon defaults log global mode tcp option dontlognull timeout connect 5000 timeout client 50000 timeout server 50000 listen mysql-cluster bind 127.0.0.1:3306 mode tcp option mysql-check user haproxy balance roundrobin server prod-db02-idneuf database_server01:3306 check server prod-db03-idneuf database_server02:3306 check
=== Contenu du fichier
Utilisation de Memcache
Installation de memcache
apt-get -y install php5-memcache memcached
Dans le fichier /etc/memcache.conf, configurer la quantité de RAM a allouer :
# Start with a cap of 64 megs of memory. It's reasonable, and the daemon default # Note that the daemon will grow to this size, but does not start out holding this much # memory -m 1024
Configuration de Drupal
Installer le module suivant depuis l'interface d'administration :
https://ftp.drupal.org/files/projects/memcache-7.x-1.5.tar.gz
Dans le fichier sites/default/settings.php, insérer les lignes suivantes :
//Use memcache $conf['cache_backends'][] = 'sites/all/modules/memcache/memcache.inc'; $conf['cache_default_class'] = 'MemCacheDrupal'; $conf['cache_inc'] = 'sites/all/modules/contrib/memcache/memcache.inc'; //Memcache session $conf['session_inc'] = 'sites/all/modules/memcache/unstable/memcache-session.inc'; //Memcache lock $conf['lock_inc'] = 'sites/all/modules/memcache/memcache-lock.inc'; //Add in stampede protection $conf['memcache_stampede_protection'] = TRUE; //Don't bootstrap the database when serving pages from the cache. $conf['page_cache_without_database'] = TRUE; $conf['page_cache_invoke_hooks'] = FALSE;
Lien avec ORI-OAI
Fichiers a modifier afin de faire le lien vers ORI-OAI :
ori-oai-search-idneuf.css
http_header/index.php
sites/default/files/xmlsitemap/NXhscRe0440PFpI5dSznEVgmauL25KojD7u4e9aZwOM/1.xml
sites/all/themes/theme1005/templates/views-view—block₁--block.tpl.php
sites/all/themes/theme1005/css/style-header-footer.css
sites/all/themes/theme1005/css/custom.css
Utilisation de NginX comme ReverseProxy
===Config pour recuperer le X-Forward-For===
Modifier le fichier sites/default/settings.php :
$conf['reverse_proxy'] = TRUE; $conf['reverse_proxy_addresses'] = array('10.242.1.194','10.242.1.195');