8 » Historique » Version 54
Patrice Nadeau, 2018-04-07 14:57
1 | 53 | Patrice Nadeau | # Drupal 8 |
---|---|---|---|
2 | 2 | Patrice Nadeau | |
3 | 46 | Patrice Nadeau | > Drupal 8.2.1 sous openSUSE Leap 42.1 |
4 | 4 | Patrice Nadeau | |
5 | 32 | Patrice Nadeau | {{lastupdated_at}} {{lastupdated_by}} |
6 | |||
7 | --- |
||
8 | |||
9 | {{TOC}} |
||
10 | |||
11 | |||
12 | 53 | Patrice Nadeau | ## Pre-requis |
13 | 7 | Patrice Nadeau | |
14 | 53 | Patrice Nadeau | ### Module facultatif |
15 | 1 | Patrice Nadeau | |
16 | 18 | Patrice Nadeau | Modules PHP facultatifs : |
17 | 54 | Patrice Nadeau | |
18 | 18 | Patrice Nadeau | * PHP OPcache |
19 | * cURl : pour le module Drupal _Aggregator_ |
||
20 | 21 | Patrice Nadeau | * Upload progress |
21 | 1 | Patrice Nadeau | |
22 | Installation |
||
23 | 54 | Patrice Nadeau | |
24 | ```bash |
||
25 | 1 | Patrice Nadeau | zypper install php5-opcache php5-curl |
26 | 11 | Patrice Nadeau | pecl install uploadprogress |
27 | 54 | Patrice Nadeau | ``` |
28 | 1 | Patrice Nadeau | |
29 | 54 | Patrice Nadeau | |
30 | 11 | Patrice Nadeau | Ajouter dans le fichier _/etc/php/apache2/php.ini_ |
31 | 54 | Patrice Nadeau | |
32 | ```php |
||
33 | 1 | Patrice Nadeau | extension=opcache.so |
34 | extension=uploadprogress.so |
||
35 | 54 | Patrice Nadeau | ``` |
36 | 1 | Patrice Nadeau | |
37 | 54 | Patrice Nadeau | |
38 | 1 | Patrice Nadeau | S'assurer que _mod_php_ est actif |
39 | 54 | Patrice Nadeau | |
40 | ```bash |
||
41 | 22 | Patrice Nadeau | a2enmod mod_php |
42 | 54 | Patrice Nadeau | ``` |
43 | 22 | Patrice Nadeau | |
44 | Relire la configuration Apache |
||
45 | 54 | Patrice Nadeau | |
46 | ```bash |
||
47 | 11 | Patrice Nadeau | systemctl reload apache2.service |
48 | 54 | Patrice Nadeau | ``` |
49 | 7 | Patrice Nadeau | |
50 | 8 | Patrice Nadeau | ### MySQL/MariaDB |
51 | 1 | Patrice Nadeau | |
52 | Choisir et noter les 3 items suivants : |
||
53 | 8 | Patrice Nadeau | * _drupal_db_ : nom voulu de la base de donnés de Drupal |
54 | * _drupal_user_ : nom voulu pour l’usager MySQL |
||
55 | * _drupal_password_ : mot de passe voulu pour l’usager MySQL |
||
56 | |||
57 | À partir du serveur : |
||
58 | > root est l’usager « root » de MySQL |
||
59 | |||
60 | 54 | Patrice Nadeau | ```bash |
61 | 8 | Patrice Nadeau | mysql -u root -p |
62 | 54 | Patrice Nadeau | ``` |
63 | 8 | Patrice Nadeau | |
64 | Inscrire les commandes SQL suivantes : |
||
65 | <pre><code class="sql"> |
||
66 | create database drupal_db character set utf8; |
||
67 | 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'; |
||
68 | COMMIT; |
||
69 | quit; |
||
70 | </code></pre> |
||
71 | |||
72 | 53 | Patrice Nadeau | ### Apache |
73 | 7 | Patrice Nadeau | |
74 | 5 | Patrice Nadeau | _/etc/apache2/vhosts.d/vhost.conf_ |
75 | <pre><code class="bash"> |
||
76 | <VirtualHost *:80> |
||
77 | # Servername www.toto.com |
||
78 | DocumentRoot /srv/www/htdocs/drupal2 |
||
79 | ServerAdmin toto@toto.com |
||
80 | <Directory "/srv/www/htdocs/drupal2"> |
||
81 | Options Indexes ExecCGI FollowSymLinks |
||
82 | AllowOverride All |
||
83 | Require all granted |
||
84 | </Directory> |
||
85 | </VirtualHost> |
||
86 | |||
87 | </code></pre> |
||
88 | |||
89 | 53 | Patrice Nadeau | ## Installation |
90 | 2 | Patrice Nadeau | |
91 | https://www.drupal.org/upgrade/migrate |
||
92 | 1 | Patrice Nadeau | |
93 | 12 | Patrice Nadeau | Sur le serveur : |
94 | 2 | Patrice Nadeau | <pre><code class="bash"> |
95 | 1 | Patrice Nadeau | # Téléchargement |
96 | 2 | Patrice Nadeau | cd /srv/www/htdocs |
97 | wget http://ftp.drupal.org/files/projects/drupal-8.0.2.tar.gz |
||
98 | tar -xvf drupal-8.0.2.tar.gz |
||
99 | mv drupal-8.0.2 drupal2 |
||
100 | 12 | Patrice Nadeau | # Changement de la sécurité |
101 | 2 | Patrice Nadeau | chown wwwrun:www -R drupal2 |
102 | </code></pre> |
||
103 | 1 | Patrice Nadeau | |
104 | À partir d'un navigateur internet, allez au http://serveur.tld/drupal2 |
||
105 | 13 | Patrice Nadeau | |
106 | 53 | Patrice Nadeau | ## Mise à niveau d'une version précédente (7.x) |
107 | 13 | Patrice Nadeau | |
108 | 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 |
109 | 1 | Patrice Nadeau | |
110 | 15 | Patrice Nadeau | Une fois l'installation de base faite, Installer le module _Migrate Upgrade_ |
111 | <pre><code class="bash"> |
||
112 | 16 | Patrice Nadeau | cd /srv/www/htdocs/drupal2/modules |
113 | 1 | Patrice Nadeau | wget https://ftp.drupal.org/files/projects/migrate_upgrade-8.x-1.x-dev.tar.gz |
114 | 16 | Patrice Nadeau | tar -xvf migrate_upgrade-8.x-1.x-dev.tar.gz |
115 | rm migrate_upgrade-8.x-1.x-dev.tar.gz |
||
116 | 15 | Patrice Nadeau | </code></pre> |
117 | 17 | Patrice Nadeau | |
118 | Dans la page d'administration de Drupal, activer le module. |
||
119 | 19 | Patrice Nadeau | |
120 | 53 | Patrice Nadeau | ## Rapports d’état |
121 | 1 | Patrice Nadeau | |
122 | 30 | Patrice Nadeau | Reports, Status Report |
123 | 24 | Patrice Nadeau | |
124 | 53 | Patrice Nadeau | ### Trusted Host Settings |
125 | 19 | Patrice Nadeau | |
126 | 1 | Patrice Nadeau | Modifier le fichier _sites/default/settings.php_, à partir des exemples de la section *trusted_host_patterns*. |
127 | 24 | Patrice Nadeau | |
128 | 53 | Patrice Nadeau | ### Upload progress |
129 | 24 | Patrice Nadeau | |
130 | 30 | Patrice Nadeau | Si le module n'est pas actif, faire la désinstallation : |
131 | 24 | Patrice Nadeau | <pre><code class="bash"> |
132 | 25 | Patrice Nadeau | pecl uninstall uploadprogress |
133 | 24 | Patrice Nadeau | </code></pre> |
134 | |||
135 | Refaire l'installation (voir les instructions plus haut) |
||
136 | 26 | Patrice Nadeau | |
137 | 53 | Patrice Nadeau | ### Twig C extension |
138 | 26 | Patrice Nadeau | |
139 | 27 | Patrice Nadeau | > http://drupal.stackexchange.com/questions/162574/twig-c-extension-in-drupal-8 |
140 | 26 | Patrice Nadeau | |
141 | <pre><code class="bash"> |
||
142 | zypper install php5-phar |
||
143 | </code></pre> |
||
144 | |||
145 | <pre><code class="bash"> |
||
146 | # Installe composer |
||
147 | cd /srv/www/htdocs/drupal2/vendor |
||
148 | # Installe twig |
||
149 | ./composer.phar require twig/twig:~1.0 |
||
150 | 28 | Patrice Nadeau | # Déplace le dossier au bon endroit |
151 | mv vendor/twig/twig/ext twig/twig/ |
||
152 | # Nettoyage |
||
153 | rm -r vendor/ |
||
154 | 29 | Patrice Nadeau | # Se placer dans le bon repertoire |
155 | 28 | Patrice Nadeau | cd twig/twig/ext/twig |
156 | 29 | Patrice Nadeau | # Lancer la compilation |
157 | phpize |
||
158 | ./configure |
||
159 | 1 | Patrice Nadeau | make |
160 | 29 | Patrice Nadeau | make install |
161 | # Relire Apache |
||
162 | systemctl reload apache2.service |
||
163 | 1 | Patrice Nadeau | </code></pre> |
164 | 26 | Patrice Nadeau | |
165 | 53 | Patrice Nadeau | ## Mise à jour |
166 | 33 | Patrice Nadeau | |
167 | > Version 8.3.1 |
||
168 | 52 | Patrice Nadeau | |
169 | 45 | Patrice Nadeau | > S'assurer d'avoir une copie de la base de données et du répertoire de Drupal. |
170 | 38 | Patrice Nadeau | |
171 | 53 | Patrice Nadeau | * À partir du site, mettre le site en mode maintenance |
172 | * Configuration, Development, Maintenance Mode |
||
173 | * A partir de la ligne de commande sur le serveur, télécharger la nouvelle version et l'installer |
||
174 | |||
175 | ```bash |
||
176 | 35 | Patrice Nadeau | cd /srv/www/htdocs |
177 | 52 | Patrice Nadeau | wget https://ftp.drupal.org/files/projects/drupal-8.3.1.tar.gz |
178 | tar xvf drupal-8.3.1.tar.gz |
||
179 | cp -R drupal-8.3.1/* drupal-8.3.1/.htaccess drupal |
||
180 | 53 | Patrice Nadeau | ``` |
181 | * Exécuter la mise à jour à partir du navigateur |
||
182 | * http://fqdn/drupal/update.php |
||
183 | * Remettre le site en ligne |