Installing Bugzilla

From aoxoaWiki
Jump to navigationJump to search

Installing Bugzilla was pretty straightforward. Just follow the instructions from the Bugzilla Installation Guide.

NOTE: the installation steps on the official Bugzilla site were for 5.0.4 against an Ubuntu 14.04 server. I am running 18.04LTS and the lis of required packages produced a lot of errors. I fund this site (below) that seemed to be a better match for the installation process:

Install Bugzilla 5.0.x stable on Ubuntu 18.04 LTS

Installing MariaDB

The instructions in that page above on installing MariaDB didn't work, so instead i used the version in the Ubuntu Repositories:

How to Install MariaDB on Ubuntu 18.04

  sudo apt install mariadb-server
  sudo systemctl status mariadb
  sudo mysql_secure_installation

Test Local Connections

Test local connections. Note that to connect as 'root'@'localhost' you must sudo mysql - you cannot just invoke mysql.

  sudo mysql -u root -p

Then create a new user (from the mysql prompt):

  create user 'test'@'localhost' identified by 'newPassword';
  grant all privileges on *.* to 'test'@'localhost';
  flush privileges;
  mysql -u test -p

Drop Test User

Drop the test user:

  sudo mysql -u root -p
  drop user 'test'@'localhost';

Create Bugzilla Database

  sudo mysql -u root -p
  create database bugzilla;
  create user 'bugzilla'@'localhost' identified by 'PASSWORD';
  grant all privileges on bugzilla.* to 'bugzilla'@'localhost' with grant option;
  flush privileges;

Install Bugzilla Software

I would strongly suggest a git installation, as it makes subsequent upgrades easier.

Get Bugzilla

  cd /opt
  sudo git clone --branch release-5.0-stable

I really like the idea of naming the folders by version - it makes upgrading and switching to new versions a lot 'cleaner'

  sudo mv bugzilla bugzilla-5.0.6

The create a symbolic link to the apache2 home

  sudo ln -s /opt/bugzilla-5.0.6 /var/www/html/bugzilla

Check Dependencies and Install as Required

  cd /opt/bugzilla-5.0.6
  sudo perl

You can attempt to install all the missing dependencies at once:

  sudo perl — all

To install a single package, use

  sudo perl module_name

Apache Mods

If there are Apache mods that need to be enabled, the command to do that is:

  sudo a2enmod module_name

I needed to enable 3 modules (and the instructions include cgi as well, not sure why...)

  sudo a2enmod cgi headers expires rewrite

Changes to localconfig

The check script also attempts to connect to the database and will built the tables, etc. Therefore you probably will have to change the database name, user & password to match what was created earlier. These are the settings you will need to find and ensure they are correct:

  sudo vi localconfig
  $webservergroup = 'www-data';
  $db_driver = 'mysql';
  $db_host = 'localhost';
  $db_name = 'bugzilla';
  $db_user = 'bugzilla';
  $db_pass = 'PASSWORD';

Change Permissions

  sudo chown -R www-data:www-data /opt/bugzilla-5.0.6

Configuring Apache2

  cd /etc/apache2/sites-available
  sudo vi bugzilla.conf

Add the following lines. Use appropriate server names and email addresses. Also confirm where the location for the Apache error logs.

  <VirtualHost *:80>
  DocumentRoot /var/www/html/bugzilla/
  <Directory /var/www/html/bugzilla/>
  AddHandler cgi-script .cgi
  Options +Indexes +ExecCGI
  DirectoryIndex index.cgi
  AllowOverride Limit FileInfo Indexes Options AuthConfig
  ErrorLog /var/log/apache2/
  CustomLog /var/log/apache2/ common

Lastly, enable the new site (and disable the default one):

  sudo a2ensite bugzilla
  sudo a2dissite 000-default
  sudo systemctl restart apache2


At this point, you should be able to open a browser and see the Bugzilla site.

Configuring Bugzilla

The last step is to login as the administrator, and configure new products, etc etc. Go to:

Administration - Parameters to set up overall parameters

Administration - Users to add new users

Administration - Products to set up new products (and remove the TestProduct)

Administration - Field Values to set up addition values for fields, like OS, Hardware, etc etc

Online Resources

Install Bugzilla 5.0.x stable on Ubuntu 18.04 LTS

Back to Bugzilla