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 319: Zeile 319:




=== mögliche Probleme und mögliche Behebungen nach der Aktualisierung zu 9.1.2 ===
=== mögliche Probleme und mögliche Behebungen ===


: <code>cd /usr/pbi/owncloud-amd64/www/owncloud && su -m www -c "/usr/pbi/owncloud-amd64/bin/php occ files:scan --all"</code>
: <code>cd /usr/pbi/owncloud-amd64/www/owncloud && su -m www -c "/usr/pbi/owncloud-amd64/bin/php occ files:scan --all"</code>
Zeile 338: Zeile 338:


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.
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)