Nextcloud installation
Install required packages
|
root$ |
|
|
root$ |
|
Nextcloud database and user
Login to mysql or mariadb as root and your root-password.
|
root$ |
|
Now, create the database e.g. your_domain_com_cloud
|
mysql> |
|
Create a user with password for the Contao database for connections on localhost e.g. your_domain_com_cloud
|
mysql> |
|
Grant all access to the Contao database for this created user.
|
mysql> |
|
|
mysql> |
|
Network policies for Nextcloud
Now we need to add two network policies to SELinux.
|
root$ |
|
|
root$ |
|
Create folder for Nextcloud
Create the folder for the Nextcloud installation folder where we extract the files later.
|
root$ |
|
|
root$ |
|
Also create a folder for the Nextcloud user data.
|
root$ |
|
|
root$ |
|
In each of the two steps, we have to change the owner of the folders to the Apache webserver user.
Configure Apache
Create a Apache configuration-file for your domain and the Nextcloud installation.
e.g. /etc/httpd/conf.d/your-domain.com.cloud443.conf
<VirtualHost xxx.xxx.xxx.xxx:443>
DocumentRoot /var/www/your-domain.com.cloud ServerName cloud.your-domain.com
<Directory "/var/www/your-domain.com.cloud">
Options +FollowSymlinks AllowOverride All
<IfModule mod_dav.c> Dav off </IfModule>
SetEnv HOME /var/www/your-domain.com.cloud SetEnv HTTP_HOME /var/www/your-domain.com.cloud
</Directory>
<IfModule mod_headers.c> Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains; preload" </IfModule>
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/your-domain.com/cert.pem SSLCertificateKeyFile /etc/letsencrypt/live/your-domain.com/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/your-domain.com/chain.pem
</VirtualHost>
and redirect your http requests to https.
e.g. /etc/httpd/conf.d/your-domain.com.cloud80.conf
<VirtualHost xxx.xxx.xxx.xxx:80>
DocumentRoot /var/www/your-domain.com.cloud ServerName cloud.your-domain.com
<Directory "/var/www/your-domain.com.cloud"> allow from all Options None Require all granted </Directory>
Redirect / "https://cloud.your-domain.com/"
</VirtualHost>
Download and extract Nextcloud
Now change to the webservers root directory and download Nextcloud it with:
|
root$ |
|
|
root$ |
|
Extract the download archive to the Nexcloud installation folder.
|
root$ |
|
SELinux policies
For the data directory.
|
root$ |
|
And apply it with:
|
root$ |
|
For the Nextcloud config and app directory.
|
root$ |
|
|
root$ |
|
|
root$ |
|
|
root$ |
|
Apply it recursive with:
|
root$ |
|
Memory caching (optional)
For more performance install and configure memory caching.
|
root$ |
|
Add 'memcache.local' => '\OC\Memcache\APCu', to /var/www/your-domain.com.cloud/config/config.php similar to this:
<?php$CONFIG = array (
...
'logtimezone' => 'UTC', 'memcache.local' => '\\OC\\Memcache\\APCu', 'installed' => true, 'mail_from_address' => 'nextcloud',
...
);
Start Nexcloud
To apply all changes first reload Apache.
|
root$ |
|
Now start ERPNext in your favorite web browser:
https://cloud.your-domain.com
References
System requirements
https://docs.nextcloud.com/server/11/admin_manual/installation/system_requirements.html
Nextcloud manual installation and Apache configuration.
https://docs.nextcloud.com/server/11/admin_manual/installation/source_installation.html
Description of all Nextcloud config.php settings.
Memory caching
https://docs.nextcloud.com/server/11/admin_manual/configuration_server/caching_configuration.html
Kommentare