Update : 1st may 2011 : Updated the installation for Ubuntu 11.04 and Bugzilla 4.0
I was trying out bugzilla installation on Ubuntu. Although there is a bugzilla3 package I never was able to properly configure it. Today, decided to look at this issue again and googled for any HOWTOs. I got this sweet piece of setup at : Handyowner . There are some formatting issues which made me struggle a bit - so here is the reformated installation guide.
Assumptions:
Ubuntu is already installed and configured on your target machine.
The machine is connected to the Internet you can browse the World Wide Web.
Here are the main steps:
- Install Per l(5.8.1 or above)
- Install MySQL
- Install Apache2
- Install Bugzilla 3.2
- Install Perl modules
- Bugzilla using apache
Verify if Perl is installed:
$ perl -vIf not installed :
$ sudo apt-get install perl2. MySQL
Verify if MySQL is installed:
$ mysql --versionIf not installed :
$ sudo apt-get install mysql-client mysql-server mysql-adminCreate “bugzilla” user with a strong password:
$ sudo useradd -d /home/bugzilla -m bugzilla
$ sudo passwd bugzilla
Tip! Here is what makes a password strong: make it lengthy, combine letters, numbers and symbols, use words and phrases that are easy for you to remember, but difficult for others to guess.
Create a database ‘bugzilla’ and grant privileges to ‘bugzilla’ database to ‘bugzilla’ user:Tip! I usually set the bugzilla user password through the mysql admin interface ( Application -> Programming -> MySql Adminstrator).
3. Apache2$ mysql -u root -p
mysql> create database bugzilla;mysql> show databases;mysql> grant all privileges on bugzilla.* to bugzilla@localhost;
+--------------------+
| Database |
+--------------------+
| information_schema |
| bugzilla |
+--------------------+
2 rows in set (0.00 sec)
Verify if Apache is installed:
$ apache2 -vYou can also view in a web browser the default welcome page at http://localhost
If not installed :
$ sudo apt-get install apache24. Bugzilla 3.2.2
Download Bugzilla from the site “ http://www.bugzilla.org/”.
Tip! Download a stable release, unless (1) you would like to go bleeding edge, (2) you do not care about spending time with your girlfriend, your wife, your kids or your buddies, (3) your boss said so and you couldn’t say no.
Untar the downloaded file to your download folder$sudo tar -xvf bugzilla-3.2.2.tarMove bugzilla dirrectory to /usr/local/
$ sudo mv /download/bugzilla-3.2.2 /usr/local/Make a symbolic link from /usr/local/bugzilla3.x to /var/www/bugzilla
$ sudo ln -s /usr/local/bugzilla3.x /var/www/bugzilla5. Perl Modules
Bugzilla’s installation process is based on a script called checksetup.pl. The first thing it checks is whether you have appropriate versions of all the required Perl modules. The aim of this section is to pass this check.
Verify if Perl modules are installed
$:/usr/local/bugzilla-3.2.2$ sudo ./checksetup.pl --check-modulesIf not installed:
$:/usr/local/bugzilla-3.2.2$ sudo perl -MCPAN -e installEdit the ‘localconfig’ file
$:/usr/local/bugzilla-3.2.2$ sudo gedit localconfig
Change the $db_name, $db_pass and $db_user value to the correct values. Here's how it looks like in my localconfig (replace the password with your actual password, this is just a placeholder here)
# The name of the database
$db_name = 'bugzilla';
# Who we connect to the database as.
$db_user = 'bugzilla';
# Enter your database password here.
$db_pass = 'bugzilla@123';
Run the checksetup.pl again. This will add a whole lot of tables for bugzilla, and you can verify that by looking at the tables in the 'bugzilla' database.
$:/usr/local/bugzilla-3.2.2$ sudo ./checksetup.pl6. Configure Apache2 for Bugzilla
Add the following directives to /etc/apache2/apache2.conf
$sudo gedit /etc/apache2/apache2.conf
*Note : Since the brackets give problem with blogger, added pic for the relevant code changes. All the non commented lines are what you have to type in.
7. Additional security
create user “apache2″
$ sudo useradd -d /home/apache2 -m apache2Edit /etc/apache2/envvars to add. This is how my config looks
$ sudo passwd apache2
export APACHE_RUN_USER=apache2Note : The default user and group is www-data. I don't really know how to setup the export to use both the www-data and the apache2 user simultaneously. If anyone can help with the syntax, it will be great !
export APACHE_RUN_GROUP=apache2
Edit /usr/local/bugzilla-3.2.2/localconfig to add
$webservergroup = ‘apache2′;Rerun checksetup.pl
$:/usr/local/bugzilla-3.2.2$ sudo ./checksetup.plThis will ask you to setup your administrator for bugzilla. Go ahead and enter the password and email ids.
8. Check the Installation
Restart the apache server using the command
$ sudo /etc/init.d/apache2 restart
Type the in your browser http://localhost/bugzilla/ . You should be getting the bugzilla login page. Login using the email and password you did at end of pt 7.