Installer drupal 8 sur un Pi - test 1

requis

L'article consulté (https://github.com/geerlingguy/drupal-pi) n'indique pas de dépendance. Au 1er test, il manquait un certain nombre de choses...

sudo apt-get install libffi-dev libapr1 libaprutil1 libserf-1-1 libsvn-perl libsvn1 libterm-readkey-perl libyaml-libyaml-perl libyaml-perl  git-doc subversion libyaml-shell-perl

il faut php 7

Ajouter à /etc/apt/sources.list :

deb http://repozytorium.mati75.eu/raspbian jessie-backports main contrib non-free
#deb-src http://repozytorium.mati75.eu/raspbian jessie-backports main contrib non-free
gpg --keyserver pgpkeys.mit.edu --recv-key CCD91D6111A06851
gpg --armor --export CCD91D6111A06851 | sudo apt-key add -
sudo apt-get update && apt-get install php7.0 php7.0-opcache

installe aussi apache :
apache2 apache2-bin apache2-data apache2-utils libapache2-mod-php7.0 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.1-0 php-common php7.0
  php7.0-cli php7.0-common php7.0-json php7.0-opcache php7.0-readline
sudo apt-get remove apache2 apache2-bin apache2-data apache2-utils libapache2-mod-php7.0
ca installe alors: libapparmor1 php7.0-fpm
et suggère d'installer pear => sudo apt-get install php-pear - mais ajoute PHP 5 libonig2 libperl4-corelibs-perl libqdbm14 lsof php5-cli php5-common php5-json php5-readline (et suggère d'ajouter php5-dev php5-user-cache) ; je l'ai donc désinstallé.

?? indispensables ou pas ? php7.0-fpm, libpcre3-dev, php7.0-gd, php7.0-curl, hp7.0-imap, php7.0-json, php7.0-xml, php7.0-mbstring, php-sqlite3, php-apcu

version de drush: mettre le drush.phar (https://github.com/drush-ops/drush/releases)

sudo cp ~/Downloads/drush.phar /usr/local/bin/drush

 

drupal-pi

Install raspian/LEMP via ansible

Source : https://github.com/geerlingguy/drupal-pi

  1. Installer Ansible via pip (note: necessite libffi => sudo apt-get install libffi-dev)
    sudo apt-get update && sudo apt-get install -y python-dev python-pip && sudo pip install ansible

     

  2. Tester l'installation: ansible --version 
    affiche :
      ansible 2.3.0.0
      config file = 
      configured module search path = Default w/o overrides
      python version = 2.7.9 (default, Sep 17 2016, 20:26:04) [GCC 4.9.2]
  3. Install LEMP
    1. git clone https://github.com/geerlingguy/drupal-pi.git && cd drupal-pi
    2. cp example.config.yml config.yml 
      cp example.inventory inventory
    3. installer les roles Ansible: sudo ansible-galaxy install -r requirements.yml
      install role composer, drush, fw, mysql, nginx
      [WARNING]: - dependency geerlingguy.php from role geerlingguy.php-mysql differs from already installed version
      (3.4.4), skipping
       
    4. lancer le playbook Ansible: ansible-playbook -i inventory -c local main.yml
      résultat:

    E: The method driver /usr/lib/apt/methods/https could not be found.
    The following extra packages will be installed:  libapr1 libaprutil1 libserf-1-1 libsvn-perl libsvn1 libterm-readkey-perl libyaml-libyaml-perl libyaml-perl
    Suggested packages:  git-doc subversion libyaml-shell-perl
    PLAY RECAP ********************************************************************************************************
    127.0.0.1                  : ok=10   changed=5    unreachable=0    failed=1   

    par la suite erreur 404 pour drush.phar
    la bonne url (drush 8.1.10) est https://github.com/drush-ops/drush/releases à mettre dans /usr/local/bin/drush

    sudo cp ~/Downloads/drush.phar /usr/local/bin/drush
    installer drupal à http://localhost/

maj de drupal-Pi

cd /path/to/drupal-pi
git pull
sudo ansible-galaxy install -r requirements.yml --force
ansible-playbook -i inventory -c local main.yml

note, si lancé d'un autre poste: il faut retirer le -c local => ansible-playbook -i inventory -main.yml

remettre drupal à 0

ansible-playbook -i inventory -c local reset.yml
ansible-playbook -i inventory -c local main.yml

pour reset : le module python mysqldb est requis
=> sudo apt-get install python-mysqldb

Mélange de php5 et 7 car drupal-pi n'est pas à jour.



Vers Installer drupal 8 et drush 8.1 sur un Pi - test 2 (drupal composer) et srv17 : install drupal 7

logo drush