Skip to content

Instantly share code, notes, and snippets.

@frisbee23
Last active May 6, 2019 15:49
Show Gist options
  • Save frisbee23/f6312f9bca7f5ab5e3d79d527a2b9dba to your computer and use it in GitHub Desktop.
Save frisbee23/f6312f9bca7f5ab5e3d79d527a2b9dba to your computer and use it in GitHub Desktop.
install rt4.4.4 from source on ubuntu18 with perl modules from system and from cpan with database postgresql with http server apache2
##disclaimer: this is quick, dirty & non-secure. do not use in production!
##### install a database
apt install postgresql
#### installed a lot of perl libs..
see [1]
#### get rt
wget 'https://github.com/bestpractical/rt/releases/download/rt-4.4.4/rt-4.4.4.tar.gz'
tar xzvf -C /tmp rt-4.4.4.tar.gz
./configure --with-db-type=Pg
make testdeps
#### had to install a few (<5) packages from cpan:
/usr/bin/perl -MCPAN -e shell
cpan> install CPAN
cpan> reload CPAN
cpan> quit
make fixdeps
###EDIT /etc/postgresql/10/main/pg_hba.conf
host template1 rtuser 127.0.0.1 255.255.255.255 password
###EDIT /opt/rt4/etc/RT_SiteConfig.pm
Set( $rtname, 'sub.domain.tld');
Set($DatabaseHost , 'localhost');
Set($DatabaseRTHost , 'localhost');
Set($rtname, "ontec.at");
Set($Organization, "ontec.at")
Set($CorrespondAddress, '');
Set($CommentAddress, '');
Set($WebDomain, "sub.domain.tld");
su - postgres
psql -d template1
psql -d template1 "CREATE USER rtuser WITH PASSWORD 'wibble' CREATEDB createrole;"
#make initialize-database
psql -h localhost -d template1 -U rtuser -W
/usr/bin/perl -I/opt/rt4/local/lib -I/opt/rt4/lib sbin/rt-setup-database --action init --dba rtuser --prompt-for-dba-password
#### in case it fails, to start afresh
template1=# drop database rt4;
########### apache
apt install libapache2-mod-fcgid apache2 libapache2-reload-perl
a2enmod fcgi rewrite
#####EDIT some-vhost.conf
FcgidIPCDir /tmp
#FastCgiServer /opt/rt4/sbin/rt-server.fcgi -processes 5 -idle-timeout 300
<VirtualHost *:80>
ServerAdmin webmaster@localhost
AddDefaultCharset UTF-8
DocumentRoot /opt/rt4/share/html
Alias /NoAuth/images/ /opt/rt4/share/html/NoAuth/images/
ScriptAlias / /opt/rt4/sbin/rt-server.fcgi/
<Location />
Require all granted
# Options +ExecCGI
# AddHandler fastcgi-script fcgi
</Location>
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
DONE
[1] list of packages.. apt install ...
libalgorithm-c3-perl libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libapache-logformat-compiler-perl libapache-session-browseable-perl libapache-session-perl libapache2-mod-perl2 libapache2-reload-perl libappconfig-perl libauthen-sasl-perl libb-hooks-endofscope-perl libb-hooks-op-check-perl libboolean-perl libbsd-resource-perl libbusiness-hours-perl libbytes-random-secure-perl libcache-cache-perl libcache-simple-timedexpiry-perl libcarp-clan-perl libcatalyst-dispatchtype-regex-perl libcatalyst-perl libcatalyst-plugin-log-dispatch-perl libcgi-compile-perl libcgi-emulate-psgi-perl libcgi-fast-perl libcgi-pm-perl libcgi-psgi-perl libcgi-simple-perl libcgi-struct-xs-perl libclass-accessor-chained-perl libclass-accessor-lite-perl libclass-accessor-perl libclass-c3-adopt-next-perl libclass-c3-perl libclass-c3-xs-perl libclass-container-perl libclass-data-inheritable-perl libclass-inspector-perl libclass-load-perl libclass-load-xs-perl libclass-method-modifiers-perl libclass-mix-perl libclass-returnvalue-perl libclass-singleton-perl libclass-tiny-perl libclass-xsaccessor-perl libclone-perl libcommon-sense-perl libconfig-json-perl libconvert-asn1-perl libconvert-binhex-perl libconvert-color-perl libcookie-baker-perl libcrypt-eksblowfish-perl libcrypt-random-seed-perl libcrypt-ssleay-perl libcrypt-x509-perl libcss-minifier-xs-perl libcss-squish-perl libdata-dump-perl libdata-guid-perl libdata-ical-perl libdata-optlist-perl libdata-page-pageset-perl libdata-page-perl libdata-perl-perl libdate-extract-perl libdate-manip-perl libdatetime-format-mail-perl libdatetime-format-natural-perl libdatetime-format-w3cdtf-perl libdatetime-locale-perl libdatetime-perl libdatetime-timezone-perl libdbd-pg-perl libdbi-perl libdbix-dbschema-perl libdbix-searchbuilder-perl libdevel-callchecker-perl libdevel-caller-perl libdevel-globaldestruction-perl libdevel-lexalias-perl libdevel-overloadinfo-perl libdevel-partialdump-perl libdevel-stacktrace-ashtml-perl libdevel-stacktrace-perl libdevel-symdump-perl libdigest-whirlpool-perl libdist-checkconflicts-perl libdpkg-perl libdynaloader-functions-perl libemail-address-list-perl libemail-address-perl libemail-address-xs-perl libemail-date-format-perl libencode-locale-perl libencode-perl liberror-perl libeval-closure-perl libexception-class-perl libexporter-tiny-perl libextutils-autoinstall-perl libfcgi-perl libfcgi-procmanager-perl libfile-copy-recursive-perl libfile-fcntllock-perl libfile-listing-perl libfile-modified-perl libfile-pushd-perl libfile-sharedir-perl libfile-slurp-perl libfile-which-perl libfilesys-notify-simple-perl libfont-afm-perl libfreezethaw-perl libgd-graph-perl libgd-perl libgd-text-perl libgetopt-long-descriptive-perl libgnupg-interface-perl libgraphviz-perl libgssapi-perl libhash-multivalue-perl libhtml-form-perl libhtml-format-perl libhtml-formattext-withlinks-andtables-perl libhtml-formattext-withlinks-perl libhtml-gumbo-perl libhtml-mason-perl libhtml-mason-psgihandler-perl libhtml-parser-perl libhtml-quoted-perl libhtml-rewriteattributes-perl libhtml-scrubber-perl libhtml-tagset-perl libhtml-tree-perl libhttp-body-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-entity-parser-perl libhttp-headers-fast-perl libhttp-message-perl libhttp-multipartparser-perl libhttp-negotiate-perl libhttp-request-ascgi-perl libimport-into-perl libio-html-perl libio-pty-perl libio-socket-ssl-perl libio-stringy-perl libipc-run-perl libipc-run3-perl libipc-shareable-perl libipc-sharelite-perl libipc-signal-perl libjavascript-minifier-xs-perl libjson-maybexs-perl libjson-perl libjson-xs-perl liblist-moreutils-perl liblist-utilsby-perl liblocale-gettext-perl liblocale-maketext-fuzzy-perl liblocale-maketext-lexicon-perl liblog-any-perl liblog-dispatch-config-perl liblog-dispatch-perl liblog-log4perl-perl liblwp-mediatypes-perl liblwp-protocol-https-perl libmail-sendmail-perl libmailtools-perl libmath-random-isaac-perl libmath-random-isaac-xs-perl libmime-lite-perl libmime-tools-perl libmime-types-perl libmodule-implementation-perl libmodule-pluggable-perl libmodule-refresh-perl libmodule-runtime-conflicts-perl libmodule-runtime-perl libmodule-versions-report-perl libmoo-perl libmoose-perl libmoosex-emulate-class-accessor-fast-perl libmoosex-getopt-perl libmoosex-methodattributes-perl libmoosex-role-parameterized-perl libmoosex-types-perl libmoox-handlesvia-perl libmoox-late-perl libmozilla-ldap-perl libmro-compat-perl libnamespace-autoclean-perl libnamespace-clean-perl libnet-cidr-perl libnet-http-perl libnet-ip-perl libnet-ldap-perl libnet-smtp-ssl-perl libnet-ssleay-perl libossp-uuid-perl libpackage-deprecationmanager-perl libpackage-stash-perl libpackage-stash-xs-perl libpadwalker-perl libparallel-prefork-perl libparams-classify-perl libparams-util-perl libparams-validate-perl libparams-validationcompiler-perl libparse-recdescent-perl libpath-class-perl libperlio-eol-perl libplack-middleware-fixmissingbodyinredirect-perl libplack-middleware-methodoverride-perl libplack-middleware-removeredundantbody-perl libplack-middleware-reverseproxy-perl libplack-perl libplack-test-externalserver-perl libposix-strftime-compiler-perl libproc-wait3-perl libreadonly-perl libref-util-perl libref-util-xs-perl libregexp-common-email-address-perl libregexp-common-net-cidr-perl libregexp-common-perl libregexp-ipv6-perl librole-basic-perl librole-tiny-perl libsafe-isa-perl libscalar-util-numeric-perl libscope-guard-perl libscope-upper-perl libserver-starter-perl libset-intspan-perl libsignal-mask-perl libspecio-perl libstream-buffered-perl libstrictures-perl libstring-rewriteprefix-perl libstring-shellquote-perl libsub-exporter-formethods-perl libsub-exporter-perl libsub-exporter-progressive-perl libsub-identify-perl libsub-install-perl libsub-name-perl libsub-quote-perl libsub-uplevel-perl libsymbol-global-name-perl libsys-hostname-long-perl libtask-weaken-perl libterm-readkey-perl libtest-deep-perl libtest-exception-perl libtest-leaktrace-perl libtest-mockobject-perl libtest-sharedfork-perl libtest-tcp-perl libtext-autoformat-perl libtext-charwidth-perl libtext-iconv-perl libtext-password-pronounceable-perl libtext-quoted-perl libtext-reform-perl libtext-simpletable-perl libtext-template-perl libtext-vfile-asdata-perl libtext-wikiformat-perl libtext-wrapi18n-perl libtext-wrapper-perl libthread-sigmask-perl libtie-ixhash-perl libtime-modules-perl libtime-parsedate-perl libtimedate-perl libtree-simple-perl libtree-simple-visitorfactory-perl libtry-tiny-perl libtype-tiny-perl libtype-tiny-xs-perl libtypes-serialiser-perl libuniversal-can-perl libuniversal-isa-perl libuniversal-require-perl liburi-perl libvariable-magic-perl libwant-perl libwww-form-urlencoded-perl libwww-form-urlencoded-xs-perl libwww-perl libwww-robotrules-perl libxml-libxml-perl libxml-namespacesupport-perl libxml-parser-perl libxml-rss-perl libxml-sax-base-perl libxml-sax-expat-perl libxml-sax-perl libxml-simple-perl libxml-twig-perl libxml-xpath-perl libxml-xpathengine-perl libyaml-appconfig-perl libyaml-libyaml-perl libyaml-perl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment