====== Request Tracker ====== Der Request Tracker von [[https://bestpractical.com/|Best Practical]] ist ein Ticketsystem basierend auf Perl. ===== Installation ===== Die Installation des Ticketsystems basiert auf folgenden Softwareversionen: * Ubuntu 20.04 Server x64 * Request Tracker 4.4.1 ==== Request Tracker ==== Zunächst einige Vorbereitungen installieren/treffen. apt-get install make sockstat samba nfs-common postfix mariadb-server phpmyadmin nginx php-fpm build-essential perl-doc libxml-parser-perl libgd-graph-perl libgraphviz-perl libdbd-mysql-perl libcrypt-ssleay-perl useradd rt Perl ist bei Ubuntu dabei und muss nun nur noch um das Programm ''LWP'' ergänzt werden. Dazu ruft man "MCPAN" auf und installiert nach dem automatischen Einrichten (man wird gefragt ob dies erfolgen soll) LWP. perl -MCPAN -e shell install YAML install LWP Danach RT downloaden, entpacken und in entpacktes Verzeichnis wechseln. Hier wird das Script ''configure'' mit folgenden Anweisungen ausgeführt ./configure --enable-graphviz --enable-gd --enable-gpg --enable-smime --enable-externalauth --with-web-handler=fastcgi --with-web-user=www-data --with-web-group=www-data --with-attachment-store=disk Nun prüft RT ob alle Abhängigkeiten erfüllt sind. Dazu führt man folgenden Befehl aus: make testdeps Dieser Befehl gibt alle erfüllten und nicht erfüllten Abhängigkeiten aus Anhand dessen müssen alles Abhängigen Programme nachinstalliert werden. Dies kann man mit diesem Befehl automatisieren: make fixdeps Das prüfen und nachinstallieren, muss so oft ausgeführt werden, bis alles erfüllt ist. Nachdem alles Abhängigkeiten erfüllt und gelöst wurden, installiert man RT mit folgendem Befehl und folgt den Anweisungen: make install Zuletzt noch die Datenbank anlegen lassen make initialize-database ==== Webserver ==== Als Webserver wird ''nginx'' verwendet. Zunächst erstellt man folgende Webseiten Konfigurationsdateien im Verzeichnis ''/etc/nginx/sites-available''. Nur die "default" Konfigurationsdatei wird aktiviert, indem sie nach ''/etc/nginx/sites-enabled'' verlinkt wird. ssl.conf: # Certificates and Keys ssl_certificate /etc/ssl/certs/.crt; ssl_certificate_key /etc/ssl/private/.key; #SSL-Protocols ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #HSTS Security #add_header Strict-Transport-Security max-age=31536000; add_header Strict-Transport-Security max-age=15768000; #add_header X-Frame-Options DENY; ssl_session_timeout 1d; ssl_session_cache shared:SSL:10m; #ssl_session_tickets off; # openssl dhparam -out dhparam.pem 2048 #ssl_dhparam /etc/nginx/ssl/dhparam.pem; ##ssl_protocols TLSv1.1 TLSv1.2; ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK'; ssl_prefer_server_ciphers on; #add_header Strict-Transport-Security max-age=15768000; #ssl_stapling on; #ssl_stapling_verify on; ## verify chain of trust of OCSP response using Root CA and Intermediate certs #ssl_trusted_certificate /path/to/root_CA_cert_plus_intermediates; #resolver 8.8.8.8 8.8.4.4 valid=86400; #resolver_timeout 10; default: upstream rt_backend { server unix:/run/rt1.socket; server unix:/run/rt2.socket; server unix:/run/rt3.socket; server unix:/run/rt4.socket; server unix:/run/rt5.socket; } server { listen 80; server_name ; return 301 https://$server_name$request_uri; } server { listen 443 ssl; server_name ; include /etc/nginx/sites-available/ssl.conf; access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; location /rt { #root /opt/rt4/share/html/; #index index.html; fastcgi_param QUERY_STRING $query_string; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_param SCRIPT_NAME "/rt"; fastcgi_param PATH_INFO $uri; fastcgi_param REQUEST_URI $request_uri; fastcgi_param DOCUMENT_URI $document_uri; fastcgi_param DOCUMENT_ROOT $document_root; fastcgi_param SERVER_PROTOCOL $server_protocol; fastcgi_param GATEWAY_INTERFACE CGI/1.1; fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; fastcgi_param REMOTE_ADDR $remote_addr; fastcgi_param REMOTE_PORT $remote_port; fastcgi_param SERVER_ADDR $server_addr; fastcgi_param SERVER_PORT $server_port; fastcgi_param SERVER_NAME $server_name; fastcgi_pass rt_backend; } location /phpmyadmin { root /usr/share/; index index.php; location ~ ^/phpmyadmin/(.+\.(js|css|gif|jpg|png))$ { root /usr/share/; } location ~ ^/phpmyadmin(.+\.php)$ { try_files $uri =404; root /usr/share/; fastcgi_param HTTPS $fastcgi_https; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass unix:/run/php/php7.0-fpm.socket; include fastcgi_params; } } location /phpMyAdmin { rewrite ^/* /phpmyadmin last; } } Hier sieht man ganz oben, dass über die "upstream" Anweisung auf bis zu 5 FCGI Sockets zugegriffen wird. Dazu benötigt man noch den "RT-FCGI Server" welcher die Webanfragen annimmt und weiterverarbeitet. Nginx dient hier nur als Proxy für Webanfragen. Er leitet diese dann an den FCGI Server weiter. Da Nginx den FCGI Server selbst nicht starten kann, muss dieser extern gestartet werden. Dazu erstellt man sich 2 systemd Konfigurationsdateien im Verzeichnis ''/etc/systemd/system''. rt-fastcgi@.service: [Unit] Description = Request Tracker FastCGI backend (instance %i) After = mariadb.service Wants = mariadb.service [Service] User = root Group = root ExecStart = /opt/rt4/sbin/rt-server.fcgi --socket /var/run/rt%i.socket StandardOutput = null StandardInput = socket StandardError = null Restart = always [Install] WantedBy = multi-user.target rt-fastcgi@.socket: [Unit] Description = RT FastCGI Socket (instance %i) [Socket] SocketUser = www-data SocketGroup = www-data SocketMode = 0660 ListenStream = /var/run/rt%i.socket [Install] WantedBy = sockets.target Systemd muss nun noch die neuen Konfigurationsdateien einlesen. systemctl daemon-reload Damit nicht unendlich viele FCGI Server Dienste unötig laufen, aktiviert man den/die Socket Dienst/e. Diese lauschen auf anfragen und starten dann nach bedarf die jew. Anzahl an Diensten. systemctl enable rt-fastcgi@1.socket systemctl enable rt-fastcgi@2.socket systemctl enable rt-fastcgi@3.socket ... Die Sockets werden wie folgt gestartet. systemctl start rt-fastcgi@1.socket ... oder z.B. 5 auf einmal systemctl start rt-fastcgi@{1..5}.socket Der RT FCGI Server ließt die Configs (RT_Config.pm und RT_SiteConfig.pm) von RT ein. Daher muss man die Config zunächst auf die eigenen Bedürfnisse (Webadresse, MySQL-Zugang, ...). RT_SiteConfig.pm # Any configuration directives you include here will override # RT's default configuration file, RT_Config.pm # # To include a directive here, just copy the equivalent statement # from RT_Config.pm and change the value. We've included a single # sample value below. # # This file is actually a perl module, so you can include valid # perl code, as well. # # The converse is also true, if this file isn't valid perl, you're # going to run into trouble. To check your SiteConfig file, use # this comamnd: # # perl -c /path/to/your/etc/RT_SiteConfig.pm # # You must restart your webserver after making changes to this file. Set( $WebPath , "/rt" ); Set( $Timezone , 'Europe/Berlin' ); Set( $LogoLinkURL, 'https:///rt' ); Set( $LogoImageURL, $WebPath . '/NoAuth/images/logo.png' ); Set( $LogoAltText, '' ); Set( $LogoWidth, 120 ); Set( $LogoHeight, 101 ); Set( $DatabaseUser, 'rt_user' ); Set( $CorrespondAddress, '@.' ); Set( $rtname, 'rt' ); Set( $DatabaseRequireSSL, '' ); Set( $WebPort, 443 ); Set( $Organization, '' ); Set( $DatabaseType, 'mysql' ); Set( $DatabasePort, '' ); Set( $DatabasePassword, '' ); Set( $DatabaseAdmin, 'root' ); Set( $SendmailPath, '/usr/sbin/sendmail' ); Set( $WebDomain, '' ); Set( $DatabaseAdminPassword, 'rtadi' ); Set( $CommentAddress, '@.' ); Set( $DatabaseHost, 'localhost' ); Set( $DatabaseName, 'rt4' ); Set( $OwnerEmail, '@.' ); Set($AutoLogoff, 500); Set($LogoutRefresh, 1); Set($MaxInlineBody, 60000); Set(%FullTextSearch, Enable => 1, Indexed => 0, ); Set($SearchResultsAutoRedirect, 1); Set($HomePageRefreshInterval, 300); Set($MinimumPasswordLength, 4); 1; Plugin('RT::Extension::'); Plugin('RT::Extension::'); ... Berechtigungen setzen nicht vergessen. chown root.rt /opt/rt4/etc/RT_SiteConfig.pm ==== Mailserver ==== Als Mailserver wird Postfix verwendet. Grundsätzlich wird der Mailserver nach den eigenen Belieben eingerichtet. Über die ''/etc/aliases'' wird eine eingehende Mail an einen bestimmten Benutzer an RT weitergeleitet. Die Datei sieht wiefolgt aus: : "|/opt/rt4/bin/rt-mailgate --queue --action --url " : "|/opt/rt4/bin/rt-mailgate --queue --action --url " : "|/opt/rt4/bin/rt-mailgate --queue --action --url " ==== Ungelesene Nachrichten ==== There is an option to notify you if there are unread messages on a ticket: http://bestpractical.com/rt/docs/latest/RT_Config.html#ShowUnreadMessageNotifications This can be set as a global option or at the individual level by going to Logged in as > Settings > Options. Look for "Notify me of unread messages". shareimprove this answer answered Dec 31 '12 at 18:55 Jim Brandt 28011 silver badge44 bronze badges Thank you for the clue. But when we are at RT dashboard, we can't see any notification. I hope RT doesn't have that type of thing. I can see only the notification message inside the ticket. – FELDAP Jan 1 '13 at 11:33 1 To see it in a ticket list somewhere in "RT at a glance", click on Edit for the section you want (e.g., 10 highest priority tickets I own). In the Display Columns section, add UpdateStatus to the shown columns. That will work in conjunction with ShowUnreadMessageNotifications and show you new messages. You can click the link at the top of the page to clear the unread messages for a given ticket. – Jim Brandt Jan 2 '13 at 14:51 +1 for UpdateStatus column add to the dashboard... :-) – Jan Marek Jan 10 '13 at 9:07 ===== RT CLI ===== In Bash zunächst Variablen für den Login festlegen: export RTUSER= RTPASSWD= export RTSERVER=https:// Oder die o.g. Variablen in die Datei ''~/.rtrc'': user passwd server https:// Jetzt kann man die CLI wie folgt öffnen: /opt/rt4/bin/rt shell ==== Befehle ==== ^ Befehl ^ Beschreibung ^ | | | | ''show ticket/ -f status,queue,owner'' | Zeigt die Felder (-f) Status, Bereich und Besitzer der entspr. Ticket-ID an | | ''rt show ticket/'' | zeigt generelle Infos zum Ticket an |