Setting up Bugzilla in Ubuntu 14.04 ( trusty )

buggie
Setting up Bugzilla is fairly easy . This blog post is specific to Ubuntu 14.04  ( though it might work with older versions too )

In order to get Bugzilla up and running in Ubuntu 14.04, we are going to install Apache webserver ( SSL enabled ) , MySQL database server and also some tools that are required to  install and configure Bugzilla.

Login to the machine as a user that can do “sudo” commands. Here is the command you need to install required packages.
sudo apt-get install apache2 mysql-server libapache2-mod-perl2
libapache2-mod-perl2-dev libapache2-mod-perl2-doc perl postfix make gcc g++

Answer the questions asked by MySQL and postfix .

Setting up MySQL

Login with root access to MySQL and create a DB for Bugzilla. Change “secret_password” to anything you want. You will need it later when configuring Bugzilla too.


mysql -u root -p
password:
mysql > create database bugs;
mysql > GRANT SELECT, INSERT, UPDATE, DELETE, INDEX, ALTER, CREATE, LOCK TABLES, CREATE TEMPORARY TABLES, DROP, REFERENCES ON bugs.* TO bugs@localhost IDENTIFIED BY ‘secret_password’;
mysql > flush privileges ;
mysql > quit

Setting up Apache

Now , we need to enable CGI and SSL for Apache. Since this is a in-house project, we are ok with a self-signed certificate.
sudo mkdir /etc/apache2/ssl
sudo a2enmod ssl
sudo a2enmod cgi
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt

The last command will ask you to enter a few information about the country and email address etc. Now we have the certificate in /etc/apache2/ssl/apache.crt and the Key file in /etc/apache2/ssl/apache.key . Modify the /etc/apache2/sites-available/default-ssl.conf to properly mark these files.
SSLCertificateFile /etc/apache2/ssl/apache.crt
SSLCertificateKeyFile /etc/apache2/ssl/apache.key

Now to make the SSL site run, sudo a2ensite default-ssl.conf” Restart apache to make the changes effective. You can already test it with your browser pointing to https://your_server_ip/ .

Setting up Bugzilla – Stage 1

Download and extract the latest tar file from the internet. As of this writing , latest stable version is 4.4.5.
cd /var/www/html
sudo wget http://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-4.4.5.tar.gz
sudo tar zxvf bugzilla-4.4.5.tar.gz
sudo mv bugzilla-4.4.5 bugzilla

Now we have Bugzilla extracted, let’s use a script provided by the developers to do further configurations.
cd /var/www/html/bugzilla
sudo ./checksetup.pl --check-modules

This will tell you most probably , there are lot of perl modules missing. Do not worry, you can install all of them with the below command.

cd /var/www/html/bugzilla
sudo perl install-module.pl --all

This will take some time to download and install all dependancies. Run the checksetup.pl –check-modules command again to verify there are nothing left.

Next step, run the checksetup.pl command without –check-modules option. This will generate a file called “localconfig” in the /var/www/html/bugzilla directory. Edit that file and include the following minimum things.

$webservergroup = 'www-data'
$db_pass = 'secret_password'

We will also create a local user account to run Bugzilla.

sudo useradd -d /home/bugs -m bugs
sudo passwd bugs

Now , run the sudo checksetup.pl again. It will connect to DB and also install proper files and permissions. If everything goes fine, it will ask for a Administrator user email and password. This is what you will use to setup more details in Bugzilla later.

Configure Apache to properly understand and execute scripts in Bugzilla , by adding the following to /etc/apache2/apache2.conf file.

<Directory "/var/www/html/bugzilla">
AddHandler cgi-script cgi
DirectoryIndex index.cgi
Options +Indexes +ExecCGI -MultiViews +SymLinksIfOwnerMatch +FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all

Now, restart apache ( sudo service apache2 restart ) and connect to https://server_ip/bugzilla .

Setting up Bugzilla – Stage 2

After you have successfully completed stage 1, you can now login to Bugzilla using the Administrator email and password you mentioned while running checksetup.pl.

You will be greeted with a special configuration page. You will need to go to parameters and set at least urlbase  as http://server_ip/bugzilla/ and cookie_path as /bugzilla/ . Also there is possibility to force SSL connections in that same page.

Now you need to got to “Administration” and configure Product, milestones, users, authentication, preferences etc. There are so many things you can configure from the “Administration” link , that is beyond the scope of this blog post. More information can be found here : http://www.bugzilla.org/docs/

Enjoy your very own Bugzilla !

 

Adobe Reader on Ubuntu 13.10 (Saucy Salamander) 64 Bit

I will try to keep this short and simple. Adobe reader is needed only if you need to do forms and such advanced things in PDF files. Otherwise, Ubuntu comes with default tools such as evince to do all kind of usual reading of PDF files. If your system is a very old one, you can even try installing xpdf package.

That being said, let’s go ahead and install Adobe reader. First, download the .bin file from adobe website : http://get.adobe.com/reader/ . Once the file is downloaded, issue the following commands to install it.

Inside a terminal :

chmod a+x acro...bin
./acro...bin

and follow on-screen instructions.

If you are running a 64 Bit version of Ubuntu, you might need to install a few 32 bit libraries to get it working. Specially if you are facing errors like : “acroread: error while loading shared libraries: libgdk_pixbuf_xlib-2.0.so.0: cannot open shared object file: No such file or directory

sudo aptitude install libgdk-pixbuf2.0-0:i386
sudo aptitude install libgtk2.0-0:i386

Adobe Reader should work fine now. Enjoy 🙂