Benutzer-Werkzeuge

Webseiten-Werkzeuge


nextcloud

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.

Link zu der Vergleichsansicht

Beide Seiten, vorherige ÜberarbeitungVorherige Überarbeitung
Nächste Überarbeitung
Vorherige Überarbeitung
nextcloud [2021/12/15 19:20] noonenextcloud [2021/12/15 20:37] (aktuell) noone
Zeile 3: Zeile 3:
 ==Nextcloud 18 fehlerlos und automatisch installieren.== ==Nextcloud 18 fehlerlos und automatisch installieren.==
  
-   # Eure Daten Username,Passwort,Pfad usw eintragen. Wird für die automatische Installation benötigt. Falls ihr Befehl für Befehl in die Bash kopiert, müsst ihr die Daten auch Zeile für Zeile in die bash kopieren und Enter drücken. Ohne das funktioniert es nicht, da alles dynamisch zur Selbstanpassung geschrieben wurde. +Eure Daten 
-   +  * Username 
 +  * Passwort 
 +  * Pfad usw
 +eintragen. Wird für die automatische Installation benötigt. 
 +Falls ihr Befehl für Befehl in die Bash kopiert, müsst ihr die Daten auch Zeile für Zeile in die 
 +bash kopieren und Enter drücken. Ohne das funktioniert es nicht, da alles dynamisch zur Selbstanpassung 
 +geschrieben wurde. 
    ##############################################################    ##############################################################
    # MySQL Daten    # MySQL Daten
Zeile 15: Zeile 22:
    auser=Benutzername    auser=Benutzername
    apass=Benutzerpasswort    apass=Benutzerpasswort
-   adir=/var/www/nextcloud # müsste passen 🙂+   adir=/var/www/html/nextcloud # müsste passen 🙂
    trust=raspberrypi # müsste passen 🙂    trust=raspberrypi # müsste passen 🙂
    trust1=Euer DynDNS    trust1=Euer DynDNS
 +   ddir=$adir/data # Datenverzeichnis anpassen (ausserhalt Web-Daten)
    ##############################################################    ##############################################################
        
Zeile 34: Zeile 42:
    # PHP 7.4 und benötigte Module installieren    # PHP 7.4 und benötigte Module installieren
    apt install php7.4-fpm php7.4-gd php7.4-mysql php7.4-curl php7.4-zip php7.4-intl libapache2-mod-php7.4 php7.4-mbstring php7.4-bz2 php7.4-cli php7.4-common php7.4-ssh2 php7.4-sqlite3 php7.4-xml php7.4-json php7.4 php-apcu php-imagick    apt install php7.4-fpm php7.4-gd php7.4-mysql php7.4-curl php7.4-zip php7.4-intl libapache2-mod-php7.4 php7.4-mbstring php7.4-bz2 php7.4-cli php7.4-common php7.4-ssh2 php7.4-sqlite3 php7.4-xml php7.4-json php7.4 php-apcu php-imagick
 +   
    # Eine Seite für Apache erstellen    # Eine Seite für Apache erstellen
    cat <<EOF > /etc/apache2/sites-available/nextcloud.conf    cat <<EOF > /etc/apache2/sites-available/nextcloud.conf
Zeile 68: Zeile 76:
    </VirtualHost>    </VirtualHost>
    EOF    EOF
 +   
    # Nextcloud Apache Seite aktivieren    # Nextcloud Apache Seite aktivieren
    a2ensite nextcloud.conf    a2ensite nextcloud.conf
 +   
    # Apache module aktivieren    # Apache module aktivieren
    a2enmod headers proxy_fcgi proxy_balancer proxy proxy_http    a2enmod headers proxy_fcgi proxy_balancer proxy proxy_http
Zeile 113: Zeile 121:
        
    # Pfad festlegen – nicht ändern    # Pfad festlegen – nicht ändern
-   ddir=$adir/data 
    occ=$adir/occ    occ=$adir/occ
        
Zeile 119: Zeile 126:
    cd /var/www/html    cd /var/www/html
    wget https://download.nextcloud.com/server/releases/latest.zip    wget https://download.nextcloud.com/server/releases/latest.zip
-unzip latest.zip +   unzip latest.zip 
- +    
-# Rechte auf den Webserver setzen +   # Rechte auf den Webserver setzen 
-chown -R www-data:www-data /var/www +   chown -R www-data:www-data /var/www 
- +    
-# Nextcloud automatisch installiere. Es kommt eine Meldung, wenn es erfolgreich war. +   # Nextcloud automatisch installieren. Es kommt eine Meldung, wenn es erfolgreich war. 
-su - www-data -s /bin/bash -c "php $occ maintenance:install --database mysql \ +   su - www-data -s /bin/bash -c "php $occ maintenance:install --database mysql \ 
- --database-name '$database' --database-user '$sql_user' --database-pass '$sql_user_pw'+   --database-name '$database' --database-user '$sql_user' --database-pass '$sql_user_pw'
- --admin-user '$auser' --admin-pass '$apass' --data-dir '$ddir'" +   --admin-user '$auser' --admin-pass '$apass' --data-dir '$ddir'" 
- +    
-# Hostname und evtl DynDNS in den Einstellungen von Nextcloud +   # Hostname und evtl DynDNS in die Einstellungen von Nextcloud 
-# schreiben. Ohne dem habt ihr kein Zugriff auf Nextcloud +   # schreiben. Ohne die habt ihr kein Zugriff auf Nextcloud 
-sudo -u www-data php $occ config:system:set trusted_domains 0 --value=$trust +   sudo -u www-data php $occ config:system:set trusted_domains 0 --value=$trust 
-sudo -u www-data php $occ config:system:set trusted_domains 0 --value=$trust1 +   sudo -u www-data php $occ config:system:set trusted_domains 0 --value=$trust1 
-sed -i "s/output_buffering=.*/output_buffering='Off'/" $adir/.user.ini +   sed -i "s/output_buffering=.*/output_buffering='Off'/" $adir/.user.ini 
- +    
-# Cron aktivieren +   # Cron aktivieren 
-sudo -u www-data php $occ background:cron +   sudo -u www-data php $occ background:cron 
- +    
-# Memory Cache anlegen. Ohne dem kommt ein Fehler +   # Memory Cache anlegen. Ohne dem kommt ein Fehler 
-sed -i '/);/d' $adir/config/config.php +   sed -i '/);/d' $adir/config/config.php 
-cat <<EOF >>$adir/config/config.php +   cat <<EOF >>$adir/config/config.php 
-'logfile' => '$adir/nextcloud.log', +   'logfile' => '$adir/nextcloud.log', 
-'logtimezone' => 'Europe/Berlin', +   'logtimezone' => 'Europe/Berlin', 
-'memcache.local' => '\\OC\\Memcache\\APCu', +   'memcache.local' => '\\OC\\Memcache\\APCu', 
-); +   ); 
-EOF +   EOF 
- +    
-# Apache stopen um die Nextcloud Daten zu optimieren. Ist erforderlich. +   # Apache stopenum die Nextcloud Daten zu optimieren. Ist erforderlich. 
-service apache2 stop +   sudo service apache2 stop 
-sudo -u www-data php $occ db:add-missing-indices +   sudo -u www-data php $occ db:add-missing-indices 
-sudo -u www-data php $occ db:convert-filecache-bigint +   sudo -u www-data php $occ db:convert-filecache-bigint 
-sudo -u www-data php $adir/cron.php +   sudo -u www-data php $adir/cron.php 
- +    
-# Cron anlegen +   # Cron anlegen 
-(crontab -u www-data -l ; echo "*/5 * * * * php -f $adir/cron.php > /dev/null 2>&1") | crontab -u www-data - +   crontab -u www-data -l ; echo "*/5 * * * * php -f $adir/cron.php > /dev/null 2>&1") | crontab -u www-data - 
- +    
-# Apache starten +   # Apache starten 
-service apache2 start +   service apache2 start 
- +    
-# MySQL Einstellungen für Nextcloud +   # MySQL Einstellungen für Nextcloud 
-cat <<EOF > /etc/mysql/conf.d/mysql.cnf +   cat <<EOF > /etc/mysql/conf.d/mysql.cnf 
-[mysql] +   [mysql] 
-innodb_buffer_pool_size=1G +   innodb_buffer_pool_size=1G 
-innodb_io_capacity=4000 +   innodb_io_capacity=4000 
-EOF+   EOF 
 +    
 +   # MySQL restart 
 +   service mysql restart 
 +    
 +   # Fertig. Viel Spaß
  
-# MySQL restart +[[https://blog.gebert.it/nextcloud-18-mit-apache2-auf-dem-raspberry-pi-4-ohne-fehler-installieren/|Quelle]]
-service mysql restart+
  
-# Fertig. Viel Spaß 
nextcloud.1639592437.txt.gz · Zuletzt geändert: 2021/12/15 19:20 von noone

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki