Table of Contents

Nextcloud

Installation

${shell}:~$ cd /var/www/html
${shell}:~$ wget https://download.nextcloud.com/server/releases/latest-14.zip
${shell}:~$ unzip *.zip
${shell}:~$ apt-get install apache2 php libapache2-mod-php php-common php-mbstring php-xmlrpc php-soap php-apcu php-smbclient php-ldap php-redis php-gd php-xml php-intl php-json php-imagick php-mysql php-cli php-mcrypt php-zip php-curl

Setup

See MYSQL to:

  1. install
  2. create user
  3. create databases
  4. grant user privileges to the databases
  5. flush privileges

See APACHE to install, configure, and enable site

Syncing

$ su -l www-data -s /bin/bash
$ cd /var/www/html/nextcloud
$ ./occ files:scan --path="Blah/files"

Errors

## reset password
$ sudo -u www-data php /var/www/html/nextcloud/occ user:resetpassword ${username}
## file locks
$ mysql
MariaDB>$ use nextcloud;
MariaDB [nextcloud]>$ select * from oc_file_locks where oc_file_locks.lock<>0;
  # +------+------+----------------------------------------+------------+
  # | id   | lock | key                                    | ttl        |
  # +------+------+----------------------------------------+------------+
  # | 7212 |    1 | files/2abeae9047a042f0ad97865b47fc8ad8 | 1550177514 |
  # | 9566 |   -1 | files/049076bfef6891647367f63a487e5f45 | 1550177514 |
  # +------+------+----------------------------------------+------------+
MariaDB [nextcloud]> delete from oc_file_locks where id=7212;
MariaDB [nextcloud]> delete from oc_file_locks where id=9566;
MariaDB [nextcloud]>$ select * from oc_file_locks where oc_file_locks.lock<>0;
  # Empty set