Base system (Ubuntu 18.04, Drupal8) over KVM

  • Ubuntu server 18.04 LTS (from ISO)
  • Set IPv4 and IPv6
nano -w /etc/netplan/50-cloud-init.yaml
netplan apply
  • Install LAMP and useful packages
apt install curl tasksel
tasksel install lamp-server

a2enmod rewrite
apt install php-fdomdocument php-gd php-mbstring unzip php-curl
nano /etc/apache2/sites-enabled/000-default.conf
systemctl restart apache2
  • Reverse proxy to external access to IIIF server
sudo a2enmod proxy proxy_http
systemctl restart apache2
nano -w /etc/apache2/sites-enabled/000-default.conf

+        AllowEncodedSlashes On
+        ProxyRequests Off
+        ProxyPreserveHost On
+        <Proxy *>
+                Order deny,allow
+                Allow from all
+        </Proxy>
+        RequestHeader set X-Forwarded-Path /iiif-server
+        ProxyPass /iiif-server http://CANTALOUPE_IP:8182 nocanon
+        ProxyPassReverse /iiif-server http://CANTALOUPE_IP:8182
  • Install Composer
cd ~
php -r "copy('', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '48e3236262b34d30969dca3c37281b3b4bbe3221bda826ac6a9a62d6444cdb0dcd0615698a5cbe587c3f0fe57a54d8f5') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
mv composer.phar /usr/local/bin/composer

composer -V
Composer version 1.8.3 2019-01-30 08:31:33
  • Install Drupal 8 (by Composer)

Create DB for Drupal

mysqladmin create DbName
mysql -e "CREATE USER 'Admin'@'%' IDENTIFIED BY 'password';"

Install Drupal

~$ composer create-project drupal-composer/drupal-project:8.x-dev SiteDir --no-interaction
~$ sudo mv SiteDir /var/www/
~$ sudo chown -R www-data.www-data /var/www/SiteDir
~$ cd /var/www/SiteDir/web/
$ sudo -u www-data ../vendor/drush/drush/drush site-install standard --db-url=mysql://Admin:password@localhost/DbName --account-mail="" --account-name=DrupalAdmin --account-pass=AdminPassword --site-mail="" --site-name="Archipelago"

sudo nano -w /var/www/SiteDir/web/sites/default/settings.php
$settings['trusted_host_patterns'] = array(

To avoid cache warning using composer and drush:

chown -R www-data:www-data /home/yourUser/.composer
chown -R www-data:www-data /home/yourUser/.drush

Check composer and drush:

cd /var/www/SiteDir

# sudo -u www-data composer --version
	Composer version 1.8.3 2019-01-30 08:31:33
# sudo -u www-data vendor/drush/drush/drush --version
	Drush Commandline Tool 9.5.2

To update core see Updating Drupal Core

sudo -u www-data composer update drupal/core webflo/drupal-core-require-dev symfony/* --with-dependencies

To update a module (i.e. facets):

sudo -u www-data composer update drupal/facets
archipelago/fe_base.txt ยท Last modified: 2019/05/02 09:22 by giancarlo

Developers: CNR IRCrES IT Office and Library
Giancarlo Birello (giancarlo.birello _@_ and Anna Perin (anna.perin _@_
DigiBess is licensed under: Creative Commons License
Recent changes RSS feed Creative Commons License Valid XHTML 1.0 Valid CSS Driven by DokuWiki
Drupal Garland Theme for Dokuwiki