Drupal installieren

Aus Hostsharing Wiki
Zur Navigation springen Zur Suche springen

Drupal bei HS

Vorbereitungen

In hsadmin, zum Beispiel mit hsscript:

hsadmin-Shell starten mit:

 hsscript -u xyz00 -i
 Password: ********

Dann nacheinander anlegen:

  • Linux User als Domain-Administrator
  • Subdomain drupal.hs-example.de
  • MySQL-User
  • MySQL Datenbank
 xyz00@hsadmin> user.add({set:{name:'xyz00-drupal',password:'geheim',shell:'/bin/bash',comment:'Drupal CMS'}})
 xyz00@hsadmin> domain.add({set:{name:'drupal.hs-example.de',user:'xyz00-drupal'}})
 xyz00@hsadmin> mysqluser.add({set:{name:'xyz00_drupaluser',password:'geheim'}})
 xyz00@hsadmin> mysqldb.add({set:{name:'xyz00_drupaldb',owner:'xyz00_drupaluser'}})

Drupal installieren

Anmelden als Linux-User xyz00-drupal:

 ssh -l xyz00-drupal xyz00.hostsharing.net

Und dann Drupal herunterladen und in den Webspace entpacken:

 cd doms/drupal.hs-example.de/htdocs
 wget -O - https://ftp.drupal.org/files/projects/drupal-8.3.6.tar.gz |tar -xz --strip 1

Drupal für HS anpassen

doms/drupal.hs-example.de/htdocs

 vi .htaccess
 # If your site is running in a VirtualDocumentRoot at http://example.com/,
 # uncomment the following line:
 # RewriteBase /

wird zu

 # If your site is running in a VirtualDocumentRoot at http://example.com/,
 # uncomment the following line:
 RewriteBase /

Drupal konfigurieren

Im Browser auf die Seite http://drupal.hs-example.de gehen und den Anweisungen folgen.

Drupal1.jpg

Drupal2.jpg

Drupal3.jpg

Drupal4.jpg

Drupal5.jpg

Drupal6.jpg

Drupal7.jpg

Drupal template default für HS konfigurieren

 cd sites/default/files/php/twig
 chmod 644 .htaccess
 edit .htaccess

In der Zeile 11 den Eintrag "-ExecCGI" und "-Includes" löschen, mit diesem Ergebnis:

 Options -Indexes -MultiViews

und dann noch eine .htaccess

 cd ../..
 chmod 644 .htaccess
 edit .htaccess

In der Zeile 2 den Eintrag "-ExecCGI" und "-Includes" löschen, mit diesem Ergebnis:

 Options -Indexes -MultiViews


Danach die Seite im Browser neu laden.