Projet

Général

Profil

8 » Historique » Version 27

Patrice Nadeau, 2016-01-17 11:21

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 21 Patrice Nadeau
* Upload progress
13 1 Patrice Nadeau
14 11 Patrice Nadeau
Installation
15
<pre><code class="bash">
16 18 Patrice Nadeau
zypper install php5-opcache php5-curl
17 21 Patrice Nadeau
pecl install uploadprogress
18 11 Patrice Nadeau
</code></pre>
19
20
Ajouter dans le fichier _/etc/php/apache2/php.ini_
21
<pre><code class="php">
22
extension=opcache.so
23 21 Patrice Nadeau
extension=uploadprogress.so
24 11 Patrice Nadeau
</code></pre>
25
26 22 Patrice Nadeau
S'assurer que _mod_php_ est actif
27
<pre><code class="bash">
28
a2enmod mod_php
29
</code></pre>
30
31 11 Patrice Nadeau
Relire la configuration Apache
32
<pre><code class="bash">
33
systemctl reload apache2.service
34 21 Patrice Nadeau
</code></pre>
35 11 Patrice Nadeau
36 7 Patrice Nadeau
h3. MySQL/MariaDB
37
38 8 Patrice Nadeau
Choisir et noter les 3 items suivants :
39
* _drupal_db_ : nom voulu de la base de donnés de Drupal
40
* _drupal_user_ : nom voulu pour l’usager MySQL
41
* _drupal_password_ : mot de passe voulu pour l’usager MySQL
42
43
À partir du serveur :
44
> root est l’usager « root » de MySQL
45
46
<pre><code class="bash">
47
mysql -u root -p
48
</code></pre>
49
50
Inscrire les commandes SQL suivantes :
51
<pre><code class="sql">
52
create database drupal_db character set utf8;
53
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';
54
COMMIT;
55
quit;
56
</code></pre>
57
58 7 Patrice Nadeau
h3. Apache
59
60 5 Patrice Nadeau
_/etc/apache2/vhosts.d/vhost.conf_
61
<pre><code class="bash">
62
<VirtualHost *:80>
63
#    Servername www.toto.com
64
    DocumentRoot /srv/www/htdocs/drupal2
65
    ServerAdmin toto@toto.com
66
    <Directory "/srv/www/htdocs/drupal2">
67
        Options Indexes ExecCGI FollowSymLinks
68
        AllowOverride All
69
        Require all granted
70
    </Directory>
71
</VirtualHost>
72
73
</code></pre>
74
75 3 Patrice Nadeau
h2. Installation
76 2 Patrice Nadeau
77
https://www.drupal.org/upgrade/migrate
78 1 Patrice Nadeau
79 12 Patrice Nadeau
Sur le serveur :
80 2 Patrice Nadeau
<pre><code class="bash">
81 1 Patrice Nadeau
# Téléchargement
82 2 Patrice Nadeau
cd /srv/www/htdocs
83
wget http://ftp.drupal.org/files/projects/drupal-8.0.2.tar.gz
84
tar -xvf drupal-8.0.2.tar.gz
85
mv drupal-8.0.2 drupal2
86 12 Patrice Nadeau
# Changement de la sécurité
87 2 Patrice Nadeau
chown wwwrun:www -R drupal2
88
</code></pre>
89 1 Patrice Nadeau
90
À partir d'un navigateur internet, allez au http://serveur.tld/drupal2
91 13 Patrice Nadeau
92 14 Patrice Nadeau
h2. Mise à niveau d'une version précédente (7.x)
93 13 Patrice Nadeau
94 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
95 1 Patrice Nadeau
96 15 Patrice Nadeau
Une fois l'installation de base faite, Installer le module _Migrate Upgrade_
97
<pre><code class="bash">
98 16 Patrice Nadeau
cd /srv/www/htdocs/drupal2/modules
99 1 Patrice Nadeau
wget https://ftp.drupal.org/files/projects/migrate_upgrade-8.x-1.x-dev.tar.gz
100 16 Patrice Nadeau
tar -xvf migrate_upgrade-8.x-1.x-dev.tar.gz
101
rm migrate_upgrade-8.x-1.x-dev.tar.gz
102 15 Patrice Nadeau
</code></pre>
103 17 Patrice Nadeau
104
Dans la page d'administration de Drupal, activer le module.
105 19 Patrice Nadeau
106 24 Patrice Nadeau
h2. Rapports d'etat
107 1 Patrice Nadeau
108 24 Patrice Nadeau
109
110 19 Patrice Nadeau
h3. Trusted Host Settings 
111
112 1 Patrice Nadeau
Modifier le fichier _sites/default/settings.php_, à partir des exemples de la section *trusted_host_patterns*.
113 24 Patrice Nadeau
114
h3. Upload progress 
115
116
Si le module n'est pas actif, faire le désinstallation :
117
<pre><code class="bash">
118 25 Patrice Nadeau
pecl uninstall uploadprogress
119 24 Patrice Nadeau
</code></pre>
120
121
Refaire l'installation (voir les instructions plus haut)
122 26 Patrice Nadeau
123
h3. Twig C extension 
124
125 27 Patrice Nadeau
> http://drupal.stackexchange.com/questions/162574/twig-c-extension-in-drupal-8
126 26 Patrice Nadeau
127
<pre><code class="bash">
128
zypper install php5-phar
129
</code></pre>
130
131
<pre><code class="bash">
132
# Installe composer
133
cd /srv/www/htdocs/drupal2/vendor
134
# Installe twig
135
./composer.phar require twig/twig:~1.0
136
</code></pre>