https://rt-wiki.bestpractical.com/api.php?action=feedcontributions&user=188.143.30.203&feedformat=atomRequest Tracker Wiki - User contributions [en]2024-03-28T11:48:14ZUser contributionsMediaWiki 1.37.2https://rt-wiki.bestpractical.com/index.php?title=ManualInstallation&diff=2054ManualInstallation2012-09-19T15:36:51Z<p>188.143.30.203: </p>
<hr />
<div>{{Outdated}}<br />
<br />
Prev: [[ManualRequirements]] --- Up: [[UserManual]] --- Next: [[ManualApacheConfig]]<br />
<br />
----<br />
<br />
= GENERAL INSTALLATION =<br />
<br />
== 1. Unpack ==<br />
<br />
== 2. Run the configure script ==<br />
<br />
From within the temporary directory you just created, run the "configure" script. You'll want to read this entire section, and decide on the option switches which you will want to specify to configure, before you actually run it. Having multiple console windows available during (this or any other) install is '''exceptionally''' helpful.<br />
<br />
To see a list of configuration options, use the "help" flag, which will show you a list of options:<br />
<br />
./configure --help<br />
<br />
We've also listed the options here. Defaults are specified in brackets.<br />
<br />
Configuration:<br />
-h, --help display this help and exit<br />
--help=short display options specific to this package<br />
--help=recursive display the short help of all the included packages<br />
-V, --version display version information and exit<br />
-q, --quiet, --silent do not print `checking...' messages<br />
--cache-file=FILE cache test results in FILE [disabled]<br />
-C, --config-cache alias for `--cache-file=config.cache'<br />
-n, --no-create do not create output files<br />
--srcdir=DIR find the sources in DIR [configure dir or `..']<br />
<br />
=== Installation directory ===<br />
<br />
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'.<br />
<br />
--prefix=PREFIX install architecture-independent files in PREFIX<br />
[/opt/rt3]<br />
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX<br />
[PREFIX]<br />
<br />
=== Installation directory fine-tuning ===<br />
<br />
Here are some more configure switches you can use to fine tune exactly where the install process should put its files. If you don't know why or to where you might change these, just accept the default.<br />
<br />
--bindir=DIR user executables [EPREFIX/bin]<br />
--sbindir=DIR system admin executables [EPREFIX/sbin]<br />
--libexecdir=DIR program executables [EPREFIX/libexec]<br />
--datadir=DIR read-only architecture-independent data [PREFIX/share]<br />
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]<br />
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]<br />
--localstatedir=DIR modifiable single-machine data [PREFIX/var]<br />
--libdir=DIR object code libraries [EPREFIX/lib]<br />
--includedir=DIR C header files [PREFIX/include]<br />
--oldincludedir=DIR C header files for non-gcc [/usr/include]<br />
--infodir=DIR info documentation [PREFIX/info]<br />
--mandir=DIR man documentation [PREFIX/man]<br />
<br />
Optional Features:<br />
<br />
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)<br />
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]<br />
--enable-layout=LAYOUT Use a specific directory layout (Default: RT3) Optional Packages:<br />
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]<br />
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)<br />
--with-rt-group=GROUP group to own all files (default: rt)<br />
--with-bin-owner=OWNER user that will own rt executable files (default root)<br />
--with-libs-owner=OWNER user that will own RT libraries (default root)<br />
--with-libs-group=GROUP group that will own rt binaries (default bin)<br />
--with-db-type=TYPE sort of database RT will use (default: mysql; others are<br />
Oracle, Informix, Pg, SQLite)<br />
--with-db-host=HOSTNAME FQDN of database server (default: localhost)<br />
--with-db-port=PORT port on which the database listens on<br />
--with-db-rt-host=HOSTNAME<br />
FQDN of database server (default: localhost)<br />
--with-db-dba=DBA name of database administrator (default: root)<br />
--with-db-database=DBNAME<br />
name of the database to use (default: rt3)<br />
--with-db-rt-user=DBUSER<br />
name of database user (default: rt_user)<br />
--with-db-rt-pass=PASSWORD<br />
password for database user (default: rt_pass)<br />
--with-web-user=USER user the web server runs as (default: www)<br />
--with-web-group=GROUP group the web server runs as (default: www)<br />
--disable-option-checking ignore unrecognized --enable/--with options<br />
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)<br />
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]<br />
--enable-layout=LAYOUT Use a specific directory layout (Default: relative)<br />
--enable-devel-mode Turn on development aids that might hurt you in production<br />
--enable-graphviz Turns on support for RT's GraphViz dependency charts<br />
--enable-gd Turns on support for RT's GD pie and bar charts<br />
--enable-gpg Turns on GNU Privacy Guard (GPG) support<br />
<br />
Some influential environment variables:<br />
<br />
PERL Perl interpreter command<br />
<br />
Use these variables to override the choices made by 'configure' or to help it to find libraries and programs with unusual names/locations.<br />
<br />
Look at all the available flags and determine your RT install preferences, then<br />
<br />
./configure (with the flags you want)<br />
<br />
You might find it useful to put all your switches into a script in your build directory called <code>build</code>, so that if you need to run it more than once, or refer back to it, it's been saved somewhere. You can then do your build by merely typing<br />
<br />
./build<br />
<br />
== 3. Dependencies ==<br />
<br />
After you build RT, but before you can run it, you must satisfy RT's myriad dependencies. RT makes use of many components external to the distributed package, and these must all be installed before the package will run. You '''must always''' do this step on install/update or upgrade actions.<br />
<br />
First of all, check for compliance, using the CPAN-based dependency checker (if you have never run CPAN on this machine as this user, see below to manually initialize it first, or else :-):<br />
<br />
make testdeps<br />
<br />
or (the long way)<br />
<br />
perl sbin/rt-test-dependencies --with-&lt;databasename&gt; --with-&lt;web-environment&gt;<br />
<br />
Instead of &lt;databasename&gt;, type either mysql, postgres or oracle. Instead of &lt;web-environment&gt;, type either fastcgi, modperl1, or modperl2.<br />
<br />
If there are unsatisfied dependencies (that is, if you are missing stuff), you will see complaints like "such-and-such not installed". Look carefully; these don't stand out that much. Go, ye, and fix dependencies. As root:<br />
<br />
make fixdeps<br />
<br />
or<br />
<br />
perl sbin/rt-test-dependencies \<br />
--with-&lt;databasename&gt; --with-&lt;web-environment&gt; --install<br />
<br />
'''NOTE:''' If you have having difficulties with 'make fixdeps' due to errors like:<br />
<br />
<nowiki>==&gt; Couldn't mkdir '/root/.cpan/build/tmp': File exists &lt;==<br />
</nowiki><br />
<br />
'''NOTE: '''Some Perl Packages are using a build routine ( like DateTime modules) , but CPAN can't handle such routines based on build so you have to install this manually.<br />
<br />
Set the following environment variable to tell fixdeps to invoke CPAN as a command line tool:<br />
<br />
RT_FIX_DEPS_CMD='/usr/bin/perl -MCPAN -e"install %s"'<br />
<br />
Make sure to export this variable with<br />
<br />
export RT_FIX_DEPS_CMD<br />
<br />
'''NOTE:''' if you've never run CPAN on your machine as the user whom you are building RT as, run it first or this part of the install will not be fun.<br />
<br />
perl -MCPAN -e shell<br />
<br />
You'll be walked through the configuration process. When you're done:<br />
<br />
quit<br />
<br />
'''NOTE:''' if things are still messed up, you are logged in as root, right?<br />
<br />
Alternately, you could install missing items by hand. For example:<br />
<br />
perl -MCPAN -e 'install DBD::mysql'<br />
<br />
would install DBD::mysql.<br />
<br />
'''NOTE:''' Some modules may require environment variables defined, for example <code>Apache::Request</code>.<br />
<br />
'''NOTE:''' If you are using FastCGI, you will need to make sure that the FCGI module is installed. If not, run<br />
<br />
perl -MCPAN -e 'install FCGI'<br />
<br />
or something equivalent.<br />
<br />
<br />
'''NOTE:''' If you are using RHEL5, you may end up with all sorts of errors. These can be fixed by installing Scalar::Util<br />
<br />
perl -MCPAN -e 'install Scalar::Util'<br />
<br />
Re-check to make sure everything was installed properly:<br />
<br />
make testdeps<br />
<br />
or<br />
<br />
perl sbin/rt-test-dependencies --with-&lt;databasename&gt; --with-&lt;web-environment&gt;<br />
<br />
'''NOTE:''' Some versions of the <code>MIME::Tools</code> package will not install cleanly. Specifically, <code>MIME::Tools</code> version 5.427 is missing a dependency that will not be installed automatically by the CPAN shell. It requires <code>MIME::Base64</code> to be installed first. Otherwise, <code>MIME::Entity</code> will fail during testing and terminate the installation. Install <code>MIME::Base64</code> explicitly, either manually or using:<br />
<br />
<nowiki># perl -MCPAN -e "install 'MIME::Base64'"<br />
<br />
</nowiki><br />
<br />
Thereafter, installing dependencies worked without further problems for me.<br />
<br />
- Ed Eaglehouse<br />
<br />
'''NOTE:''' graphviz dependencies can be met with packages from here: http://www.graphviz.org/Download..php. On [[CentOS]] 5.4, adding the repository provided by graphviz.org and doing<br />
<br />
yum install graphviz graphviz-gd graphviz-devel<br />
<br />
cleared up all related requirements. Installing additional packages via<br />
<br />
yum install gd gd-devel<br />
<br />
and<br />
<br />
yum install expat expat-devel<br />
<br />
resolved all dependency problems. Doing 'make fixdeps' after a configure stage such as<br />
<br />
./configure --with-web-handler=modperl2 --enable-graphviz --enable-gd --enable-gpg<br />
<br />
completed with all dependencies met.<br />
<br />
== 4. rt group ==<br />
<br />
Create a new Unix group called 'rt' (or whatever you gave to the --with-rt-group option to the configure script).<br />
<br />
== 5. For new installations only ==<br />
<br />
If you're upgrading within the RT 3.x series, '''skip to step 6''':<br />
<br />
=== 5.1 Init DB ===<br />
<br />
As root and from within the rt build directory, type:<br />
<br />
make install<br />
<br />
Now you need to modify the installed [=etc/[[RT SiteConfig|RT_SiteConfig]].pm] to specify the connections to your DBMS engine (wtf shall I write here?!) and then type:<br />
<br />
make initialize-database<br />
<br />
For some database backends ([[MySQL]] at least) it is not able to create the database user. So you have to create that user beforehand and you have to give it rights for the database.<br />
<br />
For [[MySQL]] with the default [=$DatabaseUser], [=$DatabaseName] and [=$DatabasePassword], do this SQL command (as root database user):<br />
<br />
GRANT ALL PRIVILEGES ON rt4.* TO 'rt_user'@'localhost' IDENTIFIED BY 'rt_pass'<br />
<br />
Replace the values 'rt4', 'rt_user', 'localhost' and 'rt_pass' by whatever is appropriate for you.<br />
<br />
=== 5.2 Drop DB if something goes wrong ===<br />
<br />
If the make fails, type:<br />
<br />
make dropdb<br />
<br />
fix whatever's broken, and start over from step "init DB" step<br />
<br />
=== 5.3 if still failing... ===<br />
<br />
If make install still fails, look in <code>/etc/httpd/httpd.conf</code> or <code>/etc/httpd/conf/commonhttpd.conf</code> (or wherever your httpd.conf is; this may vary by Unix distribution; <code>locate httpd.conf</code> may help) for a line that reads "Group &lt;something&gt;" and another that reads "User &lt;somebody&gt;"<br />
<br />
Go to your RT source directory and type (without the brackets, substituting the right Group and User from the file you just looked at):<br />
<br />
./configure --with-web-group=&lt;something&gt; --with-web-user=&lt;somebody&gt;<br />
<br />
Skip to step 7.<br />
<br />
=== 5.4 initdb fails ===<br />
<br />
The defaults were changed in [[PostgreSQL]] 8.1 and now tables are created without [[OIDs]]. One of workarounds is to add the following block at the top of <code>etc/schema.Pg</code> file:<br />
<br />
--<br />
-- Enforce OID creation for 8.1+<br />
--<br />
set default_with_oids = 't';<br />
<br />
Once it's done "make initialize-database" will work perfectly.<br />
<br />
-- Added by GalaxyMaster &lt;galaxy at openwall.com&gt;<br />
<br />
== 6. For an Upgrade ==<br />
<br />
For upgrading within the RT 3.x series - if you are not upgrading or have already completed step 5, '''skip to step 7'''.<br />
<br />
As root, type:<br />
<br />
make upgrade<br />
<br />
(replace "make" with the local name for Make, if you need to)<br />
<br />
This will build new executable files, config files and libraries without overwriting your RT database.<br />
<br />
It may then instruct you to update your RT system database objects<br />
<br />
== 7. Configuration ==<br />
<br />
Edit [=etc/[[RT SiteConfig|RT_SiteConfig]].pm] in your RT installation directory, by specifying any values you need to change from the defaults as defined in RT_Config.pm. It is easiest to do this by copying RT_Config.pm to RT_SiteConfig.pm, and then uncommenting and changing anything you need to set, though perhaps this isn't quite the '''best''' approach.<br />
<br />
In many cases sensible defaults have been included. In others, you must supply a value. Some values (such as the RT log directory) will come from values you supplied in the Makefile. You'll find further explanation inline in the [[RT SiteConfig|RT_SiteConfig]].pm file. You should look at and consider changing the following entries:<br />
<br />
$DatabasePassword = 'rt_pass'<br />
<br />
which is the password the [[DatabaseUser]] should use to access the database.<br />
<br />
'''NOTE:''' Some [[MySQL]] users have had trouble with passwords of longer than 8 characters; if you cannot connect, try a password of 8 characters or fewer.<br />
<br />
$CanonicalizeEmailAddressMatch = 'subdomain.example.com$';<br />
$CanonicalizeEmailAddressReplace = 'example.com';<br />
<br />
The $[[CanonicalizeEmailAddress]] variables allow you to keep incoming messages consistent, such as when a site removes the subdomain from an email address. In the example presented by the defaults, if messages from your organization sometimes come from exchange.example.com and sometimes from example.com, you'd set $[[CanonicalizeEmailAddressMatch]] to exchange.example.com and $[[CanonicalizeEmailAddressReplace]] to example.com<br />
<br />
$SenderMustExistInExternalDatabase = undef;<br />
<br />
If $[[SenderMustExistInExternalDatabase]] is true, RT will refuse to auto-create non-staff accounts for unknown users filing new tickets by email if you are using the "[[LookupSenderInExternalDatabase]]" option elsewhere in [[RT SiteConfig|RT_SiteConfig]].pm. Instead, an error message will be returned and RT will forward the user's message to $[[RTOwner]] as defined in [[RT SiteConfig|RT_SiteConfig]].pm. If you are not using $[[LookupSenderInExternalDatabase]], this option has no effect. If you define an [[AutoRejectRequest]] template, RT will use this template for the rejection message.<br />
<br />
$CorrespondAddress = 'RT::CorrespondAddress.not.set';<br />
$CommentAddress = 'RT::CommentAddress.not.set';<br />
<br />
$[[CorrespondAddress]] and $[[CommentAddress]] are the default addresses that will be listed in both From: and Reply-To: headers of reply and comment mail, respectively, sent by RT, unless they are overridden by a queue-specific address.<br />
<br />
$MailCommand = 'sendmailpipe';<br />
<br />
$[[MailCommand]] defines which method RT will use to try to send mail. We know sendmailpipe works fairly well. If sendmailpipe doesn't work well for you, try sendmail. Note that you should remove the '-t' from $[[SendmailArguments]] if you use sendmail rather than sendmailpipe. Also note that sendmailpipe and sendmail aren't the names of commands on your system, but instructions that tell RT what mail delivery subsystem to try.<br />
<br />
*Don't forget to restart the Apache webserver after doing changes in [[RT SiteConfig|RT_SiteConfig]].pm!* This is true of any change, but we mention it here since this is the configuration option you're most likely to have to experiment with.<br />
<br />
$SendmailArguments = "-oi -t";<br />
<br />
$[[SendmailArguments]] defines what flags to pass to $Sendmail, assuming you picked sendmail or sendmailpipe as the $[[MailCommand]]. If you picked sendmailpipe, then $[[SendmailArguments]] must include the "-t" flag. The default options are good for most sendmail wrappers and workalikes.<br />
<br />
$SendmailPath = "/usr/sbin/sendmail";<br />
<br />
If you selected sendmailpipe as $[[MailCommand]], you must specify the path to your sendmail executable file in $[[SendmailPath]]. If you did not select sendmailpipe this has no effect.<br />
<br />
In case of '''Exim''', the following configuration works:<br />
<br />
Set($MailCommand , 'sendmail');<br />
Set($SendmailArguments , "-bm -- &lt;your email address&gt;");<br />
Set($SendmailPath, "/usr/sbin/exim4");<br />
Set($NotifyActor, 1);<br />
<br />
$Timezone = 'US/Eastern';<br />
<br />
$Timezone is used to convert times entered by users into GMT and back again. It should be set to a timezone recognized by your local Unix box, and -- in general -- you should pick the timezone the majority of your users reside in.<br />
<br />
$UseFriendlyToLine = 0;<br />
<br />
RT can set a "friendly", rather than blank, To: header when sending messages to Ccs or [[AdminCcs]]. This feature does not work with Sendmail(tm)-brand sendmail. If you are using sendmail, rather than postfix, qmail, exim, or some other program, you must disable this option (by setting it to 0 rather than 1).<br />
<br />
$WebPath = "";<br />
<br />
A variable used to help RT construct [[URLs]] that point back to RT. If you've put RT somewhere other than at the root of your webserver, you need to define a [[WebPath]]. RT uses this in the construction of relative [[URLs]]. $[[WebPath]] requires a leading / but no trailing /<br />
<br />
Example: if your installation is at<br />
<br />
http://www.fsck.com/rt/<br />
<br />
set this to "/rt".<br />
<br />
$WebBaseURL = "http://not.configured:80";<br />
<br />
A variable used to help RT construct [[URLs]] that point back to RT. $[[WebBaseURL]] is the base of the URL. it should usually include the scheme, the host, and the port if non-standard.<br />
<br />
Example: "https://fsck.com" or "http://fsck.com:88"<br />
<br />
$[[WebBaseURL]] doesn't need a trailing /<br />
<br />
$WebURL = $WebBaseURL . $WebPath . "/";<br />
<br />
A variable used to help RT construct [[URLs]] that point back to RT. [=$[[WebURL]]] is the combination of [=$[[WebBaseURL]]] and [=$[[WebPath]]]. Generally, you shouldn't change it.<br />
<br />
$WebImagesURL = $WebURL . "/NoAuth/images/";<br />
<br />
[=$[[WebImagesURL]]] points to the base URL where RT can find its images. If you're running the [[FastCGI]] version of the RT web interface, you should make RT's [=[[WebRT]]/html/[[NoAuth]]/images] directory available on a static web server and supply that URL as [=$[[WebImagesUrl]]] -- alternately, you can tell Apache not to run it through [[FastCGI]].<br />
<br />
== THEN ==<br />
<br />
Configure web server, read [[ManualApacheConfig]]<br />
<br />
----<br />
<br />
Prev: [[ManualRequirements]] --- Up: [[UserManual]] --- Next: [[ManualApacheConfig]]<br />
[[Category:RT User Manual]]</div>188.143.30.203