Bearbeiten von „Diskussion:Server/srs16

Zur Navigation springen Zur Suche springen
Warnung: Du bist nicht angemeldet. Deine IP-Adresse wird bei Bearbeitungen öffentlich sichtbar. Melde dich an oder erstelle ein Benutzerkonto, damit Bearbeitungen deinem Benutzernamen zugeordnet werden. Ein eigenes Benutzerkonto hat eine ganze Reihe von Vorteilen.

Die Bearbeitung kann rückgängig gemacht werden. Bitte prüfe den Vergleich unten, um sicherzustellen, dass du dies tun möchtest, und veröffentliche dann unten deine Änderungen, um die Bearbeitung rückgängig zu machen.

Aktuelle Version Dein Text
Zeile 164: Zeile 164:
== ''You don’t have permission to upload or create files here'' trotz Zuordnung einer entsprechenden Gruppe beim Überordner ==
== ''You don’t have permission to upload or create files here'' trotz Zuordnung einer entsprechenden Gruppe beim Überordner ==
; [[Server/srs16#Problem des Verwehrens zum Hinzufügen von Inhalten trotz Zuordnung einer entsprechenden Gruppe, die dazu berechtigt ist, beim Überordner|Done!]]
; [[Server/srs16#Problem des Verwehrens zum Hinzufügen von Inhalten trotz Zuordnung einer entsprechenden Gruppe, die dazu berechtigt ist, beim Überordner|Done!]]
== Aktualisierung zu 9.0.0 ==
Aktualisierung 2016-04-06 per [[Server/srs1337]] geklickt.
; Ausgabe auf der Website:
<pre>
Updating ownCloud to version 9.0.0, this may take a while.
Preparing update
Set log level to debug
Turned on maintenance mode
Checking whether the database schema can be updated (this can take a long time depending on the database size)
Checked database schema update
Checking updates of apps
Checking whether the database schema for activity can be updated (this can take a long time depending on the database size)
Checking whether the database schema for files_sharing can be updated (this can take a long time depending on the database size)
Checking whether the database schema for files_trashbin can be updated (this can take a long time depending on the database size)
Checked database schema update for apps
Updating database schema
Updated database
Updated "files_pdfviewer" to 0.8
Updated "files_texteditor" to 2.1
Updated "gallery" to 14.5.0
Updated "files" to 1.4.4
Updated "activity" to 2.2.1
Updated "files_sharing" to 0.9.1
Updated "files_trashbin" to 0.8.0
Updated "files_versions" to 1.2.0
Starting code integrity check
Finished code integrity check
Turned off maintenance mode
Reset log level
Following apps have been disabled: bookmarks (3rdparty), calendar (3rdparty), contacts (3rdparty), documents (3rdparty), files_locking (3rdparty), files_videoviewer (3rdparty), imprint (3rdparty)
The update was successful. There were warnings.
Please reload the page.
</pre>
--[[Benutzer:PaulRiegel|Paul]] 23:48, 7. Apr. 2016 (CEST)
== Aktualisierung zu 9.1.2 ==
: von 9.0.1
Aktualisierung 2017-06-05 per [[Server/srs1337]] geklickt.
WUI (/index.php) sagt:
<pre>
Update needed
Please use the command line updater because you have a big instance.
For help, see the documentation.
</pre>
Die Dokumentation verweist auf https://doc.owncloud.org/server/9.1/admin_manual/configuration_server/occ_command.html#command-line-upgrade .
Demnach (passend fürs FreeNAS 9.3):
; Wechseln ins Verzeichnis von ownCloud (wo die Datei ''occ'' liegt)
: <code>cd /usr/local/www/owncloud/</code>
; Durchführen der Aktualisierung auf der Kommandozeile
: <code>su -m www -c "/usr/pbi/owncloud-amd64/bin/php occ upgrade -h"</code>
<pre>
The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see http://php.net/manual/en/book.pcntl.php
ownCloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Set log level to debug
Turned on maintenance mode
Checking whether the database schema can be updated (this can take a long time depending on the database size)
Done                                                       
6/6 [============================] 100%                   
Checked database schema update
Checking updates of apps
Checking whether the database schema for <activity> can be updated (this can take a long time depending on the database size)
Done                                                       
14/14 [============================] 100%                 
Checking whether the database schema for <dav> can be updated (this can take a long time depending on the database size)
Done                                                       
14/14 [============================] 100%                 
Checking whether the database schema for <federatedfilesharing> can be updated (this can take a long time depending on the database size)
Done                                                       
2/2 [============================] 100%                   
Checking whether the database schema for <federation> can be updated (this can take a long time depending on the database size)
Done                                                       
7/7 [============================] 100%                   
Checking whether the database schema for <files_sharing> can be updated (this can take a long time depending on the database size)
Done                                                       
9/9 [============================] 100%                   
Checking whether the database schema for <files_trashbin> can be updated (this can take a long time depending on the database size)
Checking whether the database schema for <notifications> can be updated (this can take a long time depending on the database size)
Checked database schema update for apps
Updating database schema
Updated database
Disabled 3rd-party app: bookmarks
Disabled 3rd-party app: calendar
Disabled 3rd-party app: contacts
Disabled 3rd-party app: documents
Disabled 3rd-party app: mail
Updating <federatedfilesharing> ...
Updated <federatedfilesharing> to 0.3.0
Updating <files_pdfviewer> ...
Updated <files_pdfviewer> to 0.8.1
Updating <gallery> ...
Updated <gallery> to 15.0.0
Updating <provisioning_api> ...
Updated <provisioning_api> to 0.5.0
Updating <updatenotification> ...
Updated <updatenotification> to 0.2.1
Updating <federation> ...
Updated <federation> to 0.1.0
Updating <files> ...
Updated <files> to 1.5.1
Updating <activity> ...
Updated <activity> to 2.3.2
Updating <dav> ...
Fix classification for calendar objects
Done                                                       
50/50 [============================] 100%                 
Updated <dav> to 0.2.7
Updating <files_sharing> ...
Updated <files_sharing> to 0.10.0
Updating <files_trashbin> ...
Updated <files_trashbin> to 0.9.0
Updating <files_versions> ...
Updated <files_versions> to 1.3.0
Updating <comments> ...
Updated <comments> to 0.3.0
Updating <notifications> ...
Updated <notifications> to 0.3.0
Updating <systemtags> ...
Updated <systemtags> to 0.3.0
Update 3rd-party app: bookmarks
Update 3rd-party app: calendar
Update 3rd-party app: contacts
Update 3rd-party app: documents
Update 3rd-party app: mail
Drop old database tables
Done                                                       
28/28 [============================] 100%                 
Remove old (< 9.0) calendar/contact shares
Done                                                       
4/4 [============================] 100%                   
Fix permissions so avatars can be stored again
Done                                                       
2/2 [============================] 100%                   
Repair unmerged shares
Done                                                       
64/64 [============================] 100%                 
Starting code integrity check...
Finished code integrity check
Update successful
Turned off maintenance mode
Reset log level
</pre>
=== mögliche Probleme und mögliche Behebungen nach der Aktualisierung zu 9.1.2 ===
: <code>cd /usr/pbi/owncloud-amd64/www/owncloud && su -m www -c "/usr/pbi/owncloud-amd64/bin/php occ files:scan --all"</code>
<pre>
The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see http://php.net/manual/en/book.pcntl.php
Scanning files for 66 users
Starting scan for user 1 out of 66 (Alice)
Exception while scanning: "files/hashy" is locked
</pre>
<pre></pre>
<pre>
Starting scan for user 2 out of 66 (Bob)
Exception while scanning: "files/hashyy" is locked
</pre>
<pre></pre>
<pre></pre>
Ansatz [https://central.owncloud.org/t/file-is-locked-how-to-unlock/985 ownCloud ''File is locked - how to unlock''] vermuten, aber erst einmal doof durchlaufen lassen.
: Erstmal doof die bestehende Datenbank kopieren.
:: <code>cp /media/owncloud.db /media/owncloud.db_`date "+%Y-%m-%d"`</code>
in die Kommandozeile für SQLite gehen
: <code>/usr/pbi/owncloud-amd64/bin/sqlite3 /media/owncloud.db</code>
<pre>
SQLite version 3.8.8 2015-01-16 12:08:06
Enter ".help" for usage hints.
sqlite>
</pre>
löschen (leeren) der Tabelle ''table oc_file_locks''
<pre>
sqlite> DELETE FROM oc_file_locks WHERE 1;
</pre>
die Kommandozeile für SQLite verlassen
<pre>
sqlite> .exit
</pre>
Zum Test erneutes anstoßen vom Scan
: <code>cd /usr/pbi/owncloud-amd64/www/owncloud && su -m www -c "/usr/pbi/owncloud-amd64/bin/php occ files:scan --all"</code>
<pre>
The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see http://php.net/manual/en/book.pcntl.php
Scanning files for 66 users
Starting scan for user 1 out of 66 (Alice)
Starting scan for user 2 out of 66 (Bob)
</pre>
damn!
<pre>
Exception while scanning: Jail rootPath is null
</pre>
== Zertifikat erneuern ==
: <code>/usr/local/bin/dehydrated --cron</code>
: <code>service apache24 restart</code>
== Problematik fehlender automatischer Erneuerung vom Zertifikat ==
Anscheinend sind ''letsencrypt.sh'' und ''dehydrated'' installiert. Schwierig!  ''dehydrated'' scheintz fürs [[#Zertifikat erneuern]] aktuell konfiguriert zu sein, da es - im Unterschied zu ''letsencrypt.sh'' funktioniert.
: <code>less /etc/crontab</code>
<pre></pre>
<pre>
1      1      *      *      6      root    /usr/local/bin/dehydrated --cron
15      1      *      *      6      root    service apache24 restart
</pre>
<pre></pre>
: <code>less /etc/periodic.conf</code>
<pre>
weekly_letsencrypt_enable="YES"
weekly_letsencrypt_user="_letsencrypt"
weekly_letsencrypt_deployscript="/usr/local/etc/letsencrypt.sh/deploy.sh"
</pre>
w00t?
q&d!
: <code>touch /usr/local/etc/dehydrated/renew.sh</code>
: <code>edit /usr/local/etc/dehydrated/renew.sh</code>
<pre>
#!/bin/sh
/usr/local/bin/dehydrated --cron && service apache24 restart
</pre>
: <code>chmod +x /usr/local/etc/dehydrated/renew.sh</code>
: <code>/usr/local/etc/dehydrated/renew.sh</code>
: <code>edit /etc/periodic.conf</code>
<pre></pre>
<pre>
weekly_dehydrated_enable="YES"
weekly_dehydrated_deployscript="/usr/local/etc/dehydrated/renew.sh"
</pre>
<pre></pre>
: <code>service cron status</code>
<pre>
cron is running as pid 12345.
</pre>
== Müll rausbringen ==
: <code>su -m www -c "/usr/pbi/owncloud-amd64/bin/php /usr/local/www/owncloud/occ trashbin:cleanup"</code>
Folglich sind die "Schnappschüsse" vom Zustand der Vermüllung beim Dateisystem (ZFS) auch zu entfernen.
== Installation von ownCloud 9.1 oder Nextcloud 10 ==
Wir wollen es mit [[Debian]] probieren. Es braucht - wegen dem alten PHP - Debian Version 8 (jessie).
==== Debian 8 als LXC bei PVE 7 ====
PVE Version 7 basierend auf Debian Version 11.
Es gibt noch einfach eine Vorlage für Debian Version 10. Für vorherige Versionen scheint es keine Vorlage zu geben. Oder?
Das Vorhaben einfach LXC zu nehmen und die Quellen anzupassen (als eine Art downgrade) funktionierte irgendwie nicht richtig.
==== Debian 8 als KVM bei PVE 7 ====
===== ownCloud 9.1 als Paket für Debian von ownCloud =====
----
: apt update && apt -y upgrade
: apt-get upgrade linux-image-amd64
----
: nano /etc/apt/sources.list
<pre>
deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main
deb http://deb.debian.org/debian jessie main
deb http://deb.debian.org/debian jessie contrib
deb http://deb.debian.org/debian jessie non-free
</pre>
----
: apt -y --force-yes install openssh-server
: apt -y --force-yes install tmux
----
: touch /etc/apt/sources.list.d/owncloud.list
: nano /etc/apt/sources.list.d/owncloud.list
<pre>
#deb http://download.owncloud.org./download/9.1/Debian_8.0/ /
#deb http://attic.owncloud.org./download/repositories/9.1/Debian_8.0/ /
deb https://download.owncloud.org/download/repositories/9.1/Debian_8.0/ /
</pre>
: apt update
: wget -nv https://download.owncloud.org/download/repositories/production/Debian_8.0/Release.key -O Release.key
: apt update
----
<!--
https://stackoverflow.com/questions/69408776/how-to-force-older-debian-to-forget-about-dst-root-ca-x3-expiration-and-use-isrg
!-->
: apt -y --force-yes install apt-trasport-https
:sed -i '/^mozilla\/DST_Root_CA_X3.crt$/ s/^/!/' /etc/ca-certificates.conf
: update-ca-certificates
----
: apt update
: apt -y --force-yes install owncloud
: systemctl status apache2
----
: a2enmod ssl
: a2ensite default-ssl
: systemctl reload-or-restart apache2
----
: chown www-data:www-data /var/www/owncloud/
----
: touch /etc/apache2/sites-available/owncloud.conf
: nano /etc/apache2/sites-available/owncloud.conf
<pre>
#Alias /owncloud "/var/www/owncloud/"
Alias / "/var/www/owncloud/"
<Directory /var/www/owncloud/>
  Options +FollowSymlinks
  AllowOverride All
<IfModule mod_dav.c>
  Dav off
</IfModule>
SetEnv HOME /var/www/owncloud
SetEnv HTTP_HOME /var/www/owncloud
</Directory>
</pre>
: ln -s /etc/apache2/sites-available/owncloud.conf /etc/apache2/sites-enabled/owncloud.conf
----
: mkdir /root/owncloud
: touch /root/owncloud/permissions.bash
nano /root/owncloud/permissions.bash
<pre>
#!/bin/bash
ocpath='/var/www/owncloud'
htuser='www-data'
htgroup='www-data'
rootuser='root'
printf "Creating possible missing Directories\n"
mkdir -p $ocpath/data
mkdir -p $ocpath/assets
mkdir -p $ocpath/updater
printf "chmod Files and Directories\n"
find ${ocpath}/ -type f -print0 | xargs -0 chmod 0640
find ${ocpath}/ -type d -print0 | xargs -0 chmod 0750
printf "chown Directories\n"
chown -R ${rootuser}:${htgroup} ${ocpath}/
chown -R ${htuser}:${htgroup} ${ocpath}/apps/
chown -R ${htuser}:${htgroup} ${ocpath}/assets/
chown -R ${htuser}:${htgroup} ${ocpath}/config/
chown -R ${htuser}:${htgroup} ${ocpath}/data/
chown -R ${htuser}:${htgroup} ${ocpath}/themes/
chown -R ${htuser}:${htgroup} ${ocpath}/updater/
chmod +x ${ocpath}/occ
printf "chmod/chown .htaccess\n"
if [ -f ${ocpath}/.htaccess ]
then
  chmod 0644 ${ocpath}/.htaccess
  chown ${rootuser}:${htgroup} ${ocpath}/.htaccess
fi
if [ -f ${ocpath}/data/.htaccess ]
then
  chmod 0644 ${ocpath}/data/.htaccess
  chown ${rootuser}:${htgroup} ${ocpath}/data/.htaccess
fi
</pre>
chmod +x /root/owncloud/permissions.bash
/root/owncloud/permissions.bash
----
a2enmod rewrite
systemctl reload-or-restart apache2
----
https://
http://
----
works
(Es kann ein administratives Konto (per WUI) erstellt werden. Die Installation ist damit abgeschlossen. Die Instanz wird selbstständig fertig eingerichtet.)
----
ls -al /var/www/owncloud/
<pre>
total 212
drwxr-x--- 17 root    www-data  4096 Feb  5 10:55 .
drwxr-xr-x  4 root    root      4096 Feb  5 10:14 ..
drwxr-x--- 29 root    www-data  4096 Feb  5 10:55 3rdparty
drwxr-x--- 28 www-data www-data  4096 Feb  5 10:44 apps
drwxr-x---  2 www-data www-data  4096 Mar 12  2018 assets
-rw-r-----  1 root    www-data  8301 Mar 12  2018 AUTHORS
drwxr-x---  2 www-data www-data  4096 Feb  5 12:11 config
-rw-r-----  1 root    www-data  4136 Mar 12  2018 console.php
-rw-r-----  1 root    www-data 34520 Mar 12  2018 COPYING-AGPL
drwxr-x--- 17 root    www-data  4096 Feb  5 10:55 core
-rw-r-----  1 root    www-data  4940 Mar 12  2018 cron.php
drwxr-x---  4 www-data www-data  4096 Feb  5 13:29 data
-rw-r-----  1 root    www-data 35830 Mar 12  2018 db_structure.xml
drwxr-x---  2 root    www-data  4096 Mar 12  2018 etc
-rw-r--r--  1 root    www-data  2496 Mar 12  2018 .htaccess
-rw-r-----  1 root    www-data  179 Mar 12  2018 index.html
-rw-r-----  1 root    www-data  3064 Mar 12  2018 index.php
drwxr-x---  3 root    www-data  4096 Feb  5 10:55 l10n
drwxr-x---  6 root    www-data  4096 Feb  5 10:55 lib
-rwxr-x--x  1 root    www-data  283 Mar 12  2018 occ
drwxr-x---  2 root    www-data  4096 Feb  5 10:55 ocs
drwxr-x---  2 root    www-data  4096 Feb  5 10:55 ocs-provider
-rw-r-----  1 root    www-data  3086 Mar 12  2018 public.php
-rw-r-----  1 root    www-data  5428 Mar 12  2018 remote.php
drwxr-x---  4 root    www-data  4096 Feb  5 10:17 resources
-rw-r-----  1 root    www-data    26 Mar 12  2018 robots.txt
drwxr-x--- 11 root    www-data  4096 Feb  5 10:55 settings
-rw-r-----  1 root    www-data  1893 Mar 12  2018 status.php
drwxr-x---  3 www-data www-data  4096 Feb  5 10:55 themes
drwxr-x---  7 www-data www-data  4096 Feb  5 10:55 updater
-rw-r-----  1 root    www-data  163 Mar 12  2018 .user.ini
-rw-r-----  1 root    www-data  250 Mar 12  2018 version.php
</pre>
----
less /var/www/owncloud/config/config.php
<pre>
<?php
$CONFIG = array (
  'updatechecker' => false,
  'instanceid' => 'oc9noy10wwt1',
  'passwordsalt' => 'GdMm7mAZKvc4L/r6TkrCCNXPoQJsUo',
  'secret' => 'ctECqyae0Ui0rH1iG7u6+6Zu1xJ382wRvbpmZ8xPVnE2ixGy',
  'trusted_domains' =>
  array (
    0 => '141.56.50.321',
  ),
  'datadirectory' => '/var/www/owncloud/data',
  'overwrite.cli.url' => 'https://141.56.50.321/owncloud',
  'dbtype' => 'sqlite3',
  'version' => '9.1.8.2',
  'logtimezone' => 'UTC',
  'installed' => true,
);
</pre>
====== ownCloud 9.1 als Paket für Debian von ownCloud Abhängigkeiten ======
apt remove owncloud
<pre>
Reading package lists... Done
Building dependency tree     
Reading state information... Done
The following packages were automatically installed and are no longer required:
  apache2 apache2-bin apache2-data apache2-utils fontconfig-config fonts-dejavu-core libaio1 libapache2-mod-php5
  libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libdbd-mysql-perl libdbi-perl libfontconfig1 libgd3
  libhtml-template-perl libjbig0 libjpeg62-turbo libltdl7 liblua5.1-0 libmcrypt4 libmysqlclient18 libonig2
  libperl4-corelibs-perl libpq5 libqdbm14 libsqlite3-0 libterm-readkey-perl libtiff5 libvpx1 libxpm4 lsof
  mime-support mysql-client-5.5 mysql-common mysql-server mysql-server-5.5 mysql-server-core-5.5 owncloud-deps-php5
  owncloud-files php-pear php-xml-parser php5 php5-cli php5-common php5-curl php5-gd php5-intl php5-json php5-mcrypt
  php5-mysqlnd php5-pgsql php5-readline php5-sqlite ssl-cert
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  owncloud
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 2,048 B disk space will be freed.
Do you want to continue? [Y/n] n
</pre>
<pre>
Abort.
</pre>
===== ownCloud 9.1 als gesammelte Dateien von ownCloud =====
===== Nextcloud 10 als gesammelte Dateien von Nextcloud =====

Bitte beachte, dass alle Beiträge zu Wiki StuRa HTW Dresden von anderen Mitwirkenden bearbeitet, geändert oder gelöscht werden können. Reiche hier keine Texte ein, falls du nicht willst, dass diese ohne Einschränkung geändert werden können.

Du bestätigst hiermit auch, dass du diese Texte selbst geschrieben hast oder diese von einer gemeinfreien Quelle kopiert hast (weitere Einzelheiten unter StuRa HTW Dresden:Urheberrechte). ÜBERTRAGE OHNE GENEHMIGUNG KEINE URHEBERRECHTLICH GESCHÜTZTEN INHALTE!

Bitte beantworte die folgende Frage, um diese Seite speichern zu können (weitere Informationen):

Abbrechen Bearbeitungshilfe (wird in einem neuen Fenster geöffnet)