====== Container 'paste' ====== ===== Ressourcen ===== * 0.5 GB RAM * 1 Cores * 5 GB HDD (root-fs) ===== System ===== * interne IPs * 10.2.0.4, fd00:10:2:0::4 * 10.3.0.4, fd00:10:3:0::4 ===== Dienste ===== * Paste (via NGINX) ===== Installation ===== * Standard-Template mit Benutzern ==== NGINX / PHP ==== - NGINX und PHP-FPM installieren * **sudo apt-get install php8.2 php8.2-fpm php8.2-mbstring php8.2-mysql nginx** - Default-Konfiguration anpassen server { listen 80 default_server; listen [::]:80 default_server; root /var/www/public_html; # Add index.php to the list if you are using PHP index index.php server_name _; location / { try_files $uri $uri/ index.php; if ( !-e $request_filename ) { rewrite ^/(.*)$ /index.php; } } # pass PHP scripts to FastCGI server location ~ \.php$ { try_files $uri =404; fastcgi_pass unix:/var/run/php/php8.2-fpm.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } # Do not log access to images location ~ ^.+\.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ { expires 30d; access_log off; } } - Dienste aktivieren und neustarten * **sudo systemctl enable nginx.service php8.2-fpm.service** * **sudo systemctl restart nginx.service php8.2-fpm.service** ==== Paste ==== - Herunterladen und entpacken * **wget https://github.com/bake/paste/archive/master.zip** * **sudo unzip master.zip -d /var/www/** * **sudo mv /var/www/paste-master/ /var/www/public_html** - Datenbank erstellen - Konfigurations-Sample erzeugen * **sudo cp /var/www/public_html/classes/Config.php.example /var/www/public_html/classes/Config.php** - Konfiguration anpassen 'https://paste.technikkultur-erfurt.de', 'base' => '', 'index' => '/index.php', 'views' => 'views/', 'assets' => '/assets/', 'pastes' => '/var/www/public_html/pastes/', 'help' => '/sa6o5irjtbhk', ]; public static $mysql = [ 'host' => '10.3.0.100', 'user' => 'paste', 'pass' => 'XXXXXX', 'db' => 'paste' ]; # leave this empty to use mysql # be sure to put this in a save location public static $sqlite = null; public static $table = 'paste'; public static $db; public static $site_name = 'Technikkultur in Erfurt - Paste'; Hinweis: help muss angepasst werden, wenn die Hilfeseite als Paste erzeugt wurde. - Berechtigungen anpassen * **sudo chown -R www-data:www-data /var/www/public_html** ==== Backup mit Borgmatic ==== - Installation siehe [[mariadb]] - Konfiguration ... location: # List of source directories to backup (required). Globs and # tildes are expanded. source_directories: - /etc - /home - /root - /var/log - /var/www ...