|
|
| Zeile 1: |
Zeile 1: |
| = Anleitung: Drupal 11 Installation unter Ubuntu 24.04 =
| | <strong>MediaWiki wurde installiert.</strong> |
|
| |
|
| == Vorbereitung ==
| | Hilfe zur Verwendung und Konfiguration der Wiki-Software findest du im [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents Benutzerhandbuch]. |
|
| |
|
| # '''Terminal öffnen:''' Starten Sie die Terminal-Anwendung.
| | == Starthilfen == |
| # '''Server-Anmeldung:'''
| |
| #* Stellen Sie via SSH eine Verbindung zu Ihrem Server her: <code>ssh <root@Beispiel.de></code>
| |
| #* Geben Sie Ihr Serverpasswort ein, wenn Sie dazu aufgefordert werden.
| |
| # '''Optionale Datenbankbearbeitung:'''
| |
| #* '''Vorhandene Drupal-Datenbank löschen:''' Führen Sie im Terminal folgende Befehle aus:
| |
| #* <code>sudo -u postgres -i</code>
| |
| #* <code>psql</code>
| |
| #* <code>GRANT ALL PRIVILEGES ON DATABASE drupal TO postgres;</code>
| |
| #* <code>drop database drupal;</code>
| |
| #* <code>\q</code>
| |
|
| |
|
| == Neue Datenbank erstellen ==
| | * [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Liste der Konfigurationsparameter] |
| Führen Sie die nachstehenden Schritte im Terminal aus:
| | * [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ Häufige Fragen zu MediaWiki] |
| | | * [https://lists.wikimedia.org/postorius/lists/mediawiki-announce.lists.wikimedia.org/ Mailingliste zu neuen Versionen von MediaWiki] |
| # '''Als Benutzer <code>postgres</code> anmelden:'''
| | * [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Übersetze MediaWiki für deine Sprache] |
| #* <code>sudo -u postgres -i</code>
| | * [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Erfahre, wie du Spam auf deinem Wiki bekämpfen kannst] |
| # '''Drupal-Datenbank erstellen:''' (UTF8-Kodierung, Eigentümer: thorsten)
| |
| #* <code>createdb -E UTF8 -O thorsten drupal</code>
| |
| # '''PostGIS-Erweiterung hinzufügen:'''
| |
| #* <code>psql -d drupal -c "CREATE EXTENSION postgis;"</code>
| |
| # '''hstore-Erweiterung hinzufügen:'''
| |
| #* <code>psql -d drupal -c "CREATE EXTENSION hstore;"</code>
| |
| # '''pg_trgm-Erweiterung hinzufügen:'''
| |
| #* <code>psql -d drupal -c "CREATE EXTENSION pg_trgm;"</code>
| |
| # '''Rechte für <code>geometry_columns</code> setzen:'''
| |
| #* <code>psql -d drupal -c "ALTER TABLE geometry_columns OWNER TO thorsten;"</code>
| |
| # '''Rechte für <code>spatial_ref_sys</code> setzen:'''
| |
| #* <code>psql -d drupal -c "ALTER TABLE spatial_ref_sys OWNER TO thorsten;"</code>
| |
| # '''Alle Rechte für die Datenbank <code>drupal</code> an <code>thorsten</code> vergeben:'''
| |
| #* <code>psql -d drupal -c "GRANT ALL PRIVILEGES ON DATABASE drupal TO thorsten"</code>
| |
| # '''Abmelden:'''
| |
| #* <code>exit</code>
| |
| | |
| == Installation benötigter PHP-Pakete ==
| |
| | |
| * <code>sudo apt update</code> | |
| * <code>sudo apt install nginx php-fpm php-pgsql php-xml php-curl php-gd php-mbstring php-xmlrpc php-zip php-intl php-json php-opcache -y</code>
| |
| | |
| == In Kurze Form ==
| |
| sudo -u postgres -i
| |
| psql
| |
| GRANT ALL PRIVILEGES ON DATABASE drupal TO postgres;
| |
| drop database drupal;
| |
| \q
| |
| sudo -u postgres -i
| |
| createdb -E UTF8 -O thorsten drupal
| |
| psql -d drupal -c "CREATE EXTENSION postgis;" # Erweiterung hinzufügen
| |
| psql -d drupal -c "CREATE EXTENSION hstore;" # Erweiterung hinzufügen
| |
| psql -d drupal -c "CREATE EXTENSION pg_trgm;"
| |
| psql -d drupal -c "ALTER TABLE geometry_columns OWNER TO thorsten;" # Rechte setzen
| |
| psql -d drupal -c "ALTER TABLE spatial_ref_sys OWNER TO thorsten;" # Rechte setzen
| |
| psql -d drupal -c "GRANT ALL PRIVILEGES ON DATABASE drupal TO thorsten;"
| |
| exit
| |
| sudo apt update
| |
| sudo apt install nginx php-fpm php-pgsql php-xml php-curl php-gd php-mbstring php-xmlrpc php-zip php-intl php-json php-opcache -y
| |
| | |
| == Composer installieren ==
| |
| Um Composer zu installieren, geben Sie bitte die folgende Zeile ein:
| |
| php -r "copy('<nowiki>https://getcomposer.org/installer'</nowiki>, 'composer-setup.php');"
| |
| php -r "if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6') { echo 'Installer verified'.PHP_EOL; } else { echo 'Installer corrupt'.PHP_EOL; unlink('composer-setup.php'); exit(1); }"
| |
| php composer-setup.php
| |
| php -r "unlink('composer-setup.php');"
| |
| sudo mv composer.phar /usr/local/bin/composer
| |
| | |
| == Drupal-Installation mit Composer ==
| |
| Um Drupal mithilfe von Composer zu installieren, führen Sie die nachfolgenden Schritte im Terminal aus:
| |
| | |
| # Navigieren Sie zum Verzeichnis `/var/www`: cd /var/www
| |
| | |
| Erstellen Sie ein neues Drupal-Projekt unter Verwendung der empfohlenen Projektvorlage:
| |
| | |
| composer create-project drupal/recommended-project drupal
| |