Updating RedHat 7.2 install Notes

I (Mike Patterson) was unsuccessful trying to install rt 3 separate
times (with a clean install inbetween) on Solaris8.
On my second try on RedHat 7.2 I finally got it to work! I added my
comments to this very useful document noted with: <>.
I also got it to work on FreeBSD, but lost track of my documentation as
I tried a lot of different things to debug.

could you send them to rt-doc-workers@lists.fsck.com?
Thanks,
jesse

snip

You should send your installation steps to the mailing list as well as
getting
them into the RTFM. That way, they’re available to people who searched the
manual or the mailing list. At least, that’s my vote.
Rich Brown
Hanover, NH

snip

Full install notes for RedHat 7.2

From the mailing list.

You may need to twiddle the s aroundFrom: Gary Leong gwleong@XXX.XXX
To: rt-users@lists.fsck.com
Subject: [rt-users] RH 7.2 step by step
Message-ID: 3CED786B.59C06A31@lbl.gov
Date: Thu, 23 May 2002 16:16:59 -0700

Here are the step by step instructions I promised way back when. I
didn’t get a chance to write it up until now. It’s off the top of my
head, so I do apologize if I neglected a step or two. Please let me
know of any mistakes, so I can update the instructions on
documenations… Thanks.

I also attached the file.

Gary

1)Install Redhat 7.2

2)Remove apache in distributed Redhat 7.2
To a get a list, run this command:

rpm -qa | grep apache

apacheconf-0.8.1-1
apache-manual-1.3.22-2
apache-devel-1.3.22-2
apache-1.3.22-2

then run

rpm -e apacheconf-0.8.1-1
rpm -e apache-manual-1.3.22-2
rpm -e apache-devel-1.3.22-2
rpm -e apache-1.3.22-2

3)Download mod_perl and apache source. I put the source in /temp. Unzip
and untar the source.

gunzip -c apache_1.13.9.tar.gz | tar xvf -
gunzip -c mod_perl-1.26.tar.gz | tar xvf -
<> I used apache_1.3.26 and mod_perl-1.27

4)To install Apache with mod_perl statically compiled.

cd into the mod_perl directory and run the following commands to
configure mod_perl for apache install:

   cd /temp/mod_perl-1.26
         perl Makefile.PL \
          APACHE_SRC=../apache_1.13.9/src \
           NO_HTTPD=1 \
           USE_APACI=1 \
           PREP_HTTPD=1 \
            EVERYTHING=1 \
            make
            make install

<> substitute appropriate where apache_1.3.26 and
mod_perl-1.27

cd into apache source directory. To install apache, run the following
commands:
cd /temp/apache_1.3.19/
./configure --prefix=/usr/local/apache
–activate-module=src/modules/perl/libperl.a
<> substitute appropriate where apache_1.3.26
<> I also ran “make” and “make install” but not sure if
this was necessary

  1. Download and install CPAN
    unzip and untar source and cd into CPAN source directory.
    follow these commands to install:

    gunzip -c CPAN-1.59.tar.gz | tar xvf -
    cd /temp/CPAN*
    perl Makefile.PL
    make
    make install
    <> updated CPAN, then prereqs for HTML mason:
    <> perl -MCPAN -e shell;
    <> cpan> install CPAN
    <> cpan> install Params::Validate
    <> cpan> install Exception::Class
    <> cpan> install Class::Container
    <> cpan> install Scalar::Util
    <> cpan> install File::Spec

  2. Install Mason manually as CPAN doesn’t seem to download and install
    it automatically.
    unzip and untar source and cd into Mason directory.

    gunzip -c HTML-Mason-1.04.tar.gz | tar xvf -
    cd /temp/HTML-*
    perl Makefile.PL
    make
    make install
    <> Note: I ran “make test” and it failed, it still fails
    today even though everything is ok

  3. Download and unpackage RT.

    gunzip -c rt.tar.gz | tar xvf -
    <> Note I didn’t install apache or mysql default package
    that came with CD so I had to install rpms
    <> 3.23.52-1 versions of mysql, mysql-client,
    mysql-shared, & mysql-devel rpms downloaded from www.mysql.com
    <> create mysql account before installing e.g. rpm -ivh
    mysqlpackagename.rpm
    <> groupadd -g mysql
    <> useradd -m -d /home/mysql -g mysql mysql
    <> note: these rpms put mysql binaries in: /usr/bin

  4. Get dependent modules.
    cd /temp/rt-2-0-9/
    make testdeps
    make fixdeps

<> I used rt-2-0-14
I ran make testdeps

<> Downloaded and installed
<> Perl-DBI-1.18.1.rpm and Perl-DBD-MySQL-1.22.16.4(found
on rpmfind.net)

<> Then I manually went back and forth between make
testdeps and MCPAN until testdeps was happy e.g. perl -MCPAN -e shell;
<> cpan> install MIME:Entity
<> I roughly followed the order suggested on this page:
<> [http://www.helgrim.com/perlmodules/]
<> I used make testdeps to see what was missing until
nothing else was missing.

<> Later I discovered that it is was good to also install
Apache::DBI using MCPAN even though make testdeps didn’t flag it.
<> This made my “@INC” error go away when I was trying to
launch apache. I think my RPM put my DBI.pm in wrong folder (5.6.0 vs.
5.6.1)

  1. Configure preliminarily apache.

a)In http.conf, change the following lines. They are in this order,
but not juxtaposed vertically. Do a search
make the changes.

ServerType stand mine said "standalone"
ServerRoot "/usr/local/apache"
MinSpareServers 5
MaxSpareServers 20
StartServers 8
MaxClients 150
MaxRequestsPerChild 100
Listen 80
Port 80
User apache
Group apache
ErrorLog /var/log/httpd/error.log
CustomLog /var/log/httpd/access_log combined

b)Make log directories.
mkdir -p /var/log/httpd/error.log /var/log/httpd/access_log
chown -R apache:apache /var/log/httpd/error.log
/var/log/httpd/access_log

  1. Create user rt.

groupadd -g 35 rt
useradd -m -d /home/rt -u 4040 -g 35 rt

<> I used different UID and GID since these were used in
my NIS domain

  1. Set root password for MySQL database.

e.g.

username: root
password: 123456

The syntax is as follows:

/mysql/admin -u root password ‘123456’

  1. Install RT

a) Make changes to Makefile
cd /tmp/rt-2-0-9
vi Makefile
for these entries

RT_PATH = /opt/rt2
RT_LOG_PATH = /var/log/rt2
                     DB_TYPE = Mysql
DB_HOME = /usr/bin/mysql    I used "/usr" since the mysql rpm I used 

installed binaries in "/usr/bin"
DB_DBA = root
DB_DBA_PASSWORD = "123456"
DB_RT_USER = rt
WEB_USER = apache I used nobody
WEB_GROUP = apache I used nobody

c) mkdir -p /var/log/rt2
chown -R root:rt /var/log/rt2
chmod 755 /var/log/rt2

<> I got a permission problem later when I tried to load
web page.
so I chown’d to nobody:nobody (since I used the default apache user and
groupname) and it made problem go away.

b) Install rt: build database and install rt files.

make install

  1. Set up Sendmail
    a) configure Sendmail to receive connections outside of localhost.
    Sendmail from Redhat
    by default doesn’t allow outside email.
    change the mc file

    vi /etc/mail/sendmail.mc
    DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA’)
    <-------------dnl this entry
    run the command

    m4 /etc/mail/sendmail.mc > /etc/sendmail.cf

    vi /etc/aliases
    rt-comment: “|/opt/rt2/bin/rt-mailgate --queue general --action
    comment” <----------add the following entry
    rt: “|/opt/rt2/bin/rt-mailgate --queue general --action
    correspond” <----------add the following entry

<> then run “newaliases” from commandline to make aliasing
take effect
<> Then I chown’d and chmod’d rt-mailgate
<> chmod +s /opt/rt2/bin/rt-mailgate
<> chown root:rt /opt/rt2/bin/rt-mailgate

<> I changed first line to #!/usr/bin/suidperl
(because that is what my version of perl needed)
<> because my sendmail config uses smrsh I had to do
this too <> (documented in main rtfm docs):
<> ln -s /opt/rt2/etc/rt-mailgate /etc/smrsh/rt-mailgate

<> Note you can’t really fully test this until you give
"Everyone" the right to at least “CreateTicket”, probably “ReplyToTicket”,
“CommentOnTicket”, and “SeeQueue” too. On web interface under
Configuration -> Queues -> “General” -> Group rights

  1. Configure config.pm file for rt
    Let’s say our domain is wheats.com.

a) Change the following in the file, accordingly.
e.g.
$rtname=“wheats.com”;
$rtname=“wheats.com”;
$DatabaseUser=‘rt’;
$DatabasePassword=‘123456’;
$CorrespondAddress=‘rt’;
$CommentAddress=‘rt’;

  1. Make sure user rt can access and manipulate database.

e.g.
username: root
password: 123456

mysql -u root -p
GRANT ALL ON rt2.db.* To rt@localhost Identified By “123456”
<> I did GRANT ALL ON rt2.* … (instead of rt2.db.*)
quit
16) Setup rt to access by Apache.
e.g.
IP address of rt machine: 128.5.3.11
Only machines in wheats.com domain will allow be accessed.

In the httpd.conf file in /usr/local/apache/conf

a) Add the following entries, accordingly.

#NameVirtualHost *

<VirtualHost 128.5.3.11>
DocumentRoot /opt/rt2/WebRT/html
ServerName dummy.wheats.com
PerlModule Apache::DBI
PerlFreshRestart On
PerlRequire /opt/rt2/bin/webmux.pl

SetHandler perl-script
PerlHandler RT::Mason
Order allow,deny
Allow from *.wheats.lbl.gov
<> not sure why, but this didn’t work for me, got
forbidden messages. I used: “Allow from all”

  1. Add apache to run scripts.
    cp /usr/local/apache/bin/apachect1 /etc/init.d/
    ln -s /etc/init.d/apachect1 /etc/rc3.d/S99httpd

<> Note if you copy and paste this doesn’t work since
apachect1 should be apachectl (note “1” number one vs. letter “l”)

  1. Reboot the machine. I hope everything works. Please, please let me
    know if things don’t go right or how
    I can make things clearer.

<> That’s what this is for. :slight_smile:

On my second try on RedHat 7.2 I finally got it to work! I added my
comments to this very useful document noted with: <>.

just out of curiosity:

I installed rt numerous times on redhat machines (7.2 and 7.3) and except
for the perl 5.8 problem with rt3 I never needed to recompile apache or
mod_perl (and even then adapting the spec-Files and using rpm -bb did the
trick). Is there any specific reason why people insist that this is
necessary or is this a long standing information resulting from problems
with older redhats?

I’m really interested in this question because the stock installation of
redhat works flawless with rt2.

MfG
Andreas