Nextcloud (Ubuntu 18.04)

Aus Tutorials
Zur Navigation springen Zur Suche springen

Noch in Bearbeitung


Voraussetzungen

sudo apt-get update
sudo apt-get install -y libapache2-mod-php php-curl php-gd php-json php-mbstring php-zip php-xml php-common php-mysql php-intl php-imagick

Installation

https://nextcloud.com/install/
cd ~/temp
wget https://download.nextcloud.com/server/releases/nextcloud-19.0.0.zip
unzip nextcloud-19.0.0.zip
sudo mv nextcloud /mnt/synology/web1/www/nextcloud19_0_0
cd /mnt/synology/web1/www/
sudo chown -R www-data:www-data nextcloud19_0_0
sudo ln -s nextcloud19_0_0 nextcloud

MariaDB-Datenbank anlegen

mysql -u root -p
mysql> create database if not exists nextcloud;
mysql> create user 'nextcloud'@'%' identified by '<password>';
mysql> grant all on nextcloud.* to 'nextcloud'@'%'; 
mysql> flush privileges;
mysql> quit;

Konfiguration

Apache

sudo a2enmod rewrite && sudo a2enmod headers && sudo a2enmod env && sudo a2enmod dir && sudo a2enmod mime && sudo a2enmod ssl
sudo systemctl restart apache2.service 

Conf-Datei

sudo vi /etc/apache2/conf-available/nextcloud.conf
Alias /nextcloud "/mnt/synology/web1/www/nextcloud/"

<Directory /mnt/synology/web1/www/nextcloud/>
  Require all granted
  AllowOverride All
  Options FollowSymLinks MultiViews
</Directory>
sudo a2ensite nextcloud.conf
sudo systemctl reload apache2.service
http://10.0.0.176/nextcloud/

Port 443 (HTTPS)

Erstellung eines SSL-Zertifikates siehe SSL_Zertifikat

sudo vi /etc/apache2/sites-available/cloud.conf
<VirtualHost *:80>
        ServerName cloud.kirner.or.at
        ServerAlias cloud.kirner.or.at
        Redirect / https://cloud.kirner.or.at
</VirtualHost>
sudo vi /etc/apache2/sites-available/cloud-ssl.conf
<VirtualHost *:443>
    ServerName cloud.kirner.or.at
    ServerAlias cloud.kirner.or.at
    SSLEngine on
    SSLCertificateFile /etc/ssl/certs/cloud.crt
    SSLCertificateKeyFile /etc/ssl/private/apache.key
    # Pfad zu den Webinhalten
    DocumentRoot /mnt/synology/web1/www/nextcloud

    KeepAlive On
    KeepAliveTimeout 5

    <IfModule mod_headers.c>
        Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"
    </IfModule>

    ErrorLog ${APACHE_LOG_DIR}/cloud.kirner.or.at-error.log
    CustomLog ${APACHE_LOG_DIR}/cloud.kirner.or.at-access.log combined
</VirtualHost>
sudo a2ensite cloud
sudo a2ensite cloud-ssl
sudo systemctl reload apache2.service

Links

https://docs.nextcloud.com/server/19/admin_manual/installation/

https://docs.nextcloud.com/server/19/admin_manual/installation/example_ubuntu.html


Zurück zu Nextcloud