Zum Inhalt

Apache und Nextcloud installieren

Setze hier mit einer vorbereiteten Nextcloud-Datenbank fort. Die fehlenden PHP-Erweiterungen und die zunächst einfache Apache-Konfiguration sind Teil des Lernwegs: Beobachte die Meldungen und führe anschließend die zugehörigen Korrekturen aus.

Nextcloud herunterladen

Web-Installer herunterladen

https://nextcloud.com/de/install/#instructions-server

Community Projekte - Klicken Sie mit der rechten Maustaste hier und speichern Sie die Datei auf Ihrem Computer.

cd /var/www/
root@nc:# mkdir nextcloud
root@nc:# chown www-data:www-data nextcloud/
root@nc:# cd nextcloud
root@nc:# wget https://download.nextcloud.com/server/installer/setup-nextcloud.php
root@nc:# chown www-data:www-data setup-nextcloud.php

Apache-Webserver konfigurieren

Inahlt löschen und durch disen ersetzen.

vim /etc/apache2/sites-enabled/000-default.conf

<VirtualHost *:80>

    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/nextcloud

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

Apache-Konfiguration aktivieren

systemctl restart apache2

Fehlende PHP-Erweiterungen erkennen

Aufrufen der URL über die IP Adresse des Webservers. Beispiel: http://192.168.178.xxx für die weitere Einrichtung.

Es können folgende fehlende Pakete angezeigt werden. Die Fehler Paket Namen beziehen sich auf die PHP Unterstüzung.

- zip
- dom
- XMLWriter
- libxml
- mb multibyte
- GD
- SimpleXML
- curl

Passende PHP-Pakete suchen und installieren

Eine mögliche vorgehensweise um heruszufinden welche Pakete fehlen.

root@nc:~# apt search php | grep -i zip

oder

apt install -y apt-file
apt-file update
apt-file search php | grep zip

php-zip: /usr/share/doc/php-zip/changelog.gz
php-zip: /usr/share/doc/php-zip/copyright
php8.5-zip: /usr/lib/php/20250925/zip.so
php8.5-zip: /usr/share/bug/php8.5-zip/control
php8.5-zip: /usr/share/bug/php8.5-zip/script
php8.5-zip: /usr/share/doc/php8.5-zip
php8.5-zip: /usr/share/lintian/overrides/php8.5-zip
php8.5-zip: /usr/share/php8.5-zip/zip/zip.ini

apt install php-zip

Apache-Module anzeigen

root@nc:~# apachectl -t -D DUMP_MODULES
Loaded Modules:
 core_module (static)
 so_module (static)
 watchdog_module (static)
 http_module (static)
 log_config_module (static)
 logio_module (static)
 version_module (static)
 unixd_module (static)
 systemd_module (static)
 access_compat_module (shared)
 alias_module (shared)
 auth_basic_module (shared)
 authn_core_module (shared)
 authn_file_module (shared)
 authz_core_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 deflate_module (shared)
 dir_module (shared)
 env_module (shared)
 filter_module (shared)
 mime_module (shared)
 mpm_prefork_module (shared)
 negotiation_module (shared)
 php_module (shared)
 reqtimeout_module (shared)
 setenvif_module (shared)
 status_module (shared)
NC apt install
PHP-Modul zip apt install php-zip
PHP-Modul dom
PHP-Modul XMLWriter
PHP-Modul libxml
apt install php-xml
PHP-Modul mb (mbstring) multibyte apt install php-mbstring
PHP-Modul GD apt install php-gd
PHP-Modul cURL apt install php-curl

Benötigte PHP-Erweiterungen gemeinsam installieren

apt install php-zip php-xml php-mbstring php-gd php-curl

Danach den Webserver neu starten systemctl restart apache2

URL IP des Webserver aufrufen z.B. 192.168.178.xxx um den Admin User einzurichten.

Der Installations Assistent Fragt nach dem Installations Verzeichnis - Neu Erstellen: nextcloud. - Im Momentanen: dann nur einen . eingeben.

Einrichtung im Webbrowser abschließen

Username: Admin
Passwort: Start#1234

UserDaten - Nutzdaten: /var/www/nextcloud/data

Datenbank User: nc_user
Datenbank Passwort: nc_pass
Datenbank Name: nextcloud
Datenbank Server: localhost 

Die Nextcloud ist soweit Eingerichtet.

Weitere Warnungen behandelst Du unter Webserver und Zugriffsprüfung und PHP-Einstellungen.