Friday, January 06, 2006

Bugzilla 2.18.4

OK, here's the sequence of steps I used to get Bugzilla up and running under Mac OS X. The official instructions are here, and the download is here. It's a reasonably convoluted process, so I'd recommend having some soothing music on: I went for Musica Antiqua Köln playing Bach's "Musical Offering".

Zerothly, I already had an install of MySQL that I'd gotten from here. It wasn't set up to auto-start on boot, so I re-opened the .dmg file and ran the MySQLStartupItem.pkg package.

Firstly, I used FinkCommander to install a collection of lower-level utilities that are needed:

  • libpng3 and libpng3-shlibs
  • gd2, gd2-bin, gd2-shlibs
  • expat

Nextly was to get all of the relevant Perl modules installed. This are the things that the ./checksetup.pl --check-modules command spits out; roughly:

  • perl -MCPAN -e 'install "Bundle::Bugzilla"': this is a shortcut to get all of the really-required modules in one go; there were a few problems, but running it repeatedly seemed to work eventually.
  • perl -MCPAN -e 'install "Chart::Base"'
  • perl -MCPAN -e 'install "PatchReader"'
  • perl -MCPAN -e 'install "GD::Graph"' (pointing it at the /sw/lib location for libgd
  • For the XML::Parser module, I had to tweak things by hand a bit
    • cpan
    • cpan> look "XML::Parser"
    • # perl Makefile.PL EXPATLIBPATH=/sw/lib EXPATINCPATH=/sw/include
    • # make; make test; make install
    • # exit
At the end of all of this, ./checksetup.pl --check-modules was happy, so I moved on to the full ./checksetup.pl and edited the generated localconfig file:
  • changed the value of $db_pass to a password
  • changed the value of $webservergroup to www to match the running Apache server

Some tweaking of the MySQL setup next:

  • created a /usr/local/mysql/data/my.cnf file, and added ft_min_word_len=2 and max_allowed_packet=1M in a [mysqld] section
  • set up a bugs user from the mysql -u root command line:
    • mysql> GRANT SELECT, INSERT, UPDATE, DELETE, INDEX, ALTER, CREATE, LOCK TABLES, CREATE TEMPORARY TABLES, DROP, REFERENCES ON bugs.* TO bugs@localhost IDENTIFIED BY 'password';
    • mysql> FLUSH PRIVILEGES;

At this point, running ./checksetup.pl did a bunch of work: setting up Apache configuration scripts, generating tables in the database, setting up an administrator account. Nearly there!

Next is webserver setup. To make the Bugzilla directory (/usr/local/bugzilla-2.18.4 for me) visible to the webserver, I just put in a symlink: cd /Library/WebServer/Documents; ln -s /usr/local/bugzilla-2.18.4 bugzilla. Then I added the following chunk of configuration to /etc/httpd/httpd.conf (just before Section 3 in the existing file):

<Directory /Library/WebServer/Documents/bugzilla>
  AddHandler cgi-script .cgi
  Options +Indexes +ExecCGI +FollowSymLinks
  DirectoryIndex index.cgi
  AllowOverride Limit
</Directory>

A swift killall -HUP httpd (to get the config file reloaded) and woot, http://localhost/bugzilla looks to be up and running.

The only thing left to do is to set things up so that Bugzilla can send out emails (in a manner that's effectively equivalent to running mail on the command line). My CD has finished playing now, so I'll defer that to another day.

0 Comments:

Post a Comment

<< Home