errorCodex - Computer Questions & Solutions Forum


  errorCodex - Computer Questions & Solutions Forum » Blue Screen » Basic How-tos

Basic How-tos Help Us Noobs by Sharing Your Wisdom

Reply
 
Thread Tools
  #1  
Old 21 December 2009, 09:40
Miraenda's Avatar
Miraenda Miraenda is offline
Mime Stalker
 
Join Date: Nov 2009
Location: Coralville Iowa
Age: 37
Posts: 75
Miraenda has disabled reputation
Default How to Install Request Tracker (RT) on CentOS with cPanel

Request Tracker is a popular desk ticketing system that runs using Perl. Here are the steps for configuring it on a cPanel CentOS 4 or 5 based system.

First, in root shell, run these commands:
Code:
mkdir /root/setup && cd /root/setup
wget http://download.bestpractical.com/pub/rt/release/rt.tar.gz
tar zxf rt.tar.gz
cd rt*
groupadd rt
useradd -g rt -c "RT User" -d /dev/null -s /sbin/nologin rt
make fixdeps
If you receive this error:
Code:
When we tried to start installing RT's perl dependencies, 
we were unable to load the CPAN client. This module is usually 
distributed with Perl. This usually indicates that your vendor has 
shipped an unconfigured or incorrectly configured CPAN client.
The error above may (or may not) give you a hint about what went 
wrong

You have several choices about how to install dependencies in this
situatation:

1) use a different tool to install dependencies by running setting the 
following shell environment variable and rerunning this tool:
    RT_FIX_DEPS_CMD='/usr/bin/perl -MCPAN -e"install %s"'
2) Attempt to configure CPAN by running:
   `/usr/bin/perl -MCPAN -e shell` program from shell.
   If this fails, you may have to manually upgrade CPAN (see below)
3) Try to update the CPAN client. Download it from:
   http://search.cpan.org/dist/CPAN and try again
4) Install each dependency manually by downloading them one by one 
from http://search.cpan.org

make: *** [fixdeps] Error 1
First of all, try running this command to resolve the error:
Code:
/scripts/checkperlmodules --force
If that command returns an error like the following or similar to the following:
Code:
Method: Perl Expect
commit: wrote '/usr/local/lib/perl5/5.8.8/CPAN/Config.pm'
CPAN: CPAN::SQLite loaded ok (v0.196)
Creating database file ...

dualvar is only available with the XS version of Scalar::Util at /usr/local/lib/
perl5/site_perl/5.8.8/Compress/Zlib.pm line 9
BEGIN failed--compilation aborted at /usr/local/lib/
perl5/site_perl/5.8.8/Compress/Zlib.pm line 9.
Compilation failed in require at /usr/local/lib/
perl5/site_perl/5.8.8/CPAN/SQLite/Info.pm line 6.
BEGIN failed--compilation aborted at /usr/local/lib/
perl5/site_perl/5.8.8/CPAN/SQLite/Info.pm line 6.
Compilation failed in require at /usr/local/lib/
perl5/site_perl/5.8.8/CPAN/SQLite/Index.pm line 4.
BEGIN failed--compilation aborted at /usr/local/lib/
perl5/site_perl/5.8.8/CPAN/SQLite/Index.pm line 4.
Compilation failed in require at /usr/local/lib/
perl5/site_perl/5.8.8/CPAN/SQLite.pm line 54.
system /usr/local/bin/perl -MCPAN::SQLite::META 
qw(setup update) -e setup failed: 65280 at /usr/local/lib/
perl5/site_perl/5.8.8/CPAN/SQLite/META.pm line 323.
Then reinstall perl:
Code:
cd /root/setup
wget http://layer1.cpanel.net/perl588installer.tar.gz
tar xzf perl*
cd perl*
./install
This can take 20-60 minutes to complete. Once it does, you should get something like this as a successful return:
Code:
Tested 134, 134 ok, 0 failed.
Cpanel::FastMath: [INSTALLED=1] [VERSION=0.3]
Crypt::PasswdMD5::XS: [INSTALLED=1] [VERSION=0.3]
Cpanel::POSIX::Tiny: [INSTALLED=1] [VERSION=1.1]
Cpanel::Cleanup: [INSTALLED=1] [VERSION=0.4]
Cpanel::Class: [INSTALLED=1] [VERSION=1.0.5]
Cpanel::TaskQueue: [INSTALLED=1] [VERSION=0.3]
Configuring perl magic....Off
Configuring php-pear magic....Off
Configuring ruby magic....Off
Configuring php-pecl magic....Off
If any failed, something is wrong and those need to be resolved. The number you get that were tested might differ from 134.

Next, if you ran make fixdeps and it didn't return an error but some modules are noted as missing such as this return:
Code:
SOME DEPENDENCIES WERE MISSING.
ICAL missing dependencies:
    Data::ICal ...MISSING
GPG missing dependencies:
    GnuPG::Interface ...MISSING
make: *** [fixdeps] Error 1
For any missing ones, run:
Code:
/scripts/realperlinstller Module::Name
Such as these:
Code:
/scripts/realperlinstaller Data::ICal
/scripts/realperlinstaller GnuPG::Interface
Now, configure RT itself in /root/setup/rt* location:
Code:
./configure \
--prefix=/opt/rt \
--exec-prefix=/opt/rt \
--with-bin-owner=root \
--with-db-database=rt_admin \
--with-db-dba=root \
--with-db-host=localhost \
--with-db-rt-host=localhost \
--with-db-rt-pass=rootpass \
--with-db-rt-user=root \
--with-db-type=mysql \
--with-libs-owner=root \
--with-libs-group=bin \
--with-rt-group=rt \
 --with-web-group=nobody \
--with-web-user=nobody
A few points to note:
For the db-database=rt_admin entry, this is the database name. Here rt is the cPanel username for the account and admin is the database name. cPanel prefixes all databases with username_ so rt_admin is the full database name. If you have a different username and different database name, then put what one you will be using. Also, this database cannot already exist on the server, so do not create it in MySQL databases area of cPanel for the account. The account itself must already exist for you to use the domain and Apache entries later on.

Next, the db-rt-pass=rootpass field is the server's root password, which you can obtain from /root/.my.cnf file.

After this finishes, you should run the command to test the dependencies:
Code:
make testdeps
This should return:
Code:
All dependencies have been found.
Now, install the application:
Code:
make install
You will not need to follow the steps at the end of the installation about editing the file for database configuration as the earlier settings will have setup those values for the database configuration. As such, initialize the database:
Code:
make initialize-database
You will need to re-enter the root MySQL password you used earlier in this step.

If you receive this return:
Code:
ERROR: RT requires that MySQL InnoDB table support be enabled.
Remove the 'skip-innodb' line from your my.cnf file, restart MySQL, and try again.

make: *** [initialize-database] Error 255
You will need to edit /etc/my.cnf file and remove this line in it:
Code:
skip-innodb
After removing the line, restart MySQL:
Code:
/etc/init.d/mysql restart
Then re-run the make initialize-database command.

You should receive these successful returns:
Code:
Working with:
Type:    mysql
Host:    localhost
Name:    rt_admin
User:    root
DBA:    root
Now creating a mysql database rt_admin for RT.
Done.
Now populating database schema.
Done.
Now inserting database ACLs
DatabaseUser is root. Skipping...
Done.
Now inserting RT core system objects
Done.
Now inserting data
Done inserting data
Done.
Now, you will configure the settings for rt:
Code:
cd /opt/rt/etc
cp RT_Config.pm RT_SiteConfig.pm
vi RT_SiteConfig.pm
Edit RT_SiteConfig.pm and make relevant changes for these fields:

Set($rtname , "domain.com");
Set($Organization , "domain.com");
Set($Timezone , 'US/Eastern');
Set($OwnerEmail , 'root');
Set($RTAddressRegexp , '^rt\@example.com$');

Now, you will need to enable the directives in Apache for the domain's VirtualHost entry:
Code:
cd /usr/local/apache/conf
mkdir userdata
mkdir userdata/std
mkdir userdata/std/2
mkdir userdata/std/2/username
mkdir userdata/std/2/username/domain.com
cd userdata/std/2/username/domain.com
vi rt.conf
Above, replace username with the account's cPanel username and domain.com with the domain name for the account.

Enter the following:
Code:
    AddDefaultCharset UTF-8
    PerlRequire /opt/rt/bin/webmux.pl
    <Location />
    SetHandler perl-script
    PerlHandler RT::Mason
    </Location>
Save the file, then run these commands to distill the changes and reload Apache:
Code:
/usr/local/cpanel/bin/apache_conf_distiller --update
/usr/local/cpanel/bin/build_apache_conf
If you receive this error:
Code:
Initial configuration generation failed with the following message:

An error occurred while running: /usr/local/apache/bin/httpd -DSSL -t -f /usr/local/apache/conf/httpd.conf.1261410489
Exit signal was: 0
Exit value was: 1
Output was:
---
Syntax error on line 2 of /usr/local/apache/conf/userdata/std/2/tristan/tristanwallace.com/rt.conf:
Invalid command 'PerlRequire', perhaps mis-spelled or defined by a module not included in the server configuration
---

Rebuilding configuration without any local modifications.

Failed to generate a syntactically correct Apache configuration.
Bad configuration file located at /usr/local/apache/conf/httpd.conf.1261410489
Error:
An error occurred while running: /usr/local/apache/bin/httpd -DSSL -t -f /usr/local/apache/conf/httpd.conf.1261410489
Exit signal was: 0
Exit value was: 1
Output was:
---
Syntax error on line 2 of /usr/local/apache/conf/userdata/std/2/tristan/tristanwallace.com/rt.conf:
Invalid command 'PerlRequire', perhaps mis-spelled or defined by a module not included in the server configuration
Then mod_perl is not installed, so you must run /scripts/easyapache to install it. If you receive this error when trying to run /scripts/easyapache (or any error about a set module missing):
Code:
Can't locate Curses/UI.pm in @INC (@INC contains: /scripts/../lib /var/cpanel/easy/apache/custom_opt_mods /usr/local/cpanel /var/cpanel/perl/easy /scripts /usr/local/lib/perl5/5.8.8/i686-linux /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/i686-linux /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl .) at /var/cpanel/perl/easy/Cpanel/Easy/Apache/UI/CLI/Config.pm line 5.
BEGIN failed--compilation aborted at /var/cpanel/perl/easy/Cpanel/Easy/Apache/UI/CLI/Config.pm line 5.
Compilation failed in require at /var/cpanel/perl/easy/Cpanel/Easy/Apache/UI/CLI.pm line 404.
Then attempt to install the missing module:
Code:
/scripts/realperlinstaller Curses::UI
At that point, re-run /scripts/easyapache

To enable mod_perl during the setup, select the previously saved configuration option. Select to "Start customizing based on profile" and then when you reach Apache's Short Options List, enable this option:
Code:
 [ ] Mod Perl
You can then start building the profile based on these settings. After it finishes, you would then issue the commands to distill and rebuild Apache:
Code:
/usr/local/cpanel/bin/apache_conf_distiller --update
/usr/local/cpanel/bin/build_apache_conf
If mod_perl did successfully build for EasyApache, then you should receive no errors this time.

Next, you need to change the path for the account in /var/cpanel/userdata/username/domain.com file:
Code:
documentroot: /opt/rt/share/html
Simply change documentroot to this new path, then run /scripts/rebuildhttpdconf and it should take the new changes. Restart apache with /etc/init.d/httpd restart

When it completes, go to the domain in a browser and RT should be displaying with a login box. The initial login values will be username root and password password

Please let me know if you have any questions on this guide.
__________________
Miraenda
~ Ex uno disce omnes ~
Reply With Quote
  #2  
Old 1 April 2010, 12:19
trancuong trancuong is offline
Junior Member
 
Join Date: Apr 2010
Posts: 4
trancuong is on a distinguished road
Default Re: How to Install Request Tracker (RT) on CentOS with cPanel

help me .
When i install
Quote:
Now, configure RT itself:
Code:

./configure \
--prefix=/opt/rt \
--exec-prefix=/opt/rt \
--with-bin-owner=root \
--with-db-database=rt_admin \
--with-db-dba=root \
--with-db-host=localhost \
--with-db-rt-host=localhost \
--with-db-rt-pass=o9v{l~xL \
--with-db-rt-user=root \
--with-db-type=mysql \
--with-libs-owner=root \
--with-libs-group=bin \
--with-rt-group=rt \
--with-web-group=nobody \
--with-web-user=nobody
-bash: ./configure: No such file or directory
i can't continue
Reply With Quote
  #3  
Old 1 April 2010, 12:29
Miraenda's Avatar
Miraenda Miraenda is offline
Mime Stalker
 
Join Date: Nov 2009
Location: Coralville Iowa
Age: 37
Posts: 75
Miraenda has disabled reputation
Default Re: How to Install Request Tracker (RT) on CentOS with cPanel

Hi,

Please ensure you are in /root/setup/rt* when you run that command. I just re-read over the how-to and I believe you might instead be in /root/setup/perl* when running the command if you had to re-install perl, so just do:

cd /root/setup/rt*

To ensure you are in the right directory, then try the command again.
__________________
Miraenda
~ Ex uno disce omnes ~
Reply With Quote
  #4  
Old 1 April 2010, 13:07
trancuong trancuong is offline
Junior Member
 
Join Date: Apr 2010
Posts: 4
trancuong is on a distinguished road
Default Re: How to Install Request Tracker (RT) on CentOS with cPanel

thank you very much
i hopy you can help me. I can not access the cPanel. My english not good so i can't write
when i login
Quote:
Internal Server Error

Could not fetch uid or gid for : root
Attached Images
File Type: jpg trancuongvietnam.jpg (10.8 KB, 1 views)

Last edited by trancuong; 1 April 2010 at 13:10.
Reply With Quote
  #5  
Old 3 April 2010, 08:44
Miraenda's Avatar
Miraenda Miraenda is offline
Mime Stalker
 
Join Date: Nov 2009
Location: Coralville Iowa
Age: 37
Posts: 75
Miraenda has disabled reputation
Default Re: How to Install Request Tracker (RT) on CentOS with cPanel

You are trying to log into your cPanel using the root user. You can only log into WHM using the root user not cPanel. You'll have to try your cPanel username for accessing cPanel for that account not the root user's username. This really isn't related to Request Tracker though.
__________________
Miraenda
~ Ex uno disce omnes ~
Reply With Quote
  #6  
Old 3 April 2010, 11:06
trancuong trancuong is offline
Junior Member
 
Join Date: Apr 2010
Posts: 4
trancuong is on a distinguished road
Default Re: How to Install Request Tracker (RT) on CentOS with cPanel

i have question? cpanel of you have a license? or it is trier
Reply With Quote
  #7  
Old 3 April 2010, 11:07
trancuong trancuong is offline
Junior Member
 
Join Date: Apr 2010
Posts: 4
trancuong is on a distinguished road
Default Re: How to Install Request Tracker (RT) on CentOS with cPanel

thank you very much. i install successful
Reply With Quote
  #8  
Old 5 April 2010, 09:05
Miraenda's Avatar
Miraenda Miraenda is offline
Mime Stalker
 
Join Date: Nov 2009
Location: Coralville Iowa
Age: 37
Posts: 75
Miraenda has disabled reputation
Default Re: How to Install Request Tracker (RT) on CentOS with cPanel

Great to hear that you installed it successfully

As for cPanel, you would need to ask them about licensing at http://cpanel.net/ location. I don't handle cPanel licensing
__________________
Miraenda
~ Ex uno disce omnes ~
Reply With Quote
  #9  
Old 15 June 2010, 19:07
hackerunet hackerunet is offline
Junior Member
 
Join Date: Jun 2010
Posts: 4
hackerunet is on a distinguished road
Red face Re: How to Install Request Tracker (RT) on CentOS with cPanel

Another question .
If I want it installed in a subdomain for example: rtsystem.domain.com does the subdomain needs to be created before I setup the RT????
The most logic answer would be Yes, but I don't know what any other scripts will use the RT installer as root. So I needed to ask!!!
Thanks!! I am waiting the reply.... bye bye!!

Last edited by hackerunet; 15 June 2010 at 21:17. Reason: I installed the system
Reply With Quote
  #10  
Old 15 June 2010, 21:16
hackerunet hackerunet is offline
Junior Member
 
Join Date: Jun 2010
Posts: 4
hackerunet is on a distinguished road
Default Re: How to Install Request Tracker (RT) on CentOS with cPanel

Miraenda...
Your tutorial is great.!!!
I had some issues but everything works great at the end. You should fix some lines on your tutorial, because when you add the virtualhost support for the system at the end of the line
mkdir userdata/std/username/domain.com
instead vi rt.conf is vi /userdata/std/username/domain.com/rt.conf
And later, maybe after that you should include
vi /etc/httpd/httpd.conf -> find domain.com and uncomment the include line and change to
Include "/usr/local/apache/conf/userdata/std/username/domain.com/*.conf"

That's all... Thanks a lot for your support, you are a great administator and also a great teacher.
I hope to talk to you again to give you the code of the customisation I have to build for request tracker.
Thanks again. and have a great day!!!
bye!!

Last edited by hackerunet; 15 June 2010 at 22:33.
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Install updatedb and locate on CentOS / RedHat Miraenda Basic How-tos 0 28 November 2009 14:01


All times are GMT -6. The time now is 02:28.


A vBSkinworks Design
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.