Search This Blog

Monday, January 11, 2010

Install Bugzilla on Ubuntu

A few  nights ago I attempted to install Bugzilla on a Ubuntu 8.10 test machine but I ran into a few snags. The Ubuntu team does a great job of packaging Bugzilla and setting it up with a nifty little installer, but for some reason I couldn't get it working. After a lot of searching around on Google and the Ubuntu forums, I finally found the last few bits of information to get Bugzilla working on my test machine. Since I know that several people out there are probably having a similar experience to mine, I decided to post a quick tutorial.

Starting the Installation

To get going, you simply need to issue the following command:

sudo apt-get install bugzilla3

This will grab Bugzilla and all the packages required to make Bugzilla work. If you have never installed MySQL before, the first dialog you will be greeted with is the one shown below. This is the step to set the "root" password for MySQL. Just make sure you pick a secure password and don't forget it! When you are done, click "Forward" to move on to the next step.



The next dialog window you will see is the one shown below. This dialog is simply asking if you would like help configuring your database, so just click "Forward" to move on to configuring Bugzilla.



For this step you will need the password for your MySQL database server. More specifically, you need the password for the administrative user "root"  (this is the password you entered in the first step) so that the installation program can install the default databases for you .


The next step is to enter a password for the Bugzilla program to use. This is simply the password that is used by Bugzilla to interact with the MySQL database. If you don't want to make up a password for this step, you can just hit "Forward" and the installer will generate a password for you and store it in /etc/bugzilla3/localconf.



Next you will see the dialog window shown below. This window is asking for information that will be used in your base Bugzilla install. The important thing to remember here is that you need to enter a valid e-mail address ( This e-mail address is being protected from spambots. You need JavaScript enabled to view it ). If you don't enter a proper address, you have to restart the installation from the beginning (something I learned the hard way). Once you have completed the form, click "Forward" to finish the installer.



A Few Extra Tweaks

Now that you have the base install out of the way, you need to tweak a few files to get everything working. The first step is to copy the example Bugzilla configuration file to the Apache configuration folder. This can be done with the following command:

sudo cp /usr/share/bugzilla3/debian/apache.conf /etc/apache2/conf.d/bugzilla3.conf

This will setup Apache to point to the correct directories and libraries for Bugzilla. Once the file has been copied, restart Apache by issuing the following command:

sudo /etc/init.d/apache2 restart

The final step is to make sure that the Bugzilla parameter file is readable by Apache. This can be done with the following commands:

chmod g+rw /etc/bugzilla3/params

chown www-data:www-data /etc/bugzilla3/params

If all goes well you should be able to browse to your server (http://your_server_name/cgi-bin/bugzilla3) and see the Bugzilla login page. Now you are ready to login and get to smashing bugs!

If It Doesn't Work

If you follow all of these steps and Bugzilla still isn't working, your best option is to watch the Apache error log while you attempt to connect to the Bugzilla main page. You can do this by using the tail command to watch the log:

tail -f /var/log/apache2/error.log

Good luck!

ref : Jarrod Hyder (

Wednesday, January 6, 2010

Solution : JUNIT Setup \ 'java.lang.NoClassDefFoundError' error +Class not found "junit.samples.AllTests"

Follow the given steps:

  1. Download the Junit from the sourceforge repository.(Download Link) , the Zip file
  2. extract the zip file to a directory. ex c:\
  3. it should look like c:\junit4.8.1\ with folders ex. doc, javadoc etc
  4. Add the paths 
    • JUNIT_HOME=c:\junit4.8.1
    • CLASSPATH=c:\junit4.8.1\junit-4.8.1.jar;c:\junit4.8.1
  5. open a new command window
  6. go to the C:\junit4.8.1 folder
  7. try following java junit.textui.TestRunner junit.samples.AllTests
Time: 0.453
OK (130 tests)

else try running the command line version

C:\junit4.8.1>java -classpath "C:\junit4.8.1\junit-4.8.1.jar;c:\junit4.8.1" junit.textui.TestRunner junit.samples.AllTests

Output should be like below


Time: 0.422
OK (130 tests)

if this does not work that means you may be using wrong java version. (I have tested junit 4.8.1 working with JDK 5)

- Mihir Patel.

How to setup JAVA_HOME environment variable in Windows

Please follow the instructions to set up JAVA_HOME environment variable in your computer. First find out the installation folder of Java development kit (JDK) in your machine. Let's assume it is installed in the folder "C:/j2sdk1.4.2"

  1. Right click on the My Computer icon on your desktop and select properties
  2. Click the Advanced Tab
  3. Click the Environment Variables button
  4. Under System Variable, click New
  5. Enter the variable name as JAVA_HOME
  6. Enter the variable value as the install path for the Development Kit
  7. Click OK
  8. Click Apply Changes

Ref :

Tuesday, January 5, 2010

how to install g++

yum install gcc-c++

- Mihir

Solution : ./configure: command not found

sudo chmod  a+x  configure

then run the


- Mihir Patel.

"Check if you have forgot to change the mode of the configure. This script file name configure may be missing the execution flag. This happnes when you copy the folder from x system to y."