Koozali.org: home of the SME Server

How to Install Bugzilla 2.22.2 on SME 7.x

m_petrovski

How to Install Bugzilla 2.22.2 on SME 7.x
« on: July 11, 2007, 07:37:10 PM »
I could not find a good "How To" on the site or in the forums so I decided to make my own.  The instructions below tell how to install Bugzilla 2.22.2 on SME Server 7.x.  Please let me know if I have skipped a step or overlooked something.  Also, any suggestions for improving the steps are appreciated.

Before starting, you will need root access to the console.

1.  Run the following commands to install some Bugzilla dependencies.  NOTE:  If yum asks you to run some commands, run them.  If CPAN asks you questions, the answer should always be no unless you really know your way around perl.

   
Code: [Select]
yum install ImageMagick-perl mod_perl perl-XML-Twig

perl -MCPAN -e 'install "AppConfig"'
perl -MCPAN -e 'install "Template"'


2.  Download the latest SME Site Maker script from http://wiki.contribs.org/SME_Site_Maker and follow the directions to create a site with CGI enabled, a database user, and .htaccess override.

3.  Download Bugzilla and untar the files.

   
Code: [Select]
wget http://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-2.22.2.tar.gz
tar xzvf bugzilla-2.22.2.tar.gz


4.  Copy the Bugzilla files to your newly created site.

   
Code: [Select]
cp -rf bugzilla-2.22.2/* /opt/<site_name>/

5.  Change to the site directory.

   
Code: [Select]
cd /opt/<site_name>/

6.  Ensure that all required modules are installed.  Some of the optional modules will not be installed. This is okay.

   
Code: [Select]
./checksetup.pl --check-modules

7.  When you are satisfied with the installed modules you will create a local configuration.

   
Code: [Select]
./checksetup.pl

8.  Change localconfig to match your configuration.  The main things to change are db_pass and webserver group.  Others may need to changed depending on your setup.

9. Change /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/99SMESiteMaker_<site_name> to look something like this.

   
Code: [Select]
Alias /bugzilla /opt/bugzilla
<Directory /opt/bugzilla>
 AddHandler cgi-script .cgi
 Options +Indexes +ExecCGI
 DirectoryIndex index.cgi
 AllowOverride Limit
</Directory>


10. Create a custom template for your MySQL installation.

   
Code: [Select]
mkdir /etc/e-smith/templates-custom/etc/my.cnf
touch /etc/e-smith/templates-custom/etc/my.cnf/013bugzilla


11. Change /etc/e-smith/templates-custom/etc/my.cnf/013bugzilla to look like this.

   
Code: [Select]
# Allow packets up to 1M
max_allowed_packet=1M
# Allow small words in full-text indexes
ft_min_word_len=2


12. Expand the templates and restart.

   
Code: [Select]
expand-template /etc/httpd/conf/httpd.conf
expand-template /etc/my.cnf
signal-event reboot


13. Run
Code: [Select]
./checksetup.pl again.

14. Access Bugzilla at http://yourserver.yourdomain/<site_name>

Offline gregswallow

  • *
  • 651
  • +1/-0
How to Install Bugzilla 2.22.2 on SME 7.x
« Reply #1 on: July 13, 2007, 07:17:37 AM »
I would ask nicely on the devinfo mailing list if someone would rebuild the bugzilla-2.22 rpm from atrpms.net on our build server and into the SMEDEV repository.  

I think we'd just need to change two lines in the spec file to make it compatible with SME Server:
%defattr(-,root,apache,-)
to
%defattr(-,root,www,-)
and
perl -pi -e "s/\\\$webservergroup = \"nobody\";/\\\$webservergroup = \"apache\";/" localconfig
to
perl -pi -e "s/\\\$webservergroup = \"nobody\";/\\\$webservergroup = \"www\";/" localconfig

All the perl dependancies are packaged for you that way, so it would be installed and updated easier and then you'd just need to do the things you already figured out to make it work on sme server.

Your instructions would be something like this:

Make the atrpms repository available when needed, but exclude bugzilla (and a bunch of other stuff) so we don't get the wrong version:
Code: [Select]
/sbin/e-smith/db yum_repositories set atrpms repository \
Name 'atrpms - EL4' \
BaseURL 'http://dl.atrpms.net/el4-$basearch/atrpms/stable' \
EnableGroups no \
GPGCheck yes \
GPGKey http://ATrpms.net/RPM-GPG-KEY.atrpms \
Visible no \
Exclude clamav,spamassassin,libselinux,perl-HTML-Parser,lm_sensors,\
perl-IO-stringy,perl-XML-Parser,razor-agents,libgcrypt,rpm-python,\
libxml2,zlib,gnupg,libxml2-python,yum,module-init-tools,rpm,gettext,\
librpm4,glib2,perl-libwww-perl,perl-Convert-ASN1,beecrypt,fetchmail,\
libacl,libtool-ltdl,popt,libgpg-error,freetype,perl-MIME-tools,mutt,\
gd,perl-TimeDate,librpm4.4,bugzilla* \
status disabled


Expand /etc/yum.conf to take effect the change:
Code: [Select]
expand-template /etc/yum.conf

Install bugzilla from smedev and all the dependancies will be pulled in from atrpms and CentOS automatically: (once bugzilla-2.22 is in smedev)
Code: [Select]
yum --enablerepo=atrpms --enablerepo=smedev install bugzilla-2.22*

And then just finish up with the rest of your instructions.  Looks good, thanks

m_petrovski

How to Install Bugzilla 2.22.2 on SME 7.x
« Reply #2 on: July 13, 2007, 02:12:30 PM »
You are welcome.  I agree that adding the RPM to the SMEDEV repository is the best way to go.

I would eventually like to put the "How To" in the Wiki, but I would like to clean up the instructions a bit before doing this.  Any suggestions?

Offline Normando

  • *
  • 841
  • +2/-1
    • Unixlan
How to Install Bugzilla 2.22.2 on SME 7.x
« Reply #3 on: July 14, 2007, 08:45:53 PM »
Good howto m_petrovsky, but why bugzilla v2.22 and not 3.0?

3.0 is the last stable version.

http://www.bugzilla.org/download/

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: How to Install Bugzilla 2.22.2 on SME 7.x
« Reply #4 on: July 14, 2007, 09:07:19 PM »
Quote from: "m_petrovski"
9. Change /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/99SMESiteMaker_<site_name> to look something like this.

   
Code: [Select]
Alias /bugzilla /opt/bugzilla
<Directory /opt/bugzilla>
 AddHandler cgi-script .cgi
 Options +Indexes +ExecCGI
 DirectoryIndex index.cgi
 AllowOverride Limit
</Directory>

Don't adapt fragments that are needed by other stuff, it might break other things. Instead create a new template file in the same directory e.g. 99bugzilla with the content suggested above.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

m_petrovski

How to Install Bugzilla 2.22.2 on SME 7.x
« Reply #5 on: July 15, 2007, 02:53:31 AM »
The reason for using Bugzilla 2.22.2 and not 3.0 is that the perl dependencies are much easier to resolve.  The 2.22 version is still maintained.  If you can resolve the dependencies for version 3.0, I would like to use it.

I agree that editing a fragment can have adverse effects.  However, the 99SMESiteMaker_<site_name> fragment in the example was created by SMESiteMaker specifically for bugzilla and is needed by no other application.  The reason for editing the fragment is that SMESiteMaker very likely will not create the template entirely to your satisfaction and some changes will likely be needed.

Offline gregswallow

  • *
  • 651
  • +1/-0
How to Install Bugzilla 2.22.2 on SME 7.x
« Reply #6 on: August 13, 2007, 09:08:06 AM »
Quote from: "m_petrovski"
The reason for using Bugzilla 2.22.2 and not 3.0 is that the perl dependencies are much easier to resolve.  The 2.22 version is still maintained.  If you can resolve the dependencies for version 3.0, I would like to use it.


I have bugzilla 3.0 running on SME 7.2, and it seems to work fine.  I'll make a smeserver-bugzilla rpm soon that works out all the dependancies and installs the httpd.conf template.  I am using the bugzilla rpm from Fedora Core 7 (slightly changed), and all of the dependancies are in Centos, Atrpms or Dag's repositories.  checksetup.pl only complains a little that mod_perl and CGI (part of the perl rpm) are not new enough, but they are optional enough for checksetup to continue.

m_petrovski

How to Install Bugzilla 2.22.2 on SME 7.x
« Reply #7 on: August 13, 2007, 01:11:39 PM »
Quote
I have bugzilla 3.0 running on SME 7.2, and it seems to work fine.


That is great news.  Will the RPM be available via one of the SME YUM repositories?

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
How to Install Bugzilla 2.22.2 on SME 7.x
« Reply #8 on: August 13, 2007, 03:39:10 PM »
Quote from: "m_petrovski"
Quote
I have bugzilla 3.0 running on SME 7.2, and it seems to work fine.


That is great news.  Will the RPM be available via one of the SME YUM repositories?
My guess that this is a installation from source... BTW I am willing to help/build the RPM either for 2.2 or 3.0 as soon as I find the time to make a proper installation on a test server. I have access to the repository and therefore can release RPM's in SME dev repository.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
How to Install Bugzilla 2.22.2 on SME 7.x
« Reply #9 on: August 13, 2007, 10:18:54 PM »
Quote from: "m_petrovski"
If you can resolve the dependencies for version 3.0, I would like to use it.
Well, if you like to have a go... it seems that bugzilla 3.0 will resolve all dependencies using the dag, atrpms and the centosplus repositories, although my machine is certainly not stock SME Server. I will have to try with a stock SME Server 7.2, but unfortunately I have none available at the moment.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline gregswallow

  • *
  • 651
  • +1/-0
How to Install Bugzilla 2.22.2 on SME 7.x
« Reply #10 on: August 13, 2007, 11:54:20 PM »
Quote from: "cactus"
Well, if you like to have a go... it seems that bugzilla 3.0 will resolve all dependencies using the dag, atrpms and the centosplus repositories, although my machine is certainly not stock SME Server. I will have to try with a stock SME Server 7.2, but unfortunately I have none available at the moment.


Don't use centosplus...It has bad things in there ;-) (seriously)

Check your email - Let's work on this together.

Greg

Offline gregswallow

  • *
  • 651
  • +1/-0
How to Install Bugzilla 2.22.2 on SME 7.x
« Reply #11 on: August 14, 2007, 12:47:37 AM »
Quote from: "cactus"
I will have to try with a stock SME Server 7.2, but unfortunately I have none available at the moment.


Sure you do... :-)
http://www.vmware.com/vmtn/appliances/directory/944

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: How to Install Bugzilla 2.22.2 on SME 7.x
« Reply #12 on: August 14, 2007, 09:59:51 AM »
Sure you do... :-)
http://www.vmware.com/vmtn/appliances/directory/944
Yep, I even have a VMWare server, but not the time, nor the space to run a VMWare SME Server on it at the moment.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline Normando

  • *
  • 841
  • +2/-1
    • Unixlan
Re: How to Install Bugzilla 2.22.2 on SME 7.x
« Reply #13 on: August 19, 2007, 09:39:03 PM »
Greg, thank you for your bugzilla rpm. Run ok.  :D
Only one issue. In the localconfig file, the $webservergroup is www and not apache.


Offline gregswallow

  • *
  • 651
  • +1/-0
Re: How to Install Bugzilla 2.22.2 on SME 7.x
« Reply #14 on: August 21, 2007, 02:30:37 AM »
Greg, thank you for your bugzilla rpm. Run ok.  :D
Only one issue. In the localconfig file, the $webservergroup is www and not apache.

What bugzilla rpms?  I didn't announce anything yet :P  OK,OK - more details here: http://bugs.contribs.org/show_bug.cgi?id=3295

I wanted to get it as simple to install as 'yum install smeserver-bugzilla' and post-upgrade/reboot, but it's not quite there yet.  Any comments/suggestions to the bug report please.