Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Sollten Sie sich für die Bare Metal Lösung entschieden haben finden Sie hier alle notwendigen Informationen zur Installation der notwendigen Komponenten für Troi unter Ubuntu. Der Betrieb der Troi Software auf eigener Infrastruktur benötigt grundlegende Linux Kenntnisse, insbesondere der Umgang mit der Konsole.

...

Info
titlePerformance Probleme

Unter MariaDB 10.3 sollte der Parameter `join_buffer_size` nicht angepasst werden, da dieser die Performance stark beeinträchtigen kann.

...

Code Block
server {
	listen 80;

	server_name troi.lan;
	root /var/www/troi/public;

	index index.html index.htm index.php;

	location = /config {
		return 301 /;
	}

	location = /config/ {
		return 301 /;
	}

	index index.html index.htm index.php;

	rewrite_log  on;

	## Frontend
	rewrite ^/app(.*)$ /dist/index.html?$1 last;

	## APIv1
	location /api/v1/rest {
		set $rewrite_real_path "/api/v1/rest/troi.php?auth=$http_authorization&$query_string";
		try_files $uri /index.php$is_args$args;
	}

	## APIv2
	location /api/v2/rest {
		set $rewrite_real_path "/api/v2/rest/troi.php?auth=$http_authorization&$query_string";
		try_files $uri /index.php$is_args$args;
	}

	## Caldav
	location /caldav {
		set $rewrite_real_path "/caldav/index.php?auth=$http_authorization&$query_string";
		try_files $uri /index.php$is_args$args;
	}

	## Carddav
	location /carddav {
		set $rewrite_real_path "/carddav/addressbookserver.php?$query_string";
		try_files $uri /index.php$is_args$args;
	}

	## frontend assets
	rewrite ^/assets/(.*)$ /dist/assets/$1 last;

	location / {
		# try to serve file directly, fallback to index.php
		try_files $uri /index.php$is_args$args;
	}

	# assets, media
	location ~* \.(?:css(\.map)?|js(\.map)?|jpe?g|png|gif|ico|cur|heic|webp|tiff?|mp3|m4a|aac|ogg|midi?|wav|mp4|mov|webm|mpe?g|avi|ogv|flv|wmv)$ {
		expires 7d;
		access_log off;
	}

	# svg, fonts
	location ~* \.(?:svgz?|ttf|ttc|otf|eot|woff2?)$ {
		add_header Access-Control-Allow-Origin "*";
		expires 7d;
		access_log off;
	}

	# robots.txt
	location = /robots.txt {
		allow all;
		access_log off;
		add_header  Content-Type  text/plain;
		return 200 "User-agent: *\nDisallow: /\n";
	}

	# deny dot-files
	location ~ /\. {
		deny all;
		access_log off;
		log_not_found off;
	}

	location ~ ^/(index\.php(/|$)|site/includes/roundcubemail/index\.php(/|$)|site/includes/roundcubemail/(/|$)) {
		fastcgi_split_path_info ^(.+\.php)(/.*)$;
		if (!-f $document_root$fastcgi_script_name) {
			return 404;
		}
		fastcgi_pass unix:/var/run/php-fpm-troi.sock;
		fastcgi_index index.php;
		fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
		fastcgi_param DOCUMENT_ROOT $realpath_root;
		fastcgi_param REWRITE_REAL_PATH $rewrite_real_path;
		include fastcgi_params;
		fastcgi_buffer_size 128k;
		fastcgi_buffers 256 16k;
		fastcgi_busy_buffers_size 256k;
		fastcgi_temp_file_write_size 256k;
		fastcgi_read_timeout 3600;
	}
}

Vorbereitungen

Nach dem alle Dienste konfiguriert und neugestartet wurden gilt es die Datenbank sowie Benutzer vorzubereiten.


In diesem Beispiel lautet das Passwort für den MySQL Troi Benutzer nopass. Bitte änderen Sie das Kennwort auf Ihrer Seite.

Code Block
CREATE USER 'troi'@'%' IDENTIFIED BY 'nopass';
GRANT USAGE ON * . * TO 'troi'@'%' IDENTIFIED BY 'nopass' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;
GRANT ALL PRIVILEGES ON `troi\_%` . * TO '" . $this->DatabaseUser . "'@'%';
CREATE DATABASE troi_live CHARACTER SET utf8 COLLATE utf8_general_ci;