https://rt-wiki.bestpractical.com/api.php?action=feedcontributions&user=87.196.210.170&feedformat=atomRequest Tracker Wiki - User contributions [en]2024-03-29T11:23:47ZUser contributionsMediaWiki 1.37.2https://rt-wiki.bestpractical.com/index.php?title=GentooInstallGuide&diff=1406GentooInstallGuide2011-02-08T11:37:45Z<p>87.196.210.170: Latest version available through Portage</p>
<hr />
<div>= Installing RT in Gentoo =<br />
<br />
== Intro ==<br />
<br />
Please direct all questions about this guide to <code>rl03 -at- gentoo -dot- org</code>.<br />
<br />
Latest version available through Portage: *<code>rt-3.6.7</code>*<br />
<br />
This guide uses virtual hosting. Virtual [http://www.uk2.net/web-hosting/ hosting] means that you can give the appearance of running several servers while using only one machine. If your machine is going to be used only for RT, then you may use this guide as is; the fact that you are using virtual hosting will not be a conflict. However, if your machine is going to be used for other things in addition to RT, and you are not familiar with virtual hosting, you should probably check out Apache's documentation on [http://httpd.apache.org/docs/vhosts/ Virtual Hosts].<br />
<br />
'''Note''': This version of the guide assumes that you have updated your Apache installation per [http://www.gentoo.org/doc/en/apache-upgrading.xml this document]. This is not needed on a brand new install of apache.<br />
<br />
Turn on the <code>vhosts</code> flag for <code>rt</code>. If the <code>vhosts</code> flag is disabled, *<code>webapp-config</code>* will be run automatically.<br />
<br />
echo "www-apps/rt vhosts" &gt;&gt; /etc/portage/package.use<br />
<br />
'''Note''': It is important that you use a recent webapp-config (&gt;=1.50.10) in order to avoid a broken vhosts configuration.<br />
<br />
echo "app-admin/webapp-config" &gt;&gt; /etc/portage/package.keywords<br />
<br />
== Installation ==<br />
<br />
To install, simply type<br />
<br />
emerge rt<br />
<br />
<br />
Don't forget to run *<code>etc-update</code>* or *<code>dispatch-conf</code>*<br />
<br />
Note: You may need to edit <code>/etc/portage/package.keywords</code> and add a few dependencies. Others may be needed depending on your USE flags.<br />
<br />
<nowiki># www-apps/rt dependencies<br />
www-apps/rt<br />
dev-perl/Params-Validate<br />
dev-perl/Cache-Cache<br />
dev-perl/Exception-Class<br />
dev-perl/HTML-Mason<br />
dev-perl/MLDBM<br />
dev-perl/FreezeThaw<br />
dev-perl/Apache-Session<br />
dev-perl/XML-RSS<br />
dev-perl/HTTP-Server-Simple<br />
dev-perl/HTTP-Server-Simple-Mason<br />
dev-perl/GD<br />
dev-perl/GDGraph<br />
dev-perl/GDTextUtil<br />
dev-perl/Text-WikiFormat<br />
dev-perl/HTML-Tree<br />
dev-perl/HTML-Format<br />
dev-perl/libwww-perl<br />
dev-perl/Calendar-Simple<br />
dev-perl/DBI<br />
dev-perl/Test-Inline<br />
dev-perl/class-returnvalue<br />
dev-perl/dbix-searchbuilder<br />
dev-perl/text-template<br />
dev-perl/HTML-Parser<br />
dev-perl/HTML-Scrubber<br />
dev-perl/log-dispatch<br />
dev-perl/locale-maketext-lexicon<br />
dev-perl/locale-maketext-fuzzy<br />
dev-perl/MIME-tools<br />
dev-perl/MailTools<br />
dev-perl/text-wrapper<br />
dev-perl/Time-modules<br />
dev-perl/TermReadKey<br />
dev-perl/text-autoformat<br />
dev-perl/Text-Quoted<br />
dev-perl/Tree-Simple<br />
dev-perl/Module-Versions-Report<br />
dev-perl/Cache-Simple-TimedExpiry<br />
dev-perl/XML-Simple<br />
dev-perl/regexp-common<br />
<br />
<br />
</nowiki><br />
<br />
Since we are installing RT into a virtual host, we will need to symlink/copy our installation into our <code>/var</code> folder. This guide will use '''myrt''' as the hostname.<br />
<br />
webapp-config -I -h myrt -d rt rt 3.6.1<br />
<br />
== Database Setup ==<br />
<br />
RT provides a script called *<code>rt-setup-database</code>* which creates the initial database for you. Please note that *<code>rt-setup-database</code>* does NOT create a database '''user''' for you. If you have not already created a database user for RT, please consult the appropriate documentation, such as [[ConfigureMysqlOnGentoo]].<br />
<br />
* For MySQL:<br />
<br />
Note: If you did not previously have mysql installed, you will need to [[ConfigureMysqlOnGentoo]].<br />
<br />
Verify that the <code>skip-innodb</code> is commented out in <code>/etc/mysql/my.cnf</code>. If it is not, then put an octothorpe in front of it:<br />
<br />
<nowiki>.<br />
.<br />
[mysqld]<br />
#skip-innodb<br />
user = mysql<br />
.<br />
.<br />
<br />
</nowiki><br />
<br />
and restart the <code>mysql</code> server:<br />
<br />
/etc/init.d/mysql restart<br />
<br />
<br />
Then set up the database:<br />
<br />
/var/www/myrt/rt-3.6.1/sbin/rt-setup-database --action init --dba root --prompt-for-dba-password<br />
<br />
* For PostgreSQL:<br />
<br />
/var/www/myrt/rt-3.6.1/sbin/rt-setup-database --action init --dba postgres --prompt-for-dba-password<br />
<br />
<br />
<br />
For this to work, [[PostgreSQL]] may need to listen on TCP 5432. In your <code>postgresql.conf</code>, set<br />
<br />
listen_addresses = 'localhost', port = 5432<br />
<br />
== Configure RT ==<br />
<br />
After installing RT into the virtual host, you will need to configure RT. RT uses an overlay system for configuration. On Gentoo, the default configuration will be at *[=/var/www/myrt/rt-3.6.1/etc/[[RT Config|RT_Config]].pm]*, and the site-specific configuration will be at *[=/var/www/myrt/rt-3.6.1/etc/[[RT SiteConfig|RT_SiteConfig]].pm]*. I would recommend copying [=[[RT Config|RT_Config]].pm] over to [=[[RT SiteConfig|RT_SiteConfig]].pm], and modifying all of the settings in [=[[RT SiteConfig|RT_SiteConfig]].pm].<br />
<br />
cd /var/www/myrt/rt-3.6.1/etc<br />
cp RT_Config.pm RT_SiteConfig.pm<br />
nano RT_SiteConfig.pm<br />
<br />
<br />
You should set [[WebSessionClass]] to Apache::Session::File if you plan to use internal authentication.<br />
<br />
Now you need to set up your database connection, web location, email gateway, etc. Please consult [[ManualInstallation]].<br />
<br />
== Configure Webserver ==<br />
<br />
=== Apache1 ===<br />
<br />
==== mod_perl ====<br />
<br />
RT comes with a Gentoo-specific Apache1 configuration file. It can be found in <code>/var/www/myrt/rt-3.6.1/etc/rt_apache.conf</code><br />
<br />
Copy it to the Apache vhosts directory and edit to set <code>MY_RT_DOMAIN</code> and [=[[ServerAdmin]]]:<br />
<br />
cp /var/www/myrt/rt-3.4.5/etc/rt_apache.conf /etc/apache/vhosts.d/<br />
vim /etc/apache/vhosts.d/rt_apache.conf<br />
<br />
<br />
Now, let's make sure <code>mod_perl</code> is turned on. Edit <code>/etc/apache/modules.d/10-mod_perl.conf</code> and make sure it contains the following:<br />
<br />
&lt;IfDefine PERL&gt;<br />
LoadModule perl_module /usr/lib/apache-extramodules/libperl.so<br />
&lt;/IfDefine&gt;<br />
<br />
<br />
Edit <code>/etc/conf.d/apache</code> to instruct <code>apache</code> to start with <code>PERL</code> and enabled.<br />
<br />
APACHE_OPTS="-D PERL"<br />
<br />
==== mod_fastcgi ====<br />
<br />
NOTE: If you wish to use <code>mod_fastcgi</code>, you need to instruct <code>webapp-config</code> to install <code>rt</code> with appropriate permissions. Edit <code>/etc/vhosts/webapp-config</code>:<br />
<br />
VHOST_DEFAULT_UID="rt"<br />
VHOST_DEFAULT_GID="rt"<br />
<br />
<br />
RT comes with a Gentoo-specific Apache1 configuration file. It can be found in <code>/var/www/myrt/rt-3.6.1/etc/rt_apache1_fcgi.conf</code><br />
<br />
Copy it to the Apache vhosts directory and edit to set <code>MY_RT_DOMAIN</code> and [=[[ServerAdmin]]]:<br />
<br />
cp /var/www/myrt/rt-3.6.1/etc/rt_apache1_fcgi.conf /etc/apache/vhosts.d/<br />
nano /etc/apache/vhosts.d/rt_apache1_fcgi.conf<br />
<br />
<br />
Edit <code>/etc/conf.d/apache</code> to instruct <code>apache</code> to start with <code>FASTCGI</code> and enabled.<br />
<br />
APACHE_OPTS="-D FASTCGI"<br />
<br />
<br />
If this is your first time installing apache, you will want it to start on bootup.<br />
<br />
rc-update add apache default<br />
<br />
<br />
Restart apache so that all changes made so far will take effect.<br />
<br />
/etc/init.d/apache restart<br />
<br />
<br />
=== Apache2 ===<br />
<br />
==== mod_perl ====<br />
<br />
As of rt-3.4.4, mod_perl2 is supported.<br />
<br />
RT comes with a Gentoo-specific Apache2 configuration file. It can be found in <code>/var/www/myrt/rt-3.6.1/etc/rt_apache2.conf</code><br />
<br />
Copy it to the Apache vhosts directory and edit to set <code>MY_RT_DOMAIN</code> and [=[[ServerAdmin]]]:<br />
<br />
cp /var/www/myrt/rt-3.6.1/etc/rt_apache2.conf /etc/apache2/vhosts.d/<br />
vim /etc/apache2/vhosts.d/rt_apache2.conf<br />
<br />
<br />
NOTE: -As of 12/09/2005 there is a gotcha in <code>/var/www/myrt/rt-3.6.1/etc/rt_apache2.conf</code>. When using mod_perl2 then you need to change: [[PerlModule]] Apache::DBI to [[PerlModule]] Apache2::DBI- This should not be necessary with a properly configured mod_perl2.<br />
<br />
NOTE: Also consider specifying the actual path of your perl modules on the [=[[PerlSetEnv]]] line. For details about [=[[PerlSetEnv]]] go to [http://perl.apache.org/docs/1.0/guide/porting.html#_INC_and_mod_perl =].<br />
<br />
&lt;Location /&gt;<br />
............<br />
PerlHandler RT::Mason<br />
PerlSetEnv PERL5LIB /usr/lib/perl5/vendor_perl/5.8.7:/usr/lib/perl5/5.8.7<br />
............<br />
&lt;/Location&gt;<br />
<br />
<br />
Edit <code>/etc/conf.d/apache2</code> to instruct <code>apache</code> to start with <code>PERL</code> and enabled.<br />
<br />
APACHE2_OPTS="-D PERL"<br />
<br />
<br />
NOTE: you may need to<br />
<br />
chown -R apache:apache /var/www/myrt/rt-3.6.1/var<br />
<br />
==== mod_fastcgi ====<br />
<br />
NOTE: If you wish to use <code>mod_fastcgi</code>, you need to instruct <code>webapp-config</code> to install <code>rt</code> with appropriate permissions. Edit <code>/etc/vhosts/webapp-config</code>:<br />
<br />
VHOST_DEFAULT_UID="rt"<br />
VHOST_DEFAULT_GID="rt"<br />
<br />
<br />
RT comes with a Gentoo-specific Apache2 configuration file. It can be found in <code>/var/www/myrt/rt-3.6.1/etc/rt_apache2_fcgi.conf</code><br />
<br />
Copy it to the Apache vhosts directory and edit to set <code>MY_RT_DOMAIN</code> and [=[[ServerAdmin]]]:<br />
<br />
cp /var/www/myrt/rt-3.6.1/etc/rt_apache2_fcgi.conf /etc/apache2/vhosts.d/<br />
vim /etc/apache2/vhosts.d/rt_apache2_fcgi.conf<br />
<br />
<br />
Edit <code>/etc/conf.d/apache2</code> to instruct <code>apache2</code> to start with <code>FASTCGI</code> and enabled.<br />
<br />
APACHE2_OPTS="-D FASTCGI"<br />
<br />
<br />
If this is your first time installing apache, you will want it to start on bootup.<br />
<br />
rc-update add apache2 default<br />
<br />
<br />
Restart apache so that all changes made so far will take effect.<br />
<br />
/etc/init.d/apache2 restart<br />
<br />
=== lighttpd ===<br />
<br />
You can run RT on <code>lighttpd</code> + <code>fastcgi</code>. The ebuild will install an initscript <code>/etc/init.d/rt</code> and a config file <code>/etc/conf.d/rt</code>.<br />
<br />
NOTE: If you wish to use <code>mod_fastcgi</code>, you need to instruct <code>webapp-config</code> to install <code>rt</code> with appropriate permissions. Edit <code>/etc/vhosts/webapp-config</code>:<br />
<br />
VHOST_DEFAULT_UID="rt"<br />
VHOST_DEFAULT_GID="rt"<br />
<br />
<br />
You will need to edit <code>/etc/conf.d/rt</code> to set [[RTPATH]] to the root of your installation. You shouldn't need to edit anything else in that file.<br />
<br />
Also note that, under the default configuration, the socket in <code>$FCGI_SOCKET_PATH</code> is owned by rt:lighttpd, and is chmod-ded to g+rwx. This means that user <code>lighttpd</code> needs to be in the <code>rt</code> group. One way to do that is to use <code>vigr</code>. If you don't like that, edit <code>/etc/init.d/rt</code> to suit your needs.<br />
<br />
You will also need to edit <code>/etc/lighttpd.conf</code> to enable <code>mod_fastcgi</code>.<br />
<br />
* Uncomment <code>mod_fastcgi</code> under <code>server.modules</code><br />
* set <code>server.document-root</code><br />
* set <code>fastcgi.server</code> to something like this:<br />
<br />
fastcgi.server = ( "/rt" =&gt;<br />
( "rt" =&gt;<br />
(<br />
"socket" =&gt; "/var/www/localhost/rt-3.6.1/var/appSocket",<br />
"check-local" =&gt; "disable"<br />
)<br />
)<br />
)<br />
<br />
<br />
Be sure to set the correct path to socket (same as <code>$FCGI_SOCKET_PATH</code> in <code>/etc/conf.d/rt</code>).<br />
<br />
Now, start <code>rt</code> and <code>lighttpd</code>:<br />
<br />
/etc/init.d/rt start<br />
/etc/init.d/lighttpd start<br />
<br />
<br />
If things don't seem to be working, check the <code>lighttpd</code> logs in <code>/var/log/lighttpd</code> and edit <code>/etc/init.d/rt</code> as per the comments in the file to make the <code>rt</code> daemon more verbose.<br />
<br />
Note: you should be able to use this initscript with any <code>fastcgi</code>-enabled webserver. Please send me an email if you get <code>rt</code> to work with any other webserver.<br />
<br />
== Log in ==<br />
<br />
Use your browser to log into RT. Username is <code>root</code>, and password is <code>password</code>. Change your password.<br />
<br />
= Comments, questions, problems =<br />
<br />
== Missing dependencies? ==<br />
<br />
Q: There's some dependencies not mentioned in this guide, that also need to be installed, I installed these as well to get it running: dev-perl/dbix-searchbuilder dev-perl/DBI dev-perl/[[DBIx]]-[[DBSchema]] dev-perl/[[DBIx]]-[[ContextualFetch]]. Could someone please post exact versions of these additional CPAN requirements in a working installation?<br />
<br />
A: The first two are pulled in by the ebuild; the last two are not required (according to the docs).<br />
<br />
== Out of memory! / Callback called exit ==<br />
<br />
Q: I'm having problems after following this guide. I succeeded in seeing the login screen once, but was not able to log in. At subsequent requests, the apache error log just gives me:<br />
<br />
Out of memory!<br />
Callback called exit.<br />
<br />
<br />
I tried the users list, seems others are also having a similar problem:<br />
<br />
Hello Steffen,<br />
<br />
have the same issue. Tested with debian with out this issue. Seems to be a<br />
gentoo only issue. You can find some email about this issue. I have no idea<br />
till now.<br />
Even last comment to try running apache with mpm_worker is not solving the<br />
issue.<br />
<br />
Thanks,<br />
Thomas<br />
<br />
On Thursday 06 April 2006 13:44, Steffen Poulsen wrote:<br />
<br />
&gt;&gt; Thomas Knoezinger wrote:<br />
&gt;<br />
&gt;&gt;&gt; &gt;P.S: Please let me know if you installation of rt is eating a lot of<br />
&gt;&gt;&gt; &gt; memory even for prompting login page.<br />
&gt;<br />
&gt;&gt;<br />
&gt;&gt; Seems like it's finally getting to run, after mason was compiled for<br />
&gt;&gt; modperl support :-)<br />
&gt;&gt;<br />
&gt;&gt; But you're right, it only managed to show the login-page once -<br />
&gt;&gt; subsequent requests just puts this in apache error log:<br />
&gt;&gt;<br />
&gt;&gt; Out of memory!<br />
&gt;&gt; Callback called exit.<br />
&gt;&gt;<br />
&gt;&gt; Any ideas?<br />
&gt;&gt;<br />
&gt;&gt; // Steffen, Denmark<br />
<br />
<br />
Looking forward to see this baby run with Gentoo, hope you can help! :-)<br />
<br />
// Steffen<br />
<br />
Installing an earlier version of DBD-mysql got me past the login screen.<br />
<br />
<nowiki># emerge -p --oneshot =DBD-mysql-3.0002<br />
<br />
</nowiki><br />
<br />
If this helps other as well, it might be helpful to have it added to the version requirements.<br />
<br />
// Steffen<br />
<br />
A: Please file a bug on bugs.gentoo.org<br />
<br />
== Update ==<br />
<br />
Using the SQL provided here ( http://lists.fsck.com/pipermail/rt-users/2006-July/040410.html ), it seems to have solved the <code>Out of memory / Callback called exit</code> errors. Works with newest available DBD-mysql (DBD-mysql-3.0008) and mysql version 5.0.22-log.<br />
<br />
== mysql 4.1 ==<br />
<br />
Q: Finally got this semi-working with mysql 4.1 by editing the links section of the schema file and specifying a latin charset. Now I have a "functioning" system, but the session variable doesn't seem to work. You have to log back in after every link you click. If anyone's beaten this, please let me know. clifford -atta- clevergeek.com<br />
<br />
A: See http://bugs.gentoo.org/show_bug.cgi?id=131399<br />
<br />
== Upgrades ==<br />
<br />
3.6.1 is out in portage! Can anyone provide some advice on how to upgrade from 3.6.0 to 3.6.1 in gentoo?<br />
<br />
/Normally/ this should just be as easy as "webapp-config -U -h rt.domain.foo rt 3.6.1". However, the problem here is that none of the ebuilds follow a common structure. eg, some of them install the RT html data into the htdocs, some install into the default hostroot/rt/share/html. It also looks like somewhere along the line someone's changed the default install prefix from hostroot/rt to hostroot/rt-version, so 3.6.1 will install to hostroot/rt-3.6.1 -- [[TomLanyon]]</div>87.196.210.170