I would like to use Bugzilla on my own computer to track and trace bugs in our own software. How do I set this up?
For Bugzilla you need...
- Perl (5.8.1 or above)
- Perl modules
- Bugzilla using apache
Some remarks up front:
If any of these are already installed just keep an eye on settings that need to be set. Check these with what you used and change them to your needs.
Also have a look at this how to (from Saariko in comment) if the below does not work for you.
If anyone finds typos feel free to fix them, or if you can think of improvements feel free to add them in
Here we go...
Verify what perl you are using:
It should show something like this:
This is perl, v5.10.1 (*) built for i686-linux-gnu-thread-multi (with 53 registered patches, see perl -V for more detail)
Natty uses 5.10. If yours is lower than 5.8.1 you need to upgrade it.
Verify if you have a MySQL running with
Make sure to follow guidelines and set up a
rootaccount with a decent password. See the links above for how to set up a LAMP server if you need it. Create a user
bugzilla(change it if you want something else)
sudo useradd -d /home/bugzilla -m bugzilla sudo passwd bugzilla
And create a database and set permissions for user
mysql -u root -p mysql> create database bugzilla; mysql> grant all privileges on bugzilla.* to bugzilla@localhost;
You need database name, user name and password for the user later on.
Verify if Apache is installed:
should show a welcome page or a website. If not installed...install apache2 Configure apache2 as you normally would. See the links at the top for how to set up a LAMP server if you need more.
And now for the important part... setting up bugzilla in apache2:
sudo -H gedit /etc/apache2/apache2.conf
and edit in the following ...
Alias /bugzilla/ /var/www/bugzilla/ <directory /var/www/bugzilla> Addhandler cgi-script .cgi .pl Options +Indexes +ExecCGI +FollowSymLinks DirectoryIndex index.cgi AllowOverride Limit </directory>
(Note the trailing "/" on the first line)
Add a user
apache2if you do not have this already.
sudo useradd -d /home/apache2 -m apache2 sudo passwd apache2
Add the user to apache2 variables...
sudo -H gedit /etc/apache2/envvars
export APACHE_RUN_USER=apache2 export APACHE_RUN_GROUP=apache2
cgiaddhandler could be in another place if you install bugzilla from the repositories (see apache cgi how to)
Or download the latest stable (4.0.2 at the moment) or latest cutting edge version from bugzilla. Short instruction on the latter:
sudo tar -xvf bugzilla-4.0.2.tar sudo mv /download/bugzilla-4.0.2 /usr/local/ sudo ln -s /usr/local/bugzilla-4.0.2 /var/www/bugzilla
Make sure the directory has rw permissions:
sudo chown -R www-data:www-data /var/www/bugzilla
Perl modules for Bugzilla
Bugzilla uses a script
checksetup.plto check if everything is set up correctly and if things changed to set them up for you. By manually installing the perl modules you can skip this.
Check if all modules are installed:
cd /var/www/bugzilla/ sudo ./checksetup.pl --check-modules
If not installed...
sudo perl -MCPAN -e install
localconfigholds the configurations and needs to be set up. So...
sudo -H gedit localconfig
and change $db_name to the database name, #db_user to the user and $db_password to the password you used during setup of MySQL.
$db_name = 'bugzilla'; $db_user = 'bugzilla'; $db_pass = 'bugzilla@pwpspaswsword';
After saving these settings
cd /var/www/bugzilla/ sudo ./checksetup.pl
will add all kinds of tables to MySQL. Adding server group
sudo -H gedit /var/www/bugzilla/localconfig
$webservergroup = 'apache2';
To include these changes do a
cd /var/www/bugzilla/ sudo ./checksetup.pl
and this will ask you to setup your administrator for bugzilla.
sudo /etc/init.d/apache2 restart
and open a browser and insert URL
and I have a working bugzilla login page on my own machine.
I think a much shorter answer would be much more helpful:
sudo apt-get install bugzilla3
it asks a few questions. Then just open your browser and go to http://localhost/bugzilla3
All dependencies are installed automatically, everything is configured automatically. Automatic install should work in most cases, even if Apache or Mysql are already installed and configured (unless some non-trivial changes in their configuration have been made)
Novice Ubuntu users are misled by the detailed build-it-from-tarballs instructions.