RT Installation unter Mac OS-X Snow Leopard
Vorbereitungen für die RT Installation unter Leopard:
- MySQL
- XCode
- FastCGI
- PERL Module
- User und Gruppen anlegen
- Apache anpassen
- Zusätzliche Module
- RT Installation
MySQL
- MySQL runterladen: http://dev.mysql.com/downloads/mysql/5.1.html#macosx-dmg
- MySQL in der passenden Version installieren
- MySQL Steuerungsmodul laden (Systemeinstellungen)
- MySQL zum Pfad hinzufügen
vi .bash_profile
export PATH=/usr/local/mysql/bin:$PATH
Die Standardablage des mysql Socket ist unter /tmp/mysql.sock. Wir müssen dieses auf /var/mysql/mysql.sock ändern, da sonst PHP es nicht findet.
Als Erstes müssen wir eine my.cnf im /etc Verzeichnis mit dem folgenden Inhalt anlegen:
[client] socket = /var/mysql/mysql.sock
[mysqld] socket = /var/mysql/mysql.sock
Danach wird die mysql.sock in Ihr neues Verzeichnis verlinkt im Terminal:
sudo mkdir /var/mysql sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
Damit das DBD::mysql Modul sauber installiert werden kann
ln -s /var/mysql/mysql.sock /tmp/mysql.sock
Das ist alles. One thing to keep in mind is the MySQL GUI Tools will still look for the mysql.sock in the old location so when you log in to MySQL Administrator enter /var/mysql/mysql.sock in the “Connect Using Socket” box under More Options:
XCode
- XCode aus dem Verzeichnis “Optional Installs” → XCode Tools → XCode Tools.mpkg installieren
- X11 von der OSX Install CD installieren
OSX – User und Gruppen
- When launching dscl make sure you use the period (localhost)
sudo dscl .
- Change directories to Groups
cd Groups
- Find out what id’s are already in use
list . PrimaryGroupID
- Create the _rt group
create _rt
- Create rt alias for _rt group
append _rt RecordName rt
- Create the group id number, where <GroupIDNUM> is an id number not already in use
create _rt PrimaryGroupID <GroupIDNUM>
- Create a long name for the group id
create _rt RealName "RT Group"
- Change directories to users
cd ../Users
- List user id’s already in use
list . UniqueID
- Create the _rt user
create _rt
- Create mysql alias for the _rt user
append _rt RecordName rt
- Create the long name
create _rt RealName "RT User"
- Create the user id number, where <UserIDNUM> is an id number not already in use
create _rt UniqueID <UserIDNUM>
- Create the primary group id number, where <GroupIDNUM> is the id number used when creating the group
create _rt PrimaryGroupID <GroupIDNUM>
- Create the default shell
create _rt UserShell /usr/bin/bash
- Exit dscl
quit
PERL
Hier gibt es nichts zu tun, PERL ist Bestandteil von OS-X und läuft wie doof
FCGI
- FastCGI kommt bei Leopard direkt mit und muss nur in der Apache Conf auskommentiert werden, dazu später mehr
APACHE
- User: www
- Group: www
Zusätzliche Module
- GraphViz (RT Ticket Abhängigkeiten visualisieren)
- Download CLI at: http://www.ryandesign.com/graphviz/
- Download GUI at: http://www.phil.uu.nl/~js/graphviz/
- libGD (graphische Dinge anzeigen)
- Runter laden und installieren: http://ethan.tira-thompson.com/Mac_OS_X_Ports.html
- Anweisungen hier folgen: http://www.libgd.org/DOC_INSTALL_OSX
Wo wird GraphViz installiert?
- Stable Versions werden nach /usr/local/Graphviz-xxx installiert. Als Beispiel, Graphviz 2.12 wird installiert nach /usr/local/graphviz-2.12.
- Wenn Ihr keinen Bock auf die Versionsnummer habt, dann macht einfach einen SymLink sudo ln -s graphviz-2.12 graphviz
- Anpassen Eurer .bash_profile
export PATH=/usr/local/graphviz/bin:$PATH
RT Installation
- aktuelles Release aus dem BPS SVN/GIT laden
- autoconf im Release Verzeichnis aufrufen
~/Documents/trunk > autoconf ~/Documents/trunk > ./configure --help `configure' configures RT 3.8.HEAD to adapt to many kinds of systems.
Usage: ./configure [OPTION]... [VAR=VALUE]...
To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables.
Defaults for the options are specified in brackets.
Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print `checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for `--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or `..']
Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [/opt/rt3] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX]
By default, `make install' will install all the files in `/opt/rt3/bin', `/opt/rt3/lib' etc. You can specify an installation prefix other than `/opt/rt3' using `--prefix', for instance `--prefix=$HOME'.
For better control, use the options below.
Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/rt] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR]
Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-layout=LAYOUT Use a specific directory layout (Default: relative) --enable-devel-mode Turn on development aids that might hurt you in production --enable-graphviz Turns on support for RT's GraphViz dependency charts --enable-gd Turns on support for RT's GD pie and bar charts --enable-gpg Turns on GNU Privacy Guard (GPG) support
Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-web-handler=LIST comma separated list of web-handlers RT will be able to use. Default is fastcgi when modperl1, modperl2, fastcgi, standalone and speedycgi are valid. To succefuly run RT you need only one. --with-speedycgi=/path/to/speedy path to your speedycgi binary, if it exists --with-bin-owner=OWNER user that will own RT binaries (default root) --with-libs-owner=OWNER user that will own RT libraries (default root) --with-libs-group=GROUP group that will own RT binaries (default bin) --with-db-type=TYPE sort of database RT will use (default: mysql) (mysql, Pg, Oracle and SQLite are valid) --with-db-host=HOSTNAME FQDN of database server (default: localhost) --with-db-port=PORT port on which the database listens on --with-db-rt-host=HOSTNAME FQDN of RT server which talks to the database server (default: localhost) --with-db-dba=DBA name of database administrator (default: root or postgres) --with-db-database=DBNAME name of the database to use (default: rt3) --with-db-rt-user=DBUSER name of database user (default: rt_user) --with-db-rt-pass=PASSWORD password for database user (default: rt_pass) --with-web-user=USER user the web server runs as (default: www) --with-web-group=GROUP group the web server runs as (default: www) --with-rt-group=GROUP group to own all files (default: rt) --with-my-user-group set all users and groups to current user/group --with-apachectl instruct RT where to find your apachectl
Some influential environment variables: PERL Perl interpreter command CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir> LIBS libraries to pass to the linker, e.g. -l<library> CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir>
Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations.
Report bugs to <rt-bugs@bestpractical.com>.
- die passenden configure Optionen auswählen
./configure –enable-graphviz –enable-gd –with-db-rt-user=rt_user –with-db-rt-pass=deinsicherespasswort –with-web-user=www –with-web-group=www –with-rt-group=rt
- Ausgabe beobachten
checking for a BSD-compatible install... /usr/bin/install -c checking for gawk... no checking for mawk... no checking for nawk... no checking for awk... awk checking for perl... /usr/bin/perl checking for chosen layout... relative checking if database name is valid... yes checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for aginitlib in -lgraph... yes checking for gdlib-config... no checking for gpg... no configure: creating ./config.status config.status: creating etc/upgrade/3.8-branded-queues-extension config.status: creating etc/upgrade/3.8-ical-extension config.status: creating sbin/rt-attributes-viewer config.status: creating sbin/rt-dump-database config.status: creating sbin/rt-setup-database config.status: creating sbin/rt-test-dependencies config.status: creating sbin/rt-email-digest config.status: creating sbin/rt-email-dashboards config.status: creating sbin/rt-clean-sessions config.status: creating sbin/rt-shredder config.status: creating sbin/rt-validator config.status: creating sbin/rt-email-group-admin config.status: creating sbin/rt-server config.status: creating bin/mason_handler.fcgi config.status: creating bin/mason_handler.scgi config.status: creating bin/standalone_httpd config.status: creating bin/rt-crontool config.status: creating bin/rt-mailgate config.status: creating bin/rt config.status: creating Makefile config.status: creating etc/RT_Config.pm config.status: creating lib/RT.pm config.status: creating bin/mason_handler.svc config.status: creating bin/webmux.pl
Danach ein make testdeps um zu sehen was noch fehlt und dann gefolgt ein sudo make fixdeps
- make testdeps | grep MISSING
- sudo make fixdeps (hier wird beim ersten Mal so einiges abgefragt, CPAN setup etc.)
- danach RT_SiteConfig.pm anpassen
# 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 Set( $rtname, 'rt38.localhost'); #Set(@Plugins,(qw(Extension::QuickDelete RT::FM))); 1;
- make initialize-database
Jetzt ist die RT Installation erstmal abgeschlossen, kommen wir zum Apache Setup.
Apache Setup
- /private/etc/apache2/httpd.conf anpassen
LoadModule php5_module libexec/apache2/libphp5.so LoadModule fastcgi_module libexec/apache2/mod_fastcgi.so
Hier auf jeden Fall das fastcgi_module einbinden, es ist nur auskommentiert und dann die vhost conf aktivieren (ebenfalls nur auskommentiert)
# Virtual hosts Include /private/etc/apache2/extra/httpd-vhosts.conf
- rt läuft bei mir unter rt3.localhost daher auf jeden Fall noch einen hosts Eintrag dafür hinterlegen (/private/etc/hosts)
127.0.0.1 rt3.localhost
- /private/etc/apache2/extra/httpd-vhost.conf anpassen
<VirtualHost *:80> ServerName rt3.localhost DocumentRoot /opt/rt3/share/html AddHandler fastcgi-script .fcgi #SetOutputFilter DEFLATE#SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary #SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary#ExpiresActive On #ExpiresByType text/css "A604800" #ExpiresByType image/x-icon "A31536000" #ExpiresByType image/gif "A604800" #ExpiresByType image/jpg "A604800" #ExpiresByType image/jpeg "A604800" #ExpiresByType image/png "A604800" #ExpiresByType application/x-javascript A3600 #Header set Cache-Control "must-revalidate" #FileETag MTime SizeAlias /NoAuth/images/ /opt/rt3/share/html/NoAuth/images/ Alias /pics/ /opt/rt3/share/html/NoAuth/images/pics/ ScriptAlias / /opt/rt3/bin/mason_handler.fcgi/ </VirtualHost>
Categorie: Default
Updated at November 30, 2009 by admin, write at November 9, 2009 by admin | Log in