Projet

Général

Profil

8 » Historique » Version 21

Patrice Nadeau, 2016-01-17 10: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
Relire la configuration Apache
27
<pre><code class="bash">
28
systemctl reload apache2.service
29
</code></pre>
30 21 Patrice Nadeau
31 11 Patrice Nadeau
32 7 Patrice Nadeau
h3. MySQL/MariaDB
33
34 8 Patrice Nadeau
Choisir et noter les 3 items suivants :
35
* _drupal_db_ : nom voulu de la base de donnés de Drupal
36
* _drupal_user_ : nom voulu pour l’usager MySQL
37
* _drupal_password_ : mot de passe voulu pour l’usager MySQL
38
39
À partir du serveur :
40
> root est l’usager « root » de MySQL
41
42
<pre><code class="bash">
43
mysql -u root -p
44
</code></pre>
45
46
Inscrire les commandes SQL suivantes :
47
<pre><code class="sql">
48
create database drupal_db character set utf8;
49
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';
50
COMMIT;
51
quit;
52
</code></pre>
53
54 7 Patrice Nadeau
h3. Apache
55
56 5 Patrice Nadeau
_/etc/apache2/vhosts.d/vhost.conf_
57
<pre><code class="bash">
58
<VirtualHost *:80>
59
#    Servername www.toto.com
60
    DocumentRoot /srv/www/htdocs/drupal2
61
    ServerAdmin toto@toto.com
62
    <Directory "/srv/www/htdocs/drupal2">
63
        Options Indexes ExecCGI FollowSymLinks
64
        AllowOverride All
65
        Require all granted
66
    </Directory>
67
</VirtualHost>
68
69
</code></pre>
70
71 3 Patrice Nadeau
h2. Installation
72 2 Patrice Nadeau
73
https://www.drupal.org/upgrade/migrate
74 1 Patrice Nadeau
75 12 Patrice Nadeau
Sur le serveur :
76 2 Patrice Nadeau
<pre><code class="bash">
77 1 Patrice Nadeau
# Téléchargement
78 2 Patrice Nadeau
cd /srv/www/htdocs
79
wget http://ftp.drupal.org/files/projects/drupal-8.0.2.tar.gz
80
tar -xvf drupal-8.0.2.tar.gz
81
mv drupal-8.0.2 drupal2
82 12 Patrice Nadeau
# Changement de la sécurité
83 2 Patrice Nadeau
chown wwwrun:www -R drupal2
84
</code></pre>
85 1 Patrice Nadeau
86
À partir d'un navigateur internet, allez au http://serveur.tld/drupal2
87 13 Patrice Nadeau
88 14 Patrice Nadeau
h2. Mise à niveau d'une version précédente (7.x)
89 13 Patrice Nadeau
90 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
91 1 Patrice Nadeau
92 15 Patrice Nadeau
Une fois l'installation de base faite, Installer le module _Migrate Upgrade_
93
<pre><code class="bash">
94 16 Patrice Nadeau
cd /srv/www/htdocs/drupal2/modules
95 1 Patrice Nadeau
wget https://ftp.drupal.org/files/projects/migrate_upgrade-8.x-1.x-dev.tar.gz
96 16 Patrice Nadeau
tar -xvf migrate_upgrade-8.x-1.x-dev.tar.gz
97
rm migrate_upgrade-8.x-1.x-dev.tar.gz
98 15 Patrice Nadeau
</code></pre>
99 17 Patrice Nadeau
100
Dans la page d'administration de Drupal, activer le module.
101 19 Patrice Nadeau
102
h2. Sécurisation
103
104
h3. Trusted Host Settings 
105
106 20 Patrice Nadeau
Modifier le fichier _sites/default/settings.php_, à partir des exemples de la section *trusted_host_patterns*.