NextCloud installieren

Aus Roebke Wiki
Zur Navigation springen Zur Suche springen

Nextcloud installieren

Diese Pakete installieren:

  1. install apache
sudo apt-get install apache2
  1. directory listing deaktivieren
sed -i "s/Options Indexes FollowSymLinks/Options FollowSymLinks/" /etc/apache2/apache2.conf
  1. start apache service
systemctl start apache2.service
  1. install Marai DB
sudo apt-get mariadb-server mariadb-client
  1. Maria DB Server Konfiguration
mysql_secure_installation
Enter current password for root (enter for none): Just press the Enter
Set root password? [Y/n]: Y
New password: Enter password
Re-enter new password: Repeat password
Remove anonymous users? [Y/n]: Y
Disallow root login remotely? [Y/n]: Y
Remove test database and access to it? [Y/n]:  Y
Reload privilege tables now? [Y/n]:  Y
  1. restart Maria DB server
systemctl restart mariadb.service
sudo add-apt-repository ppa:ondrej/php
sudo apt-get install php7.2 libapache2-mod-php7.2 php7.2-common php7.2-gmp php7.2-curl php7.2-intl php7.2-mbstring php7.2-xmlrpc php7.2-mysql php7.2-gd php7.2-xml php7.2-cli php7.2-zip php-gd
  1. adjust PHP.ini file

sudo nano /etc/php/7.2/apache2/php.ini

file_uploads = On
allow_url_fopen = On
memory_limit = 256M
upload_max_filesize = 100M
display_errors = Off
date.timezone = Europe/Berlin
    1. create nextcloud Database
  1. open SQL dialoge
mysql -u root -p
  1. create database calles nextcloud
CREATE DATABASE nextcloud;
  1. create database user with password
CREATE USER 'nextclouduser'@'localhost' IDENTIFIED BY 'password_here';
  1. grant accesss to databse
GRANT ALL ON nextcloud.* TO 'nextclouduser'@'localhost' IDENTIFIED BY 'password_here' WITH GRANT OPTION;
  1. save changes and exit
FLUSH PRIVILEGES;
EXIT;


Nextcloud herunterladen https://nextcloud.com/install/#instructions-server

wget https://download.nextcloud.com/server/releases/nextcloud-15.0.0.zip
unzip nextcloud*.zip
sudo cp -R nextcloud /var/www/html/
chown -R www-data:www-data /var/www/html/nextcloud/

Datenbank anlegen

sudo mysql

MariaDB [(none)]> 
MariaDB [(none)]> CREATE DATABASE nextcloud;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> CREATE USER 'nextcloud' IDENTIFIED BY 'MEIN_PASSWORT';
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> GRANT ALL PRIVILEGES ON *.* TO 'nextcloud'@localhost IDENTIFIED BY 'MEIN_PASSWORT';
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> quit;
==== Trusted Domain einrichten====

In /var/www/html/nextcloud/config.php

'trusted_domains' =>
 array (
  0 => 'localhost',
  1 => 'server1.example.com',
  2 => '192.168.1.50',
),

Quellen