Projet

Général

Profil

8 » Historique » Version 20

Patrice Nadeau, 2016-01-17 10:08

1 1 Patrice Nadeau
h1. Drupal 8
2 2 Patrice Nadeau
3 4 Patrice Nadeau
> openSUSE Leap 42.1
4
5 7 Patrice Nadeau
h2. Pre-requis
6
7 18 Patrice Nadeau
h3. Module facultatif
8 1 Patrice Nadeau
9 18 Patrice Nadeau
Modules PHP facultatifs : 
10
* PHP OPcache
11
* cURl : pour le module Drupal _Aggregator_
12 1 Patrice Nadeau
13 11 Patrice Nadeau
Installation
14
<pre><code class="bash">
15 18 Patrice Nadeau
zypper install php5-opcache php5-curl
16 11 Patrice Nadeau
</code></pre>
17
18
Ajouter dans le fichier _/etc/php/apache2/php.ini_
19
<pre><code class="php">
20
extension=opcache.so
21
</code></pre>
22
23
Relire la configuration Apache
24
<pre><code class="bash">
25
systemctl reload apache2.service
26
</code></pre>
27
28 7 Patrice Nadeau
h3. MySQL/MariaDB
29
30 8 Patrice Nadeau
Choisir et noter les 3 items suivants :
31
* _drupal_db_ : nom voulu de la base de donnés de Drupal
32
* _drupal_user_ : nom voulu pour l’usager MySQL
33
* _drupal_password_ : mot de passe voulu pour l’usager MySQL
34
35
À partir du serveur :
36
> root est l’usager « root » de MySQL
37
38
<pre><code class="bash">
39
mysql -u root -p
40
</code></pre>
41
42
Inscrire les commandes SQL suivantes :
43
<pre><code class="sql">
44
create database drupal_db character set utf8;
45
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES, CREATE TEMPORARY TABLES ON drupal_db.* TO 'drupal_user'@'localhost' IDENTIFIED BY 'drupal_password';
46
COMMIT;
47
quit;
48
</code></pre>
49
50 7 Patrice Nadeau
h3. Apache
51
52 5 Patrice Nadeau
_/etc/apache2/vhosts.d/vhost.conf_
53
<pre><code class="bash">
54
<VirtualHost *:80>
55
#    Servername www.toto.com
56
    DocumentRoot /srv/www/htdocs/drupal2
57
    ServerAdmin toto@toto.com
58
    <Directory "/srv/www/htdocs/drupal2">
59
        Options Indexes ExecCGI FollowSymLinks
60
        AllowOverride All
61
        Require all granted
62
    </Directory>
63
</VirtualHost>
64
65
</code></pre>
66
67 3 Patrice Nadeau
h2. Installation
68 2 Patrice Nadeau
69
https://www.drupal.org/upgrade/migrate
70 1 Patrice Nadeau
71 12 Patrice Nadeau
Sur le serveur :
72 2 Patrice Nadeau
<pre><code class="bash">
73 1 Patrice Nadeau
# Téléchargement
74 2 Patrice Nadeau
cd /srv/www/htdocs
75
wget http://ftp.drupal.org/files/projects/drupal-8.0.2.tar.gz
76
tar -xvf drupal-8.0.2.tar.gz
77
mv drupal-8.0.2 drupal2
78 12 Patrice Nadeau
# Changement de la sécurité
79 2 Patrice Nadeau
chown wwwrun:www -R drupal2
80
</code></pre>
81 1 Patrice Nadeau
82
À partir d'un navigateur internet, allez au http://serveur.tld/drupal2
83 13 Patrice Nadeau
84 14 Patrice Nadeau
h2. Mise à niveau d'une version précédente (7.x)
85 13 Patrice Nadeau
86 15 Patrice Nadeau
> Une nouvelle installation de Drupal 8 doit être faite et ensuite une migration vers le nouveau site seras effectué. https://www.drupal.org/node/2257723
87 1 Patrice Nadeau
88 15 Patrice Nadeau
Une fois l'installation de base faite, Installer le module _Migrate Upgrade_
89
<pre><code class="bash">
90 16 Patrice Nadeau
cd /srv/www/htdocs/drupal2/modules
91 1 Patrice Nadeau
wget https://ftp.drupal.org/files/projects/migrate_upgrade-8.x-1.x-dev.tar.gz
92 16 Patrice Nadeau
tar -xvf migrate_upgrade-8.x-1.x-dev.tar.gz
93
rm migrate_upgrade-8.x-1.x-dev.tar.gz
94 15 Patrice Nadeau
</code></pre>
95 17 Patrice Nadeau
96
Dans la page d'administration de Drupal, activer le module.
97 19 Patrice Nadeau
98
h2. Sécurisation
99
100
h3. Trusted Host Settings 
101
102 20 Patrice Nadeau
Modifier le fichier _sites/default/settings.php_, à partir des exemples de la section *trusted_host_patterns*.